You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Oleg Ruchovets <or...@gmail.com> on 2012/03/23 21:30:00 UTC
hbase schema row_key only
Hi ,
I my case hbase table has only row key.
The way I add a record to hbase is:
.................
Put put = new Put(keyBytes);
put.add(Bytes.toBytes(familyName) , HConstants.EMPTY_BYTE_ARRAY ,
HConstants.EMPTY_BYTE_ARRAY);
..................
My questions is about internal implementation using row key only table
records.
1) As I understand column family internally represents a file , but in my
case I enter nothing to the column family ( actually I enter empty
qualifier:value pairs).
I can't find any details about how rowkeys is stores. Any information
about storing rowkeys will be very helpful.
2) Does rowkey only table solution scale? Has this solution any
limitation regarding scans (for example if I want to scan all rows which
rowkey starts with "abc") ?
Thanks in advance.
Oleg.
Re: hbase schema row_key only
Posted by Jean-Daniel Cryans <jd...@apache.org>.
> 1) As I understand column family internally represents a file , but in my
> case I enter nothing to the column family ( actually I enter empty
> qualifier:value pairs).
> I can't find any details about how rowkeys is stores. Any information
> about storing rowkeys will be very helpful.
Right now a key in hbase is row_key+family+qualifier+timestamp, as
long as you have that you can store 0 byte values and you're all fine.
But you can't just store a row key, it doesn't stand alone.
> 2) Does rowkey only table solution scale? Has this solution any
> limitation regarding scans (for example if I want to scan all rows which
> rowkey starts with "abc") ?
That still works even you store "nothing" in the cell.
J-D