Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-4355

TestNameNodeMetrics.testCorruptBlock fails with open JDK7

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1-win
    • Fix Version/s: 1.2.0
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Argument(s) are different! Wanted:
      metricsRecordBuilder.addGauge(
      "CorruptBlocks",
      <any>,
      1
      );
      -> at org.apache.hadoop.test.MetricsAsserts.assertGauge(MetricsAsserts.java:96)
      Actual invocation has different arguments:
      metricsRecordBuilder.addGauge(
      "FilesTotal",
      "",
      4
      );
      -> at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getMetrics(FSNamesystem.java:5818)

      at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
      at org.apache.hadoop.test.MetricsAsserts.assertGauge(MetricsAsserts.java:96)
      at org.apache.hadoop.hdfs.server.namenode.metrics.TestNameNodeMetrics.testCorruptBlock(TestNameNodeMetrics.java:160)

      The test should cleanup the filesystem to avoid the pending blocks left by other tests.

      1. HDFS-4355.patch
        8 kB
        Brandon Li
      2. HDFS-4355.patch
        1 kB
        Brandon Li

        Activity

        Hide
        Suresh Srinivas added a comment -

        Can you describe the changes you have made?

        Show
        Suresh Srinivas added a comment - Can you describe the changes you have made?
        Hide
        Brandon Li added a comment -

        Sorry, uploaded a wrong path.

        Show
        Brandon Li added a comment - Sorry, uploaded a wrong path.
        Hide
        Brandon Li added a comment -

        The patch just cleans up the namespace before test in testcorruptBlock() so it won't be affected by possible pending blocks left by other tests.

        Also corrected a comment.

        Show
        Brandon Li added a comment - The patch just cleans up the namespace before test in testcorruptBlock() so it won't be affected by possible pending blocks left by other tests. Also corrected a comment.
        Hide
        Suresh Srinivas added a comment -

        +1 for the change.

        Show
        Suresh Srinivas added a comment - +1 for the change.
        Hide
        Suresh Srinivas added a comment -

        I committed the patch to branch-1. Thank you Brandon.

        Show
        Suresh Srinivas added a comment - I committed the patch to branch-1. Thank you Brandon.
        Hide
        Matt Foley added a comment -

        Closed upon release of Hadoop 1.2.0.

        Show
        Matt Foley added a comment - Closed upon release of Hadoop 1.2.0.

          People

          • Assignee:
            Brandon Li
            Reporter:
            Brandon Li
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development