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

TestBlockManager#testBlockManagerMachinesArray sometimes fails with NPE

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-beta1
    • Fix Version/s: 2.9.0, 3.0.0-beta1, 2.8.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      CDH5.12.0

    • Hadoop Flags:
      Reviewed

      Description

      Found the following error:

      java.lang.NullPointerException: null
      at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.testBlockManagerMachinesArray(TestBlockManager.java:1202)

      The NPE suggests corruptStorageDataNode in the following code snippet could be null.

      for(int i=0; i<corruptStorageDataNode.getStorageInfos().length; i++) {
      

      Looking at the code, the test does not wait for file replication to happen, which is why corruptStorageDataNode (the DN of the second replica) is null.

        Attachments

          Activity

            People

            • Assignee:
              jojochuang Wei-Chiu Chuang
              Reporter:
              jojochuang Wei-Chiu Chuang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: