hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r760574 - in /hadoop/core/trunk: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
Date Tue, 31 Mar 2009 19:39:33 GMT
Author: rangadi
Date: Tue Mar 31 19:39:33 2009
New Revision: 760574

URL: http://svn.apache.org/viewvc?rev=760574&view=rev
Log:
HADOOP-5464. DFSClient did not treat write timeout of 0 properly. (Raghu Angadi)

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=760574&r1=760573&r2=760574&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Mar 31 19:39:33 2009
@@ -345,6 +345,9 @@
     HADOOP-5198. Fixes a problem to do with the task PID file being absent and 
     the JvmManager trying to look for it. (Amareshwari Sriramadasu via ddas)
 
+    HADOOP-5464. DFSClient did not treat write timeout of 0 properly.
+    (Raghu Angadi)
+
 Release 0.20.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java?rev=760574&r1=760573&r2=760574&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java Tue Mar 31 19:39:33 2009
@@ -2756,13 +2756,15 @@
         LOG.debug("Connecting to " + nodes[0].getName());
         InetSocketAddress target = NetUtils.createSocketAddr(nodes[0].getName());
         s = socketFactory.createSocket();
-        int timeoutValue = 3000 * nodes.length + socketTimeout;
+        int timeoutValue = (socketTimeout > 0) ? 
+                           (3000 * nodes.length + socketTimeout) : 0;
         NetUtils.connect(s, target, 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



Mime
View raw message