hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1078925 - in /hadoop/hdfs/trunk: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
Date Mon, 07 Mar 2011 20:31:17 GMT
Author: szetszwo
Date: Mon Mar  7 20:31:16 2011
New Revision: 1078925

URL: http://svn.apache.org/viewvc?rev=1078925&view=rev
Log:
HDFS-1665. Balancer misuses dfs.heartbeat.interval as milliseconds.

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=1078925&r1=1078924&r2=1078925&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Mon Mar  7 20:31:16 2011
@@ -600,6 +600,11 @@ 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
 
     HDFS-538. Per the contract elucidated in HADOOP-6201, throw

Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java?rev=1078925&r1=1078924&r2=1078925&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java (original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java Mon Mar
 7 20:31:16 2011
@@ -55,6 +55,7 @@ import org.apache.hadoop.conf.Configurat
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hdfs.DFSClient;
+import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException;
 import org.apache.hadoop.hdfs.protocol.Block;
 import org.apache.hadoop.hdfs.protocol.ClientProtocol;
@@ -67,12 +68,12 @@ import org.apache.hadoop.hdfs.security.t
 import org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys;
 import org.apache.hadoop.hdfs.server.common.HdfsConstants;
 import org.apache.hadoop.hdfs.server.common.Util;
-import org.apache.hadoop.hdfs.server.namenode.NameNode;
 import org.apache.hadoop.hdfs.server.namenode.BlockPlacementPolicy;
 import org.apache.hadoop.hdfs.server.namenode.BlockPlacementPolicyDefault;
+import org.apache.hadoop.hdfs.server.namenode.NameNode;
 import org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException;
-import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol;
 import org.apache.hadoop.hdfs.server.protocol.BlocksWithLocations.BlockWithLocations;
+import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol;
 import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.io.retry.RetryPolicies;
 import org.apache.hadoop.io.retry.RetryPolicy;
@@ -355,9 +356,7 @@ public class Balancer implements Tool {
         IOUtils.closeSocket(sock);
         
         proxySource.removePendingBlock(this);
-        synchronized(target) {
-          target.removePendingBlock(this);
-        }
+        target.removePendingBlock(this);
 
         synchronized (this ) {
           reset();
@@ -1546,7 +1545,9 @@ public class Balancer implements Tool {
         resetData();
         
         try {
-          Thread.sleep(2*conf.getLong("dfs.heartbeat.interval", 3));
+          Thread.sleep(2000*conf.getLong(
+              DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY,
+              DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_DEFAULT));
         } catch (InterruptedException ignored) {
         }
         



Mime
View raw message