hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r706799 - in /hadoop/core/branches/branch-0.18: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/DFSClient.java
Date Tue, 21 Oct 2008 22:25:10 GMT
Author: hairong
Date: Tue Oct 21 15:25:08 2008
New Revision: 706799

URL: http://svn.apache.org/viewvc?rev=706799&view=rev
Log:
Merge -r 706795:706796 from trunk to main to move the change log of HADOOP-3914.

Modified:
    hadoop/core/branches/branch-0.18/CHANGES.txt
    hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DFSClient.java

Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=706799&r1=706798&r2=706799&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Tue Oct 21 15:25:08 2008
@@ -36,6 +36,9 @@
 
     HADOOP-4469. Rename and add the ant task jar file to the tar file. (nigel)
 
+    HADOOP-3914. DFSClient sends Checksum Ok only once for a block.
+    (Christain Kunz via hairong)
+
   NEW FEATURES
 
     HADOOP-2421.  Add jdiff output to documentation, listing all API

Modified: hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DFSClient.java?rev=706799&r1=706798&r2=706799&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DFSClient.java (original)
+++ hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DFSClient.java Tue Oct
21 15:25:08 2008
@@ -823,6 +823,7 @@
     private int bytesPerChecksum;
     private int checksumSize;
     private boolean gotEOS = false;
+    private boolean sentChecksumOk = false;
     
     byte[] skipBuf = null;
     ByteBuffer checksumBytes = null;
@@ -857,8 +858,15 @@
       
       int nRead = super.read(buf, off, len);
       if (nRead >= 0 && gotEOS && needChecksum()) {
-        //checksum is verified and there are no errors.
-        checksumOk(dnSock);
+        if (sentChecksumOk) {
+           // this should not happen; log the error for the debugging purpose
+           LOG.info(StringUtils.stringifyException(new IOException(
+             "Checksum ok was sent and should not be sent again")));  
+        } else {
+          //checksum is verified and there are no errors.
+          checksumOk(dnSock);
+          sentChecksumOk = true;
+       }
       }
       return nRead;
     }



Mime
View raw message