Browse Source

HDFS-1665. Balancer misuses dfs.heartbeat.interval as milliseconds.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/branches/HDFS-1052@1078924 13f79535-47bb-0310-9956-ffa450edef68
Tsz-wo Sze 14 years ago
parent
commit
91c0783d3b
2 changed files with 7 additions and 5 deletions
  1. 3 0
      CHANGES.txt
  2. 4 5
      src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java

+ 3 - 0
CHANGES.txt

@@ -680,6 +680,9 @@ Release 0.21.1 - Unreleased
     HDFS-1189. Quota counts missed between clear quota and set quota.
     (John George via szetszwo)
 
+    HDFS-1665. Balancer misuses dfs.heartbeat.interval as milliseconds.
+    (szetszwo)
+
 Release 0.21.0 - 2010-08-13
 
   INCOMPATIBLE CHANGES

+ 4 - 5
src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java

@@ -331,9 +331,7 @@ public class Balancer {
         IOUtils.closeSocket(sock);
         
         proxySource.removePendingBlock(this);
-        synchronized(target) {
-          target.removePendingBlock(this);
-        }
+        target.removePendingBlock(this);
 
         synchronized (this ) {
           reset();
@@ -1380,8 +1378,9 @@ public class Balancer {
    */
   static int run(List<InetSocketAddress> namenodes, final Parameters p,
       Configuration conf) throws IOException, InterruptedException {
-    final long sleeptime = 2*conf.getLong(
-        DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 3);
+    final long sleeptime = 2000*conf.getLong(
+        DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY,
+        DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_DEFAULT);
     LOG.info("namenodes = " + namenodes);
     LOG.info("p         = " + p);