hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Douglas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-3602) DataInputBuffer::getLength returns the end position, not the length
Date Thu, 19 Jun 2008 23:57:45 GMT

    [ 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.

View raw message