You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Mauro Murari (JIRA)" <ji...@apache.org> on 2015/02/02 23:33:35 UTC

[jira] [Assigned] (HADOOP-3602) DataInputBuffer::getLength returns the end position, not the length

     [ https://issues.apache.org/jira/browse/HADOOP-3602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mauro Murari reassigned HADOOP-3602:
------------------------------------

    Assignee: Mauro Murari

> DataInputBuffer::getLength returns the end position, not the length
> -------------------------------------------------------------------
>
>                 Key: HADOOP-3602
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3602
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Chris Douglas
>            Assignee: Mauro Murari
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)