hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r711715 - in /hadoop/core/branches/branch-0.18: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/DFSClient.java
Date Wed, 05 Nov 2008 22:08:19 GMT
Author: rangadi
Date: Wed Nov  5 14:08:18 2008
New Revision: 711715

URL: http://svn.apache.org/viewvc?rev=711715&view=rev
Log:
HADOOP-4499. DFSClient should invoke checksumOk only once. (Raghu Angadi)

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=711715&r1=711714&r2=711715&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Wed Nov  5 14:08:18 2008
@@ -1,5 +1,11 @@
 Hadoop Change Log
 
+Release 0.18.3 - Unreleased
+
+  BUG FIXES
+
+    HADOOP-4499. DFSClient should invoke checksumOk only once. (Raghu Angadi)
+
 Release 0.18.2 - 2008-11-03
 
   BUG FIXES

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=711715&r1=711714&r2=711715&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 Wed Nov
 5 14:08:18 2008
@@ -823,7 +823,7 @@
     private int bytesPerChecksum;
     private int checksumSize;
     private boolean gotEOS = false;
-    private boolean sentChecksumOk = false;
+    private boolean sentChecksumOk = false; //temp : to be removed in 0.20.0
     
     byte[] skipBuf = null;
     ByteBuffer checksumBytes = null;
@@ -856,12 +856,15 @@
         }
       }
       
+      boolean eosBefore = gotEOS;
       int nRead = super.read(buf, off, len);
-      if (nRead >= 0 && gotEOS && needChecksum()) {
+      
+      // if gotEOS was set in the previous read and checksum is enabled :
+      if (gotEOS && !eosBefore && nRead >= 0 && needChecksum())
{
         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")));  
+             "Checksum ok was sent and should not be sent again"))); 
         } else {
           //checksum is verified and there are no errors.
           checksumOk(dnSock);



Mime
View raw message