hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Schubert Zhang <zson...@gmail.com>
Subject How about to give more flexibility to RowKey (customized comparator and serializer)
Date Thu, 30 Dec 2010 03:36:33 GMT
In our application, we want to build a index htable to a core htable, and
the key of the index includes multiple columns in the core htable.

for example:

The core table:
RowKey -> column1, column2, column3, column4
Note:  The length of column1 and column2 is irregular.

The index table:
RowKey -> col1, col2, col3

But the RowKey of the index table is composed by column1 and column2 in the
core table.

So, I propose a following feature for HBase:
The RowKey of HBase support flexibility customization. i.e.
(1) Support used defined comparator of RowKey, then the order of rows can be
customized by user.
(2) Support used defined serializer of RowKey, then the bytes of rowkey can
be customized by user.

and i.e. maybe we can provide a following java class for RowKey:

interface RowKey implements Writable, Comparable {

}

Then application can implement its own RowKey class, and tell the HBase when
create htable.

Schubert Zhang

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