[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vinayakumar B updated HADOOP-11182: --- Assignee: Ravi Prakash > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.0, 2.5.1 >Reporter: Sascha Coenen >Assignee: Ravi Prakash > Fix For: 2.6.0 > > Attachments: HADOOP-11182-GraphiteSink-v1.patch, > HADOOP-11182-v2.patch, HADOOP-11182-v3.patch, > newPatchFindbugsWarningshadoop-common.html > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ravi Prakash updated HADOOP-11182: -- Attachment: newPatchFindbugsWarningshadoop-common.html > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.0, 2.5.1 >Reporter: Sascha Coenen > Fix For: 2.6.0 > > Attachments: HADOOP-11182-GraphiteSink-v1.patch, > HADOOP-11182-v2.patch, HADOOP-11182-v3.patch, > newPatchFindbugsWarningshadoop-common.html > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ravi Prakash updated HADOOP-11182: -- Resolution: Fixed Status: Resolved (was: Patch Available) Thanks a lot Sacha! This patch is now committed to branch-2.6, branch-2 and trunk > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.0, 2.5.1 >Reporter: Sascha Coenen > Fix For: 2.6.0 > > Attachments: HADOOP-11182-GraphiteSink-v1.patch, > HADOOP-11182-v2.patch, HADOOP-11182-v3.patch > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ravi Prakash updated HADOOP-11182: -- Fix Version/s: 2.6.0 > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.0, 2.5.1 >Reporter: Sascha Coenen > Fix For: 2.6.0 > > Attachments: HADOOP-11182-GraphiteSink-v1.patch, > HADOOP-11182-v2.patch, HADOOP-11182-v3.patch > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Coenen updated HADOOP-11182: --- Attachment: HADOOP-11182-v3.patch > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.0, 2.5.1 >Reporter: Sascha Coenen > Attachments: HADOOP-11182-GraphiteSink-v1.patch, > HADOOP-11182-v2.patch, HADOOP-11182-v3.patch > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Coenen updated HADOOP-11182: --- Status: Patch Available (was: Open) > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.1, 2.5.0 >Reporter: Sascha Coenen > Attachments: HADOOP-11182-GraphiteSink-v1.patch, > HADOOP-11182-v2.patch, HADOOP-11182-v3.patch > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Coenen updated HADOOP-11182: --- Status: Open (was: Patch Available) > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.1, 2.5.0 >Reporter: Sascha Coenen > Attachments: HADOOP-11182-GraphiteSink-v1.patch, HADOOP-11182-v2.patch > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Coenen updated HADOOP-11182: --- Status: Patch Available (was: Open) > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.1, 2.5.0 >Reporter: Sascha Coenen > Attachments: HADOOP-11182-GraphiteSink-v1.patch, HADOOP-11182-v2.patch > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Coenen updated HADOOP-11182: --- Attachment: HADOOP-11182-v2.patch > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.0, 2.5.1 >Reporter: Sascha Coenen > Attachments: HADOOP-11182-GraphiteSink-v1.patch, HADOOP-11182-v2.patch > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Coenen updated HADOOP-11182: --- Status: Open (was: Patch Available) > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.1, 2.5.0 >Reporter: Sascha Coenen > Attachments: HADOOP-11182-GraphiteSink-v1.patch > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ravi Prakash updated HADOOP-11182: -- Status: Patch Available (was: Open) > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.1, 2.5.0 >Reporter: Sascha Coenen > Attachments: HADOOP-11182-GraphiteSink-v1.patch > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Coenen updated HADOOP-11182: --- Attachment: HADOOP-11182-GraphiteSink-v1.patch > GraphiteSink emits wrong timestamps > --- > > Key: HADOOP-11182 > URL: https://issues.apache.org/jira/browse/HADOOP-11182 > Project: Hadoop Common > Issue Type: Bug >Affects Versions: 2.5.0, 2.5.1 >Reporter: Sascha Coenen > Attachments: HADOOP-11182-GraphiteSink-v1.patch > > > the org.apache.hadoop.metrics2.sink.GraphiteSink class emits metrics at the > configured time period, but the timestamps written only change every 128 > seconds, even it the configured time period in the configuration file is much > shorter. > This is due to a bug in line 93: > {code:java} > 092// Round the timestamp to second as Graphite accepts it in > such format. > 093int timestamp = Math.round(record.timestamp() / 1000.0f); > {code} > The timestamp property is a long and is divided by a float which yields a > result that is not precise enough and yields same valued results for > timestamps that lie up to 128 seconds apart. Also, the result is then written > into an int variable. > One solution would be to divide by 1000.0d, but the best fix would be to not > even convert to a decimal format in the first place. Instead one could > replace the line with the following: > {code:java} >long timestamp = record.timestamp() / 1000L; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)