Przeglądaj źródła

HDFS-127. Reset failure count in DFSClient for each block acquiring operation. Contributed by Igor Bolotin

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/trunk@828900 13f79535-47bb-0310-9956-ffa450edef68
Tsz-wo Sze 15 lat temu
rodzic
commit
633077c892
2 zmienionych plików z 8 dodań i 0 usunięć
  1. 5 0
      CHANGES.txt
  2. 3 0
      src/java/org/apache/hadoop/hdfs/DFSClient.java

+ 5 - 0
CHANGES.txt

@@ -439,6 +439,11 @@ Release 0.21.0 - Unreleased
 
 Release 0.20.2 - Unreleased
 
+  IMPROVEMENTS
+
+    HDFS-127. Reset failure count in DFSClient for each block acquiring
+    operation.  (Igor Bolotin via szetszwo)
+
   BUG FIXES
 
     HDFS-686. NullPointerException is thrown while merging edit log and image.

+ 3 - 0
src/java/org/apache/hadoop/hdfs/DFSClient.java

@@ -1879,6 +1879,8 @@ public class DFSClient implements FSConstants, java.io.Closeable {
       //
       DatanodeInfo chosenNode = null;
       int refetchToken = 1; // only need to get a new access token once
+      failures = 0;
+      
       while (true) {
         //
         // Compute desired block
@@ -2108,6 +2110,7 @@ public class DFSClient implements FSConstants, java.io.Closeable {
       //
       Socket dn = null;
       int refetchToken = 1; // only need to get a new access token once
+      failures = 0;
       
       while (true) {
         // cached block locations may have been updated by chooseDataNode()