Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4115

TestHDFSCLI.testAll fails one test due to number format

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: test
    • Labels:
      None
    • Environment:
    • Hadoop Flags:
      Reviewed

      Description

      This test fails repeatedly on only one of my machines:

      Failed tests:   testAll(org.apache.hadoop.cli.TestHDFSCLI): One of the tests failed. See the Detailed results to identify the command that failed
      
                 Test ID: [587]
        Test Description: [report: Displays the report about the Datanodes]
           Test Commands: [-fs hdfs://localhost:35254 -report]
              Comparator: [RegexpComparator]
      Comparision result:   [fail]
         Expected output:   [Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)]
           Actual output:   [Configured Capacity: 472446337024 (440 GB)
      

      The problem appears to be that StringUtils.byteDesc calls limitDecimalTo2 which calls DecimalFormat.format with a pattern of #.##. This pattern does not include trailing zeroes, so the expected regex is incorrect in requiring a decimal.

      1. HDFS-4115.patch
        2 kB
        Trevor Robinson

        Activity

        Hide
        twu Tony Wu added a comment -

        Hi Suresh Srinivas, Jing Zhao & Trevor Robinson,

        I ran into this error when running branch-2 TestHDFSCLI. To my surprise this patch was not ported to branch-2. Could you take a quick look and consider backporting the patch?

        Thanks,
        Tony

        Show
        twu Tony Wu added a comment - Hi Suresh Srinivas , Jing Zhao & Trevor Robinson , I ran into this error when running branch-2 TestHDFSCLI. To my surprise this patch was not ported to branch-2. Could you take a quick look and consider backporting the patch? Thanks, Tony
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1240 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1240/)
        HDFS-4115. TestHDFSCLI.testAll fails one test due to number format. Contributed by Trevor Robinson. (Revision 1403074)

        Result = FAILURE
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1403074
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1240 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1240/ ) HDFS-4115 . TestHDFSCLI.testAll fails one test due to number format. Contributed by Trevor Robinson. (Revision 1403074) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1403074 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1210 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1210/)
        HDFS-4115. TestHDFSCLI.testAll fails one test due to number format. Contributed by Trevor Robinson. (Revision 1403074)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1403074
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1210 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1210/ ) HDFS-4115 . TestHDFSCLI.testAll fails one test due to number format. Contributed by Trevor Robinson. (Revision 1403074) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1403074 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Yarn-trunk #20 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/20/)
        HDFS-4115. TestHDFSCLI.testAll fails one test due to number format. Contributed by Trevor Robinson. (Revision 1403074)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1403074
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Yarn-trunk #20 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/20/ ) HDFS-4115 . TestHDFSCLI.testAll fails one test due to number format. Contributed by Trevor Robinson. (Revision 1403074) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1403074 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-trunk-Commit #2935 (See https://builds.apache.org/job/Hadoop-trunk-Commit/2935/)
        HDFS-4115. TestHDFSCLI.testAll fails one test due to number format. Contributed by Trevor Robinson. (Revision 1403074)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1403074
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
        Show
        hudson Hudson added a comment - Integrated in Hadoop-trunk-Commit #2935 (See https://builds.apache.org/job/Hadoop-trunk-Commit/2935/ ) HDFS-4115 . TestHDFSCLI.testAll fails one test due to number format. Contributed by Trevor Robinson. (Revision 1403074) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1403074 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
        Hide
        sureshms Suresh Srinivas added a comment -

        +1 for the patch. I committed it to trunk.

        Thank you Trevor.

        Show
        sureshms Suresh Srinivas added a comment - +1 for the patch. I committed it to trunk. Thank you Trevor.
        Hide
        jingzhao Jing Zhao added a comment -

        The patch looks good. +1 for the patch.

        Show
        jingzhao Jing Zhao added a comment - The patch looks good. +1 for the patch.
        Hide
        scurrilous Trevor Robinson added a comment -

        Changed regex for "Configured Capacity" in testHDFSConf.xml to match other capacity regexes in not requiring a decimal.

        Show
        scurrilous Trevor Robinson added a comment - Changed regex for "Configured Capacity" in testHDFSConf.xml to match other capacity regexes in not requiring a decimal.
        Hide
        sureshms Suresh Srinivas added a comment -

        Trevor, if you have time, could you post a patch? I will help review it and commit it.

        Show
        sureshms Suresh Srinivas added a comment - Trevor, if you have time, could you post a patch? I will help review it and commit it.

          People

          • Assignee:
            scurrilous Trevor Robinson
            Reporter:
            scurrilous Trevor Robinson
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development