HDFS-5806. Balancer should set soTimeout to avoid indefinite hangs. Contributed by Nathan Roberts.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1560549 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Wang 2014-01-22 22:35:13 +00:00
parent 0377619e7d
commit f7014c473c
2 changed files with 4 additions and 0 deletions

View File

@ -295,6 +295,9 @@ Release 2.4.0 - UNRELEASED
HDFS-5748. Too much information shown in the dfs health page.
(Haohui Mai via brandonli)
HDFS-5806. Balancer should set SoTimeout to avoid indefinite hangs.
(Nathan Roberts via Andrew Wang)
BREAKDOWN OF HDFS-2832 SUBTASKS AND RELATED JIRAS
HDFS-4985. Add storage type to the protocol and expose it in block report

View File

@ -337,6 +337,7 @@ private void dispatch() {
sock.connect(
NetUtils.createSocketAddr(target.datanode.getXferAddr()),
HdfsServerConstants.READ_TIMEOUT);
sock.setSoTimeout(HdfsServerConstants.READ_TIMEOUT);
sock.setKeepAlive(true);
OutputStream unbufOut = sock.getOutputStream();