hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r678915 - in /hadoop/core/trunk: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
Date Tue, 22 Jul 2008 21:34:37 GMT
Author: rangadi
Date: Tue Jul 22 14:34:37 2008
New Revision: 678915

URL: http://svn.apache.org/viewvc?rev=678915&view=rev
Log:
HADOOP-3778. DFSInputStream.seek() did not retry in case of some errors.
(LN via rangadi)

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=678915&r1=678914&r2=678915&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Jul 22 14:34:37 2008
@@ -159,6 +159,9 @@
     HADOOP-3624. Improving createeditslog to create tree directory structure.
     (Lohit Vijayarenu via mahadev)
 
+    HADOOP-3778. DFSInputStream.seek() did not retry in case of some errors.
+    (LN via rangadi)
+
 Release 0.18.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=678915&r1=678914&r2=678915&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 Jul 22 14:34:37 2008
@@ -1617,9 +1617,15 @@
         //
         int diff = (int)(targetPos - pos);
         if (diff <= TCP_WINDOW_SIZE) {
-          pos += blockReader.skip(diff);
-          if (pos == targetPos) {
-            done = true;
+          try {
+            pos += blockReader.skip(diff);
+            if (pos == targetPos) {
+              done = true;
+            }
+          } catch (IOException e) {//make following read to retry
+            LOG.debug("Exception while seek to " + targetPos + " from "
+                      + currentBlock +" of " + src + " from " + currentNode + 
+                      ": " + StringUtils.stringifyException(e));
           }
         }
       }



Mime
View raw message