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.

        Attachments

        1. HDFS-4115.patch
          2 kB
          Trevor Robinson

          Activity

            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: