Return-Path: Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: (qmail 92448 invoked from network); 13 Nov 2009 23:38:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Nov 2009 23:38:04 -0000 Received: (qmail 56888 invoked by uid 500); 13 Nov 2009 23:38:04 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 56842 invoked by uid 500); 13 Nov 2009 23:38:04 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 56832 invoked by uid 99); 13 Nov 2009 23:38:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Nov 2009 23:38:04 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Nov 2009 23:38:02 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4E126234C4D6 for ; Fri, 13 Nov 2009 15:37:42 -0800 (PST) Message-ID: <2130383095.1258155462318.JavaMail.jira@brutus> Date: Fri, 13 Nov 2009 23:37:42 +0000 (UTC) From: "Tsz Wo (Nicholas), SZE (JIRA)" To: hdfs-issues@hadoop.apache.org Subject: [jira] Updated: (HDFS-772) DFSClient.getFileChecksum(..) computes file md5 with extra padding In-Reply-To: <2037854689.1258147239861.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tsz Wo (Nicholas), SZE updated HDFS-772: ---------------------------------------- Attachment: h772_20091113.patch h772_20091113.patch: use md5out.getLength() to limit the data. > DFSClient.getFileChecksum(..) computes file md5 with extra padding > ------------------------------------------------------------------ > > Key: HDFS-772 > URL: https://issues.apache.org/jira/browse/HDFS-772 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs client > Affects Versions: 0.20.1 > Reporter: Tsz Wo (Nicholas), SZE > Attachments: h772_20091113.patch > > > {code} > //DFSClient.getFileChecksum(..) > final MD5Hash fileMD5 = MD5Hash.digest(md5out.getData()); > {code} > The fileMD5 is computed with the entire byte array returning by md5out.getData(). However, data are valid only up to md5out.getLength(). Therefore, the currently implementation of the algorithm compute fileMD5 with extra padding. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.