HDFS-4807. createSocketForPipeline() should not include timeout extension on connect. Contributed by Cristina Abad.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1485861 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kihwal Lee 2013-05-23 21:35:32 +00:00
parent 10d21ac779
commit 2ad7397c49
2 changed files with 4 additions and 1 deletions

View File

@ -3068,6 +3068,9 @@ Release 0.23.8 - UNRELEASED
HDFS-3875. Issue handling checksum errors in write pipeline. (kihwal)
HDFS-4807. createSocketForPipeline() should not include timeout extension
on connect. (Cristina L. Abad via kihwal)
Release 0.23.7 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -1290,7 +1290,7 @@ public class DFSOutputStream extends FSOutputSummer implements Syncable {
final InetSocketAddress isa = NetUtils.createSocketAddr(dnAddr);
final Socket sock = client.socketFactory.createSocket();
final int timeout = client.getDatanodeReadTimeout(length);
NetUtils.connect(sock, isa, client.getRandomLocalInterfaceAddr(), timeout);
NetUtils.connect(sock, isa, client.getRandomLocalInterfaceAddr(), client.getConf().socketTimeout);
sock.setSoTimeout(timeout);
sock.setSendBufferSize(HdfsConstants.DEFAULT_DATA_SOCKET_SIZE);
if(DFSClient.LOG.isDebugEnabled()) {