hadoop-common-issues 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-6381) WritableUtils::*VLong utilities should be available for byte arrays
Date Thu, 19 Nov 2009 23:37:39 GMT

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

Chris Douglas commented on HADOOP-6381:
---------------------------------------

Frankly, we're all just speculating on the relative efficiency of querying the DIB position
before and after the vint read and doing the decode, but I think we'd all agree that any difference
is probably not significant (if we need an efficiency use case, sorting by vint length avoids
the DIB costs). Again, the purpose of this is to require less than the set of steps to do
this correctly now: creating the RawComparator with the DIB, including the arithmetic in the
compare, clearing the reference to the array in the DIB after the compare, and (optionally)
handling thread safety. Instead of requiring users to figure this out on their own, adding
a utility method to decode the bytes seems merciful to me.

On the other hand, we've lived without a set of static, byte[]-oriented DataInput functions
that would admit identical arguments. If RawComparators are an advanced feature (in need of
better documentation?) or something better handled transparently by Avro, Jute, et al. then
perhaps the user that would appreciate these doesn't exist.

> WritableUtils::*VLong utilities should be available for byte arrays
> -------------------------------------------------------------------
>
>                 Key: HADOOP-6381
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6381
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: util
>            Reporter: Chris Douglas
>            Priority: Minor
>         Attachments: C6381-0.patch, C6381-1.patch, C6381-2.patch
>
>
> Particularly when working with raw bytes in Writables, it is often useful to have versions
of the vint utility functions for byte arrays.

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


Mime
View raw message