How to list all row keys in an hbase table?

hbase_user picture hbase_user · Mar 8, 2011 · Viewed 9.6k times · Source

How do I list all row keys in an hbase table?

I need to do this using PHP with a REST interface.

Answer

David picture David · Mar 9, 2011

If you are listing all of the keys in an HBase table, then you are using the wrong tool. HBase is for large data systems where it is impractical to list all of the keys.

What may be more sensible is to start at a given key and list the next N keys (for values of N less than 10K). There are nice Java interfaces for doing this type of thing with a scan -- setting a start key and/or an end key.

Most HBase functionality is exposed via the Thrift interface. I would suggest looking there