Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 297 invoked from network); 19 Jun 2008 23:58:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2008 23:58:07 -0000 Received: (qmail 39260 invoked by uid 500); 19 Jun 2008 23:58:07 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 39225 invoked by uid 500); 19 Jun 2008 23:58:07 -0000 Mailing-List: contact core-dev-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-dev@hadoop.apache.org Received: (qmail 39214 invoked by uid 99); 19 Jun 2008 23:58:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 16:58:07 -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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 23:57:26 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 013D5234C146 for ; Thu, 19 Jun 2008 16:57:45 -0700 (PDT) Message-ID: <1914877727.1213919865004.JavaMail.jira@brutus> Date: Thu, 19 Jun 2008 16:57:45 -0700 (PDT) From: "Chris Douglas (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-3602) DataInputBuffer::getLength returns the end position, not the length In-Reply-To: <1303420198.1213919144921.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606602#action_12606602 ] Chris Douglas commented on HADOOP-3602: --------------------------------------- This seems like a documentation bug rather than a flaw in DataInputBuffer. > DataInputBuffer::getLength returns the end position, not the length > ------------------------------------------------------------------- > > Key: HADOOP-3602 > URL: https://issues.apache.org/jira/browse/HADOOP-3602 > Project: Hadoop Core > Issue Type: Bug > Reporter: Chris Douglas > > In DataInputBuffer, a call to reset(byte[] buffer, offset, len) resets the data read by the buffer. However, when the offset is not zero, getLength returns the index marking the end of valid data in the buffer and not the length as specified in the last call to reset. The consequence is that consumers of DataInputBuffers may inaccurately gauge the length of the input given them. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.