[ 
https://issues.apache.org/jira/browse/HADOOP-3046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580127#action_12580127
 ] 

Doug Cutting commented on HADOOP-3046:
--------------------------------------

The length passed includes the bytes that encode the prefixed length, so we'll 
need to account for that.  a length of 128 means a 1 byte prefix + 127 byte 
payload, 130 = 2 prefix + 128 payload, 129 should never happen, etc.  Right?

> Text and BytesWritable's raw comparators should use the lengths provided 
> instead of rebuilding them from scratch using readInt
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-3046
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3046
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Owen O'Malley
>            Assignee: Owen O'Malley
>             Fix For: 0.17.0
>
>
> It would be much faster to use the key length provided by the raw compare 
> function rather than rebuilding the integer lengths back up from bytes twice 
> for every comparison in the sort.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to