[jira] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14174957#comment-14174957 ] Hudson commented on HADOOP-11182: - FAILURE: Integrated in Hadoop-Yarn-trunk #715 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk/715/]) HADOOP-11182. GraphiteSink emits wrong timestamps (Sascha Coenen via raviprak) Fix CHANGES.txt (raviprak: rev b0d6ac92fe1f51cf9742abab778200d2d0eb99fa) * hadoop-common-project/hadoop-common/CHANGES.txt 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14175069#comment-14175069 ] Hudson commented on HADOOP-11182: - FAILURE: Integrated in Hadoop-Mapreduce-trunk #1929 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1929/]) HADOOP-11182. GraphiteSink emits wrong timestamps (Sascha Coenen via raviprak) Fix CHANGES.txt (raviprak: rev b0d6ac92fe1f51cf9742abab778200d2d0eb99fa) * hadoop-common-project/hadoop-common/CHANGES.txt 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14175073#comment-14175073 ] Hudson commented on HADOOP-11182: - FAILURE: Integrated in Hadoop-Hdfs-trunk #1904 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1904/]) HADOOP-11182. GraphiteSink emits wrong timestamps (Sascha Coenen via raviprak) Fix CHANGES.txt (raviprak: rev b0d6ac92fe1f51cf9742abab778200d2d0eb99fa) * hadoop-common-project/hadoop-common/CHANGES.txt 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14175155#comment-14175155 ] Zhijie Shen commented on HADOOP-11182: -- Ravi, no worry. It's a common mistake. Thanks for updating the change log. 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14173538#comment-14173538 ] Sascha Coenen commented on HADOOP-11182: Awesome! Thanks so much Ravi for your continued support. I will definitely try to spend time on getting the setup right and commit more often in the future. Thank you so so much. ;) 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14174479#comment-14174479 ] Ravi Prakash commented on HADOOP-11182: --- Shoot! Thanks Zhijie. I'll fix the CHANGES.txt. I don't think I can do anything to the commit message any more . :( Sorry about that 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14174501#comment-14174501 ] Hudson commented on HADOOP-11182: - FAILURE: Integrated in Hadoop-trunk-Commit #6275 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/6275/]) HADOOP-11182. GraphiteSink emits wrong timestamps (Sascha Coenen via raviprak) Fix CHANGES.txt (raviprak: rev b0d6ac92fe1f51cf9742abab778200d2d0eb99fa) * hadoop-common-project/hadoop-common/CHANGES.txt 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14172137#comment-14172137 ] Sascha Coenen commented on HADOOP-11182: Hi Ravi, Thanks for your help. I will try to make progress. I can't find an existing TestGraphiteSink file in the trunk here http://svn.apache.org/repos/asf/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/sink/ or here https://github.com/apache/hadoop/tree/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/sink Can you advise? Thanks 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14172668#comment-14172668 ] Sascha Coenen commented on HADOOP-11182: Ah. I found the right Unit test class now and moved the new test into that one. Resubmitting the patch and keeping my fingers crossed. BTW: I'm still unable to make use of any local patch testing. The run test-patch takes like forever and outputs many tests failures but nothing that would resemble the QA report. The Jenkins console output doesn't contain any findbug warnings. It just says in there that the findbug report got stored as a local file on Jenkins which I cannot access. 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14172751#comment-14172751 ] Hadoop QA commented on HADOOP-11182: {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12675064/HADOOP-11182-v3.patch against trunk revision 1862064. {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:green}+1 tests included{color}. The patch appears to include 1 new or modified test files. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. There were no new javadoc warning messages. {color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse. {color:red}-1 findbugs{color}. The patch appears to introduce 2 new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 core tests{color}. The patch passed unit tests in hadoop-common-project/hadoop-common. {color:green}+1 contrib tests{color}. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/4928//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/4928//artifact/patchprocess/newPatchFindbugsWarningshadoop-common.html Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/4928//console This message is automatically generated. 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14173091#comment-14173091 ] Ravi Prakash commented on HADOOP-11182: --- Thanks a lot Sascha! The patch looks good to me. I'll commit it shortly. Its strange that you are unable to run test-patch successfully. On my laptop it usually takes 15-20 minutes. I was then able to see the file newPatchFindbugsWarninghadoop-common.html in /tmp . I am uploading what was produced for your perusal (which btw I checked had no instance of metrics2) . I did get 67 warnings but I'm guessing that's probably an error in the test-patch. Its probably worthwhile to setup your dev environment properly if you plan on continuing to contribute. Unfortunately it is a bit of a chore right now :( 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14173108#comment-14173108 ] Zhijie Shen commented on HADOOP-11182: -- Hi, [~raviprak]. It seems that the jira number is wrongly edited in the commit. {code} HADOOP-11181. GraphiteSink emits wrong timestamps (Sascha Coenen via raviprak) {code} 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14171347#comment-14171347 ] Ravi Prakash commented on HADOOP-11182: --- Hi Sascha! Thanks a lot for all your effort! That -1 release audit warning is probably because you haven't included the Apache license at the top of the new file you have introduced (TestGraphiteSink.java). By the way, there already was a file (TestGraphiteMetrics.java) . Could the test not have been added to that? In fact you are right, this patch was probably small enough that fixing the test which failed (TestMetricsSystemImpl) in the earlier patch would have been enough. You are right about the 404. As a workaround you can check the console output or run test-patch yourself. The findbugs warning seems to be coming from a file not in this patch so we shouldn't have to worry about it. I can't +1 a patch that I have uploaded. 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14169378#comment-14169378 ] Sascha Coenen commented on HADOOP-11182: Thanks Ravi for pointing me to the repository to use. I resubmitted another path against the trunk of the git repo this time. Also added a new unit test class as the GraphiteSink class didn't have a unit test class yet. Added one test which fails if the fix is not applied but succeeds under the fix. I was not able to go through with all HowToContribute suggestions though. Some strange things happened on my system like timeouts during test executions. However, these failures seem to be unrelated to my patch. I also get a The patch does not appear to apply with p0 to p2 from the dev-support script. No idea what this is supposed to mean, nor do I find anything on googling for that message. I hope that this patch will do. I've spent about a day on it. If the patch still does not go through, it would be nice if someone more familiar with the workflow could make the modification on my behalf as it is just a single line of code that needs to be replaced in the code. Thanks 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14169439#comment-14169439 ] Hadoop QA commented on HADOOP-11182: {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12674513/HADOOP-11182-v2.patch against trunk revision bbe80cd. {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:green}+1 tests included{color}. The patch appears to include 1 new or modified test files. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. There were no new javadoc warning messages. {color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse. {color:red}-1 findbugs{color}. The patch appears to introduce 2 new Findbugs (version 2.0.3) warnings. {color:red}-1 release audit{color}. The applied patch generated 1 release audit warnings. {color:green}+1 core tests{color}. The patch passed unit tests in hadoop-common-project/hadoop-common. {color:green}+1 contrib tests{color}. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/4910//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/4910//artifact/patchprocess/patchReleaseAuditProblems.txt Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/4910//artifact/patchprocess/newPatchFindbugsWarningshadoop-common.html Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/4910//console This message is automatically generated. 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14169525#comment-14169525 ] Sascha Coenen commented on HADOOP-11182: the links contained in the above QA output all lead to HTTP 404 errors while a local execution of the dev-support script gives me a The patch does not appear to apply with p0 to p2 error and then aborts. I guess that means I'm stuck. ;) I also have no idea what a release audit warning is. 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] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14166704#comment-14166704 ] Sascha Coenen commented on HADOOP-11182: Thanks Ravi. I have attached a patch but it's been the first time for me. I'm insecure as to whether I have done the right thing. I created the patch relative to the trunk of the following SVN repository (http://svn.apache.org/repos/asf/hadoop/common/trunk), which was linked to from the official hadoop website. However, the most recent commits in there seem to be 6 weeks old. 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)
[jira] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14167610#comment-14167610 ] Ravi Prakash commented on HADOOP-11182: --- Thanks Sascha! This patch looks good to me. +1. I'll commit it pending a +1 from Hadoop QA. I've clicked on the Submit Patch button for you. Recently Hadoop was moved from the old svn repository to git. You can clone the latest code from https://git-wip-us.apache.org/repos/asf/hadoop.git . I'll file a JIRA to update the link. Thanks :-) 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)
[jira] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14167720#comment-14167720 ] Hadoop QA commented on HADOOP-11182: {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12674159/HADOOP-11182-GraphiteSink-v1.patch against trunk revision d3d3d47. {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. There were no new javadoc warning messages. {color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse. {color:red}-1 findbugs{color}. The patch appears to introduce 2 new Findbugs (version 2.0.3) warnings. {color:red}-1 release audit{color}. The applied patch generated 1 release audit warnings. {color:red}-1 core tests{color}. The patch failed these unit tests in hadoop-common-project/hadoop-common: org.apache.hadoop.metrics2.impl.TestMetricsSystemImpl {color:green}+1 contrib tests{color}. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/4902//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/4902//artifact/patchprocess/patchReleaseAuditProblems.txt Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/4902//artifact/patchprocess/newPatchFindbugsWarningshadoop-common.html Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/4902//console This message is automatically generated. 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)
[jira] [Commented] (HADOOP-11182) GraphiteSink emits wrong timestamps
[ https://issues.apache.org/jira/browse/HADOOP-11182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14166370#comment-14166370 ] Ravi Prakash commented on HADOOP-11182: --- Sascha, could you please upload a patch? I'm happy to commit it. 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 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)