Author: jlowe Date: Wed Feb 26 20:15:57 2014 New Revision: 1572228 URL: http://svn.apache.org/r1572228 Log: HDFS-5806. balancer should set SoTimeout to avoid indefinite hangs. Contributed by Nathan Roberts
Modified: hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java Modified: hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1572228&r1=1572227&r2=1572228&view=diff ============================================================================== --- hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original) +++ hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Wed Feb 26 20:15:57 2014 @@ -11,8 +11,12 @@ Release 0.23.11 - UNRELEASED OPTIMIZATIONS BUG FIXES + HDFS-5881. Fix skip() of the short-circuit local reader(legacy). (kihwal) + HDFS-5806. balancer should set SoTimeout to avoid indefinite hangs (Nathan + Roberts via jlowe) + Release 0.23.10 - 2013-12-09 INCOMPATIBLE CHANGES Modified: hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java?rev=1572228&r1=1572227&r2=1572228&view=diff ============================================================================== --- hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java (original) +++ hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java Wed Feb 26 20:15:57 2014 @@ -307,6 +307,7 @@ public class Balancer { sock.connect(NetUtils.createSocketAddr( target.datanode.getName()), HdfsServerConstants.READ_TIMEOUT); sock.setKeepAlive(true); + sock.setSoTimeout(HdfsServerConstants.READ_TIMEOUT); out = new DataOutputStream( new BufferedOutputStream( sock.getOutputStream(), HdfsConstants.IO_FILE_BUFFER_SIZE)); sendRequest(out);