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

TestBlockManager#testBlockManagerMachinesArray sometimes fails with NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-beta1
    • 2.9.0, 3.0.0-beta1, 2.8.2
    • None
    • None
    • CDH5.12.0

    • 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

        1. HDFS-12112.001.patch
          1 kB
          Wei-Chiu Chuang

        Activity

          People

            weichiu Wei-Chiu Chuang
            weichiu Wei-Chiu Chuang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: