[
https://issues.apache.org/jira/browse/TEZ-2407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14527144#comment-14527144
]
Gopal V edited comment on TEZ-2407 at 5/4/15 7:49 PM:
------------------------------------------------------
No, the issue is that {{DataInputBuffer::getLength()}} has bad semantics - it
returns capacity instead of length of data.
We are always forced to do {{DataInputBuffer::getLength() -
DataInputBuffer::getPosition()}} to get the accurate value & that's an easy
thing to forget.
Since {{DataInputBuffer}} comes from hadoop, we can't change the original -
however, we can make our code more readable as it is a simple class to replace
& make getLength() meaningful.
was (Author: gopalv):
No, the issue is that {{DataInputBuffer::getLength()}} has bad semantics - it
returns capacity instead of length of data.
Since that comes from hadoop, we can't change the original - however, we can
make our code more readable as it is a simple class to replace & make
getLength() meaningful.
> Drop references to the old DataInputBuffer impl in PipelinedSorter
> ------------------------------------------------------------------
>
> Key: TEZ-2407
> URL: https://issues.apache.org/jira/browse/TEZ-2407
> Project: Apache Tez
> Issue Type: Bug
> Reporter: Rajesh Balamohan
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)