You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Varun Kapoor (Created) (JIRA)" <ji...@apache.org> on 2012/02/09 21:58:58 UTC

[jira] [Created] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
---------------------------------------------------------------------------------------------------------------

                 Key: HADOOP-8052
                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
             Project: Hadoop Common
          Issue Type: Bug
          Components: metrics
    Affects Versions: 1.0.0, 0.23.0
            Reporter: Varun Kapoor
            Assignee: Varun Kapoor


Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.

When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).

The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.

An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Matt Foley (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Foley updated HADOOP-8052:
-------------------------------

          Resolution: Fixed
       Fix Version/s: 0.23.2
                      1.0.1
    Target Version/s: 1.0.1, 0.23.2  (was: 1.0.1, 0.23.1)
        Hadoop Flags: Reviewed
              Status: Resolved  (was: Patch Available)
    
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Varun Kapoor (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Varun Kapoor updated HADOOP-8052:
---------------------------------

    Attachment: HADOOP-8052.patch

Patch against trunk
                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Varun Kapoor (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Varun Kapoor updated HADOOP-8052:
---------------------------------

    Attachment: HADOOP-8052.patch

Patch against trunk
                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205031#comment-13205031 ] 

Hadoop QA commented on HADOOP-8052:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12514037/HADOOP-8052.patch
  against trunk revision .

    +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 eclipse:eclipse.  The patch built with eclipse:eclipse.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

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

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

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/584//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/584//console

This message is automatically generated.
                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Varun Kapoor (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Varun Kapoor updated HADOOP-8052:
---------------------------------

    Attachment: HADOOP-8052-branch-1.patch

Patch against branch-1
                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Matt Foley (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205040#comment-13205040 ] 

Matt Foley commented on HADOOP-8052:
------------------------------------

+1. Okay, I see now how this is a sufficient fix.  I'm going to comment them so future developers won't think the type/size mismatch is a mistake, then commit to 1.0 and trunk/0.23.  Thanks, Varun!
                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206713#comment-13206713 ] 

Hudson commented on HADOOP-8052:
--------------------------------

Integrated in Hadoop-Mapreduce-0.23-Build #190 (See [https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/190/])
    HADOOP-8052. Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core. Contributed by Varun Kapoor. (Revision 1243206)

     Result = FAILURE
mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1243206
Files : 
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleStat.java

                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Varun Kapoor (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Varun Kapoor updated HADOOP-8052:
---------------------------------

    Target Version/s: 0.23.1, 1.0.1  (was: 1.0.1, 0.23.1)
              Status: Patch Available  (was: Open)
    
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206843#comment-13206843 ] 

Hudson commented on HADOOP-8052:
--------------------------------

Integrated in Hadoop-Hdfs-0.23-Build #167 (See [https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/167/])
    HADOOP-8052. Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core. Contributed by Varun Kapoor. (Revision 1243206)

     Result = FAILURE
mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1243206
Files : 
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleStat.java

                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Mahadev konar (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated HADOOP-8052:
----------------------------------

    Target Version/s: 0.23.1, 1.0.1, 0.23.2  (was: 0.23.2, 1.0.1, 0.23.1)
       Fix Version/s:     (was: 0.23.2)
                      0.23.1

Merged this into 0.23.1.
                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 0.23.1, 1.0.1
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Varun Kapoor (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Varun Kapoor updated HADOOP-8052:
---------------------------------

    Target Version/s: 0.23.1, 1.0.1  (was: 1.0.1, 0.23.1)
              Status: Patch Available  (was: Open)
    
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206642#comment-13206642 ] 

Hudson commented on HADOOP-8052:
--------------------------------

Integrated in Hadoop-Hdfs-trunk-Commit #1792 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1792/])
    HADOOP-8052. Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core. Contributed by Varun Kapoor. (Revision 1243207)

     Result = SUCCESS
mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1243207
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleStat.java

                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206839#comment-13206839 ] 

Hudson commented on HADOOP-8052:
--------------------------------

Integrated in Hadoop-Hdfs-trunk #954 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/954/])
    HADOOP-8052. Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core. Contributed by Varun Kapoor. (Revision 1243207)

     Result = FAILURE
mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1243207
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleStat.java

                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Suresh Srinivas (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-8052:
------------------------------------

    Target Version/s: 0.23.1, 1.0.1, 0.23.2  (was: 0.23.2, 1.0.1)
    
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Varun Kapoor (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Varun Kapoor updated HADOOP-8052:
---------------------------------

    Attachment: HADOOP-8052-branch-1.patch

Patch against branch-1
                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Matt Foley (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13204982#comment-13204982 ] 

Matt Foley commented on HADOOP-8052:
------------------------------------

If the size of the constants is being reduced from double to float, the private variables min and max and the public method max() should also become float, shouldn't they?

Since the inputs can be double, I would also recommend doing clipping functions in appropriate places to prevent NaN ("Infinity") results from over/underflow, eg "if (value > Float.MAX_VALUE) value = Float.MAX_VALUE;" etc., where "value" is a double.
                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206708#comment-13206708 ] 

Hudson commented on HADOOP-8052:
--------------------------------

Integrated in Hadoop-Mapreduce-trunk #987 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/987/])
    HADOOP-8052. Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core. Contributed by Varun Kapoor. (Revision 1243207)

     Result = FAILURE
mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1243207
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleStat.java

                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206636#comment-13206636 ] 

Hudson commented on HADOOP-8052:
--------------------------------

Integrated in Hadoop-Hdfs-0.23-Commit #530 (See [https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/530/])
    HADOOP-8052. Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core. Contributed by Varun Kapoor. (Revision 1243206)

     Result = SUCCESS
mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1243206
Files : 
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleStat.java

                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Varun Kapoor (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Varun Kapoor updated HADOOP-8052:
---------------------------------

    Target Version/s: 0.23.1, 1.0.1  (was: 1.0.1, 0.23.1)
              Status: Open  (was: Patch Available)
    
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206647#comment-13206647 ] 

Hudson commented on HADOOP-8052:
--------------------------------

Integrated in Hadoop-Mapreduce-trunk-Commit #1729 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1729/])
    HADOOP-8052. Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core. Contributed by Varun Kapoor. (Revision 1243207)

     Result = SUCCESS
mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1243207
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleStat.java

                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Varun Kapoor (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205025#comment-13205025 ] 

Varun Kapoor commented on HADOOP-8052:
--------------------------------------

I chose to not change the data type housed in the MinMax class because that would, as is alluded to by your helpful hint about clipping, be a much bigger change with a wider-reaching impact. 

Instead, my justification for just changing the default values of 'max' and 'min' to Float.MIN_VALUE and Float.MAX_VALUE, respectively, is:

a) It is the smallest required change that fixes both problems with gmetad I mentioned in my original description.
b) It will likely be rare that we emit metrics outside of the range of [E-38:E+38], so the regions on the number line outside of that range (that Double.MAX_VALUE and Double.MIN_VALUE provide access to) are not really needed.

Also, I've left the types of the 2 new constants as 'double' in case we ever want to move back to using Double's extremes in the future - my current fix signifies (or at least I hope it does) that the *only* change we're making is in the default values of the 'min' and 'max' fields.
                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206639#comment-13206639 ] 

Hudson commented on HADOOP-8052:
--------------------------------

Integrated in Hadoop-Common-0.23-Commit #542 (See [https://builds.apache.org/job/Hadoop-Common-0.23-Commit/542/])
    HADOOP-8052. Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core. Contributed by Varun Kapoor. (Revision 1243206)

     Result = SUCCESS
mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1243206
Files : 
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleStat.java

                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206640#comment-13206640 ] 

Hudson commented on HADOOP-8052:
--------------------------------

Integrated in Hadoop-Common-trunk-Commit #1718 (See [https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1718/])
    HADOOP-8052. Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core. Contributed by Varun Kapoor. (Revision 1243207)

     Result = SUCCESS
mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1243207
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleStat.java

                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13204897#comment-13204897 ] 

Hadoop QA commented on HADOOP-8052:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12514006/HADOOP-8052.patch
  against trunk revision .

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

    -1 tests included.  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.

    +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 eclipse:eclipse.  The patch built with eclipse:eclipse.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    -1 core tests.  The patch failed these unit tests:
                  org.apache.hadoop.metrics2.util.TestSampleStat

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

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/582//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/582//console

This message is automatically generated.
                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>              Labels: patch
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8052) Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206646#comment-13206646 ] 

Hudson commented on HADOOP-8052:
--------------------------------

Integrated in Hadoop-Mapreduce-0.23-Commit #546 (See [https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/546/])
    HADOOP-8052. Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core. Contributed by Varun Kapoor. (Revision 1243206)

     Result = SUCCESS
mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1243206
Files : 
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleStat.java

                
> Hadoop Metrics2 should emit Float.MAX_VALUE (instead of Double.MAX_VALUE) to avoid making Ganglia's gmetad core
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8052
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8052
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Varun Kapoor
>            Assignee: Varun Kapoor
>             Fix For: 1.0.1, 0.23.2
>
>         Attachments: HADOOP-8052-branch-1.patch, HADOOP-8052-branch-1.patch, HADOOP-8052.patch, HADOOP-8052.patch
>
>
> Ganglia's gmetad converts the doubles emitted by Hadoop's Metrics2 system to strings, and the buffer it uses is 256 bytes wide.
> When the SampleStat.MinMax class (in org.apache.hadoop.metrics2.util) emits its default min value (currently initialized to Double.MAX_VALUE), it ends up causing a buffer overflow in gmetad, which causes it to core, effectively rendering Ganglia useless (for some, the core is continuous; for others who are more fortunate, it's only a one-time Hadoop-startup-time thing).
> The fix needed to Ganglia is simple - the buffer needs to be bumped up to be 512 bytes wide, and all will be well - but instead of requiring a minimum version of Ganglia to work with Hadoop's Metrics2 system, it might be more prudent to just use Float.MAX_VALUE.
> An additional problem caused in librrd (which Ganglia uses beneath-the-covers) by the use of Double.MIN_VALUE (which functions as the default max value) is an underflow when librrd runs the received strings through libc's strtod(), but the librrd code is good enough to check for this, and only emits a warning - moving to Float.MIN_VALUE fixes that as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira