[
https://issues.apache.org/jira/browse/HBASE-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570357#action_12570357
]
stack commented on HBASE-82:
----------------------------
Are you referring to BasicTypeSorterBase Kevin? I see compares of
WritableComparables but not of byte arrays (Unless you are talking of the inner
Comparator class)? Mind supplying a pointer to where bytes are compared?
A comparator that does byte arrays will be pretty slow thinking on it; wouldn't
you have to create instances of the classes you want to compare on each
invocation of the compare? Would that work for jaql? This seems to be how
bdbje would do it. The objects it passes to Comparator.compare are two byte
arrays. Then, "If you know how your data is organized in the byte array, then
you can write a comparison routine that directly examines the contents of the
arrays. Otherwise, you have to reconstruct your original objects, and then
perform the comparison. ").
> [hbase] VOTE: should row keys be less restrictive than hadoop.io.Text?
> ----------------------------------------------------------------------
>
> Key: HBASE-82
> URL: https://issues.apache.org/jira/browse/HBASE-82
> Project: Hadoop HBase
> Issue Type: Wish
> Reporter: Jim Kellerman
>
> I have heard from several people that row keys in HBase should be less
> restricted than hadoop.io.Text.
> What do you think?
> At the very least, a row key has to be a WritableComparable. This would lead
> to the most general case being either hadoop.io.BytesWritable or
> hbase.io.ImmutableBytesWritable. The primary difference between these two
> classes is that hadoop.io.BytesWritable by default allocates 100 bytes and if
> you do not pay attention to the length, (BytesWritable.getSize()), converting
> a String to a BytesWritable and vice versa can become problematic.
> hbase.io.ImmutableBytesWritable, in contrast only allocates as many bytes as
> you pass in and then does not allow the size to be changed.
> If we were to change from Text to a non-text key, my preference would be for
> ImmutableBytesWritable, because it has a fixed size once set, and operations
> like get, etc do not have to something like System.arrayCopy where you
> specify the number of bytes to copy.
> Your comments, questions are welcome on this issue. If we receive enough
> feedback that Text is too restrictive, we are willing to change it, but we
> need to hear what would be the most useful thing to change it to as well.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.