[ 
https://issues.apache.org/jira/browse/HBASE-7887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13582335#comment-13582335
 ] 

stack commented on HBASE-7887:
------------------------------

bq. Current ByteArrayComparator couldn't be used to sort number if exists 
negative number.(Because the bytes of -1 is bigger than the bytes of any other 
number)

Tell  me more about this [~zjushch]  Where is the -1?

In the past we've just said this is not possible because all tables come 
together in the .META. table and here, it would be untenable having a 
comparator per table; how would the sort of the .META. table run?  (Switch in a 
new comparator whenever we cross into a new table section in .META.?)

                
> Support configuring KeyValue Comparator at table level
> ------------------------------------------------------
>
>                 Key: HBASE-7887
>                 URL: https://issues.apache.org/jira/browse/HBASE-7887
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver
>    Affects Versions: 0.96.0
>            Reporter: chunhui shen
>            Assignee: chunhui shen
>             Fix For: 0.96.0
>
>
> Now, KeyValue Comparator is static by code in HRegionInfo
> {code}
>   public KVComparator getComparator() {
>     return isRootRegion()? KeyValue.ROOT_COMPARATOR: isMetaRegion()?
>       KeyValue.META_COMPARATOR: KeyValue.COMPARATOR;
>   }
> {code}
> In some user cases, we need a personalized KeyValue Comparator.
> e.g. Current ByteArrayComparator couldn't be used to sort number if exists 
> negative number.(Because the bytes of -1 is bigger than the bytes of any 
> other number)
> I think supporting per-table configuration of KeyValue Comparator would be 
> useful.
> Welcome comments,
> I will make the patch tomorrow.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to