HDFS-4558 Report

1. Symptom

When starting the balancer, get NullPointerException.

1.1 Severity

Critical

1.2 Was there exception thrown?

Yes. NPE

2. How to reproduce this failure

Simple.

2.0 Version

1.2.0 -- manually reverse the patch.

2.1 Configuration

Standard.

2.2 Reproduction procedure

just “hadoop balancer”

2.3 Can the logs tell how to reproduce the failure?

Yes.

2.4 How many machines needed?

1. 1NN + 1DN

3. Diagnosis procedure

3.1 Detailed Symptom (where you start)

$ hadoop balancer

13/07/21 16:39:13 INFO balancer.Balancer: Ding: balancer.main

13/07/21 16:39:13 INFO balancer.Balancer: Ding: Default balancer constructor

13/07/21 16:39:13 INFO balancer.Balancer: Ding: getConf, conf: null

13/07/21 16:39:13 ERROR balancer.Balancer: java.lang.NullPointerException

        at org.apache.hadoop.hdfs.server.namenode.BlockPlacementPolicy.getInstance(BlockPlacementPolicy.java:165)

        at org.apache.hadoop.hdfs.server.balancer.Balancer.checkReplicationPolicyCompatibility(Balancer.java:799)

        at org.apache.hadoop.hdfs.server.balancer.Balancer.<init>(Balancer.java:809)

        at org.apache.hadoop.hdfs.server.balancer.Balancer.main(Balancer.java:833)

3.2 Backward inference

Conf just null.. The stack pretty much tells.

4. Root cause

Used wrong initialization method.

4.1 Category:

Semantic.