Browse Source

HDFS-1705. Balancer command throws NullPointerException. Contributed by suresh

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/branches/HDFS-1052@1076479 13f79535-47bb-0310-9956-ffa450edef68
Tsz-wo Sze 14 năm trước cách đây
mục cha
commit
2933010e4b

+ 3 - 0
CHANGES.txt

@@ -171,6 +171,9 @@ Trunk (unreleased changes)
 
     HDFS-1680. Fix TestBalancer. (szetszwo)
 
+    HDFS-1705. Balancer command throws NullPointerException. (suresh via
+    szetszwo)
+
 Release 0.22.0 - Unreleased
 
   NEW FEATURES

+ 1 - 6
src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java

@@ -1461,17 +1461,12 @@ public class Balancer {
   }
 
   static class Cli extends Configured implements Tool {
-    @Override
-    public void setConf(Configuration conf) {
-      super.setConf(conf);
-      WIN_WIDTH = conf.getLong("dfs.balancer.movedWinWidth", WIN_WIDTH);
-    }
-
     /** Parse arguments and then run Balancer */
     @Override
     public int run(String[] args) {
       final long startTime = Util.now();
       final Configuration conf = getConf();
+      WIN_WIDTH = conf.getLong("dfs.balancer.movedWinWidth", WIN_WIDTH);
 
       try {
         checkReplicationPolicyCompatibility(conf);