Return-Path: Delivered-To: apmail-hadoop-core-commits-archive@www.apache.org Received: (qmail 73274 invoked from network); 21 Oct 2008 22:25:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Oct 2008 22:25:32 -0000 Received: (qmail 23197 invoked by uid 500); 21 Oct 2008 22:25:34 -0000 Delivered-To: apmail-hadoop-core-commits-archive@hadoop.apache.org Received: (qmail 23163 invoked by uid 500); 21 Oct 2008 22:25:34 -0000 Mailing-List: contact core-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-commits@hadoop.apache.org Received: (qmail 23154 invoked by uid 99); 21 Oct 2008 22:25:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2008 15:25:34 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2008 22:24:32 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3837C2388878; Tue, 21 Oct 2008 15:25:11 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: core-commits@hadoop.apache.org From: hairong@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081021222511.3837C2388878@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; }