You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sz...@apache.org on 2012/05/29 23:08:23 UTC
svn commit: r1343992 - in /hadoop/common/branches/branch-1: CHANGES.txt
src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
Author: szetszwo
Date: Tue May 29 21:08:22 2012
New Revision: 1343992
URL: http://svn.apache.org/viewvc?rev=1343992&view=rev
Log:
HADOOP-5464. DFSClient did not treat write timeout of 0 properly. Contributed by Raghu Angadi and Brandon Li
Modified:
hadoop/common/branches/branch-1/CHANGES.txt
hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1343992&r1=1343991&r2=1343992&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Tue May 29 21:08:22 2012
@@ -251,6 +251,9 @@ Release 1.1.0 - unreleased
HDFS-3453. HDFS 1.x client is not interoperable with pre 1.x server.
(Kihwal Lee via suresh)
+
+ HADOOP-5464. DFSClient did not treat write timeout of 0 properly.
+ (Raghu Angadi and Brandon Li via szetszwo)
Release 1.0.3 - 2012.05.07
Modified: hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java?rev=1343992&r1=1343991&r2=1343992&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java (original)
+++ hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java Tue May 29 21:08:22 2012
@@ -3527,14 +3527,16 @@ public class DFSClient implements FSCons
final String dnName = nodes[0].getName(connectToDnViaHostname);
InetSocketAddress target = NetUtils.createSocketAddr(dnName);
s = socketFactory.createSocket();
- timeoutValue = 3000 * nodes.length + socketTimeout;
+ timeoutValue = (socketTimeout > 0) ?
+ (3000 * nodes.length + socketTimeout) : 0;
LOG.debug("Connecting to " + dnName);
NetUtils.connect(s, target, getRandomLocalInterfaceAddr(), timeoutValue);
s.setSoTimeout(timeoutValue);
s.setSendBufferSize(DEFAULT_DATA_SOCKET_SIZE);
LOG.debug("Send buf size " + s.getSendBufferSize());
- long writeTimeout = HdfsConstants.WRITE_TIMEOUT_EXTENSION * nodes.length +
- datanodeWriteTimeout;
+ long writeTimeout = (datanodeWriteTimeout > 0) ?
+ (HdfsConstants.WRITE_TIMEOUT_EXTENSION * nodes.length +
+ datanodeWriteTimeout) : 0;
//
// Xmit header info to datanode