Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11447

Add a more meaningful toString method to SampleStat and MutableStat

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: metrics
    • Labels:
      None
    • Target Version/s:

      Description

      SampleStat and MutableStat don't override the toString method. A more meaningful implementation could help with debugging.

      1. hadoop-11447-2.patch
        1 kB
        Karthik Kambatla
      2. hadoop-11447-1.patch
        1 kB
        Karthik Kambatla

        Activity

        Hide
        kasha Karthik Kambatla added a comment -

        Simple patch that adds the toString methods. I don't think we need tests for this patch.

        Show
        kasha Karthik Kambatla added a comment - Simple patch that adds the toString methods. I don't think we need tests for this patch.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12688951/hadoop-11447-1.patch
        against trunk revision 66cfe1d.

        +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 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        -1 findbugs. The patch appears to introduce 3 new Findbugs (version 2.0.3) 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 hadoop-common-project/hadoop-common.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5336//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/5336//artifact/patchprocess/newPatchFindbugsWarningshadoop-common.html
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5336//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12688951/hadoop-11447-1.patch against trunk revision 66cfe1d. +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 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. -1 findbugs . The patch appears to introduce 3 new Findbugs (version 2.0.3) 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 hadoop-common-project/hadoop-common. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5336//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/5336//artifact/patchprocess/newPatchFindbugsWarningshadoop-common.html Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5336//console This message is automatically generated.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        Are you confident that things like variance & stddev are never going to raise errors -or should that string construction be caught & downgraded to a super.toString()? There's nothing worse than logging triggering strack traces

        Show
        stevel@apache.org Steve Loughran added a comment - Are you confident that things like variance & stddev are never going to raise errors -or should that string construction be caught & downgraded to a super.toString()? There's nothing worse than logging triggering strack traces
        Hide
        kasha Karthik Kambatla added a comment -

        Thanks Steve. Updated patch to catch any errors and return super.toString.

        In case of such an error, MutableStat would end up returning the reference of SampleStat. I don't think that is common enough for more elaborate handling.

        Show
        kasha Karthik Kambatla added a comment - Thanks Steve. Updated patch to catch any errors and return super.toString. In case of such an error, MutableStat would end up returning the reference of SampleStat. I don't think that is common enough for more elaborate handling.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12691344/hadoop-11447-2.patch
        against trunk revision ae91b13.

        +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 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) 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 hadoop-common-project/hadoop-common.

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

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12691344/hadoop-11447-2.patch against trunk revision ae91b13. +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 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) 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 hadoop-common-project/hadoop-common. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5388//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5388//console This message is automatically generated.
        Hide
        kasha Karthik Kambatla added a comment -

        Steve Loughran, could you take a look at the latest patch? Thanks.

        Show
        kasha Karthik Kambatla added a comment - Steve Loughran , could you take a look at the latest patch? Thanks.
        Hide
        rkanter Robert Kanter added a comment -

        +1 pending Steve Loughran

        Show
        rkanter Robert Kanter added a comment - +1 pending Steve Loughran
        Hide
        kasha Karthik Kambatla added a comment -

        Steve Loughran - are you okay with the latest patch here?

        Show
        kasha Karthik Kambatla added a comment - Steve Loughran - are you okay with the latest patch here?
        Hide
        kasha Karthik Kambatla added a comment -

        Steve Loughran - ping.

        Robert Kanter - are you comfortable with me committing this without a +1 from Steve?

        Show
        kasha Karthik Kambatla added a comment - Steve Loughran - ping. Robert Kanter - are you comfortable with me committing this without a +1 from Steve?
        Hide
        rkanter Robert Kanter added a comment -

        Sure; go ahead.

        Show
        rkanter Robert Kanter added a comment - Sure; go ahead.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12691344/hadoop-11447-2.patch
        against trunk revision 586348e.

        +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 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) 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 hadoop-common-project/hadoop-common.

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

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12691344/hadoop-11447-2.patch against trunk revision 586348e. +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 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) 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 hadoop-common-project/hadoop-common. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5977//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5977//console This message is automatically generated.
        Hide
        kasha Karthik Kambatla added a comment -

        Thanks for your reviews, Robert and Steve. Just committed this to trunk and branch-2.

        Show
        kasha Karthik Kambatla added a comment - Thanks for your reviews, Robert and Steve. Just committed this to trunk and branch-2.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #7390 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7390/)
        HADOOP-11447. Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7390 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7390/ ) HADOOP-11447 . Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #139 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/139/)
        HADOOP-11447. Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #139 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/139/ ) HADOOP-11447 . Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #873 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/873/)
        HADOOP-11447. Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #873 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/873/ ) HADOOP-11447 . Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2089 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2089/)
        HADOOP-11447. Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2089 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2089/ ) HADOOP-11447 . Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2071 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2071/)
        HADOOP-11447. Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2071 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2071/ ) HADOOP-11447 . Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #130 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/130/)
        HADOOP-11447. Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #130 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/130/ ) HADOOP-11447 . Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #139 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/139/)
        HADOOP-11447. Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #139 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/139/ ) HADOOP-11447 . Add a more meaningful toString method to SampleStat and MutableStat. (kasha) (kasha: rev fe5c23b670c773145b87fecfaf9191536e9f1c51) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/SampleStat.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableStat.java

          People

          • Assignee:
            kasha Karthik Kambatla
            Reporter:
            kasha Karthik Kambatla
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development