hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r708724 - in /hadoop/core/branches/branch-0.19: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
Date Tue, 28 Oct 2008 23:33:41 GMT
Author: rangadi
Date: Tue Oct 28 16:33:40 2008
New Revision: 708724

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

Modified:
    hadoop/core/branches/branch-0.19/CHANGES.txt   (contents, props changed)
    hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=708724&r1=708723&r2=708724&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Tue Oct 28 16:33:40 2008
@@ -962,6 +962,8 @@
     HADOOP-4525. Fix ipc.server.ipcnodelay originally missed in in HADOOP-2232.
     (cdouglas via Clint Morgan)
 
+    HADOOP-4499. DFSClient should invoke checksumOk only once. (Raghu Angadi)
+
 Release 0.18.2 - Unreleased
 
   BUG FIXES

Propchange: hadoop/core/branches/branch-0.19/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Oct 28 16:33:40 2008
@@ -0,0 +1 @@
+/hadoop/core/trunk/CHANGES.txt:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398,703923,704203,704261,704701,704703,704707,704712,704732,704748,704989,705391,705420,705430,705762,706350,706707,706719,706796,706802,707258,707262,708623,708641,708710,708723

Modified: hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java?rev=708724&r1=708723&r2=708724&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java (original)
+++ hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java Tue Oct
28 16:33:40 2008
@@ -1024,7 +1024,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;
@@ -1057,12 +1057,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