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

Balancer throws NPE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.4.1
    • Fix Version/s: None
    • Component/s: balancer & mover
    • Labels:
      None

      Description

      Balancer may throw NPE because the following if Statements at line 709 of Balancer.java

                synchronized (block) {
                  // update locations
                  for (String datanodeUuid : blk.getDatanodeUuids()) {
                    final BalancerDatanode d = datanodeMap.get(datanodeUuid);
                    if (datanode != null) { // not an unknown datanode
                      block.addLocation(d);
                    }
                  }
                }
      

      Before moving block, Balancer divides into two step to get all DNs info & some blocks of DN from NN. Regarding one DN commission after getDatanodeReport then getBlockList and one block's target is above DN just right, It will throw NPE when dispatcher.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hexiaoqiao Xiaoqiao He
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: