hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stack <st...@duboce.net>
Subject Re: Order table keys by user defined comparator rather than byte[]
Date Mon, 30 Mar 2009 20:23:06 GMT
Currently, you can only have one comparator per hbase instance.   You can't
do a comparator per table (or per columnfamily) because all tables come
together in the catalog tables; .META. and -ROOT-.  Here there is an entry
per table region.  If the comparator used sorting rows in the .META. were
different from that used in a particular table, it'd make for odd results.

Since only one comparator, we've no provision for putting in place a
comparator other than the default lexicograhical sort.

That said, it might be possible to change the comparator used as you crossed
tables in the .META. table but its not something we've spent any time on.

If you'd like to pursue this, let us know what you need and we'll make
provision -- adding specification of an alternate comparator to use wouldn't
be hard to do.


On Mon, Mar 30, 2009 at 5:46 PM, Ding, Hui <hui.ding@sap.com> wrote:

> Hi,
> Is it possible to order keys of tables by other user defined comparators
> rather than the byte[] comparator?
> This can give more flexibility and intelligence about data organization
> in a table.
> Is this functionality already available (I briefly looked at the
> packages and couldn't find anything). If not, do you think it makes
> sense to add it?
> Cheers,
> Hui

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message