Issue Details (XML | Word | Printable)

Key: HADOOP-4228
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Eric Yang
Reporter: Eric Yang
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

dfs datanode metrics, bytes_read, bytes_written overflows due to incorrect type used.

Created: 19/Sep/08 11:45 PM   Updated: 04/Nov/08 06:48 PM
Return to search
Component/s: metrics
Affects Version/s: 0.18.2, 0.19.0
Fix Version/s: 0.18.2

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works HADOOP-4228-trunk.patch 2008-09-22 11:57 PM Eric Yang 11 kB
Text File Licensed for inclusion in ASF works HADOOP-4228.patch 2008-09-22 09:33 PM Eric Yang 10 kB
Text File Licensed for inclusion in ASF works metricsLong.patch 2008-10-02 09:39 PM Hairong Kuang 6 kB
Text File Licensed for inclusion in ASF works metricsLong1-br18.patch 2008-10-06 05:51 PM Hairong Kuang 6 kB
Text File Licensed for inclusion in ASF works metricsLong1.patch 2008-10-06 05:52 PM Hairong Kuang 6 kB
Environment: Red Hat Enterprise Linux AS release 4 (Nahant Update 5), Java 1.6.

Hadoop Flags: Reviewed, Incompatible change
Release Note: Changed bytes_read, bytes_written to type long to prevent metrics overflow.
Resolution Date: 13/Oct/08 07:23 AM


 Description  « Hide
bytes_read, and bytes_written metrics are using int (MetricsTimeVaryingInt) as counter. This type is too small to store the bytes_read and bytes_written metrics. Recommend to change this to long (metricsLongValue).

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Eric Yang added a comment - 22/Sep/08 09:31 PM
Patch to change metrics type from Integer to Long.

Eric Yang added a comment - 22/Sep/08 09:33 PM
Patch to change bytes_read and bytes_written metrics from type Integer to type long.

Eric Yang added a comment - 22/Sep/08 11:57 PM
Same patch for trunk.

Hadoop QA added a comment - 23/Sep/08 04:14 AM
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12390702/HADOOP-4228-trunk.patch
against trunk revision 697306.

+1 @author. The patch does not contain any @author tags.

+1 tests included. The patch appears to include 6 new or modified tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs warnings.

-1 core tests. The patch failed core unit tests.

-1 contrib tests. The patch failed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3349/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3349/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3349/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3349/console

This message is automatically generated.


Eric Yang added a comment - 23/Sep/08 08:57 PM
The failed test has no relationship to this patch. There is probably something else committed to trunk which caused Balancer test failure.

Hairong Kuang added a comment - 01/Oct/08 12:18 AM
The SimulatedDataNodeMetrics seems quite dummy, which is introduced for only the testing purpose.

A side note: DataNodeStatics and DataNodeStaticsMBean collect bytesRead but not bytesWritten. They should collect metrics bytesWritten as well.


Hairong Kuang added a comment - 02/Oct/08 09:39 PM
This patch has the following changes:
1. DataNode's metrics bytesRead & bytesWritten are changed to be long;
2. Add getBytesWritten method to DataNodesStaticsticsMBean;
3. Add a unit test to see if DataNodeMetrics can handle long number of bytes written.

Sanjay Radia added a comment - 03/Oct/08 07:54 PM
+1

Hadoop QA added a comment - 03/Oct/08 11:42 PM
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12391383/metricsLong.patch
against trunk revision 701476.

+1 @author. The patch does not contain any @author tags.

+1 tests included. The patch appears to include 6 new or modified tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs warnings.

+1 Eclipse classpath. The patch retains Eclipse classpath integrity.

-1 core tests. The patch failed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3431/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3431/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3431/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3431/console

This message is automatically generated.


Hairong Kuang added a comment - 06/Oct/08 05:51 PM
This is a patch for branch 18.

Hairong Kuang added a comment - 06/Oct/08 05:52 PM
This is a patch for the trunk. It removes the change to DFSTestUtil that caused the failed tests.

Brian Bockelman added a comment - 06/Oct/08 11:50 PM
Changing the type to Long breaks Ganglia metrics reporting (there's a static mapping of Java type -> Ganglia type; there's no current Long type, meaning the map returns null and causes a NPE).

Ganglia has no Long type - perhaps a solution would be to map Longs in Ganglia to a float?

See also:
HADOOP-4137
HADOOP-3422


Mac Yang added a comment - 08/Oct/08 12:10 AM

> Ganglia has no Long type - perhaps a solution would be to map Longs in Ganglia to a float?

Short of supporting the Long data type, this seems like a reasonable thing to do.

Brian, would you mind coming up with the patch for the Ganglia context?


Hairong Kuang added a comment - 08/Oct/08 05:40 AM
Thank Brian for submitting a patch to HADOOP-4137 for handling Long type in Ganglia context. I am resubmitting my patch to hudson.

Eric Yang added a comment - 09/Oct/08 04:48 AM
+1 for Hairong's patch. The patch provides real test cases.

Hairong Kuang added a comment - 10/Oct/08 09:19 PM
Resubmit the patch since the hudson patch process is back.

Hadoop QA added a comment - 11/Oct/08 04:22 AM
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12391556/metricsLong1.patch
against trunk revision 703609.

+1 @author. The patch does not contain any @author tags.

+1 tests included. The patch appears to include 3 new or modified tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs warnings.

+1 Eclipse classpath. The patch retains Eclipse classpath integrity.

+1 core tests. The patch passed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3442/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3442/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3442/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3442/console

This message is automatically generated.


Hairong Kuang added a comment - 13/Oct/08 07:23 AM
I just committed this. Thanks Eric!

Hudson added a comment - 13/Oct/08 06:16 PM
Integrated in Hadoop-trunk #632 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/632/)
. The type of dfs datanoe metrics, bytes_read and bytes_written, is changed to be long. Contributed by Eric Yang and Hairong Kuang.