Can anybody tell me, how to list all row keys in an hbase table?
相关问题
- Joining two ResultSets from HBase in Java?
- Save CSV file to hbase table using Spark and Phoen
- hbase as database in web application
- thrift hbase client - support filters and coproces
- How to get the region in HBASE which is struck in
相关文章
- hbase-client 2.0.x error
- use protobuf3 with some lib which depends on proto
- Latest compatible version of hadoop and hbase
- Create table in hbase
- Connecting to remote HBase service using Java
- Connecting and Persisting to HBase
- How to configure hbase in spark?
- In Hadoop, where can i change default url ports 50
It seems that you want to use HBase thrift client in PHP. Here is a sample code and you can get all data in HBase and get their row keys.
The HBase shell could be used to list all the row keys:
When performing a table scan where only the row keys are needed (no families, qualifiers, values or timestamps), add a FilterList with a MUST_PASS_ALL operator to the scanner using setFilter. The filter list should include both a FirstKeyOnlyFilter and a KeyOnlyFilter. Using this filter combination will result in a worst case scenario of a RegionServer reading a single value from disk and minimal network traffic to the client for a single row.
Use the getRow method of Result class. Its description says:
Assuming
table
is your hbase table and you are connected to your HBase instance, all you need to do is:I understand that this has already been answered from Java API point of view but a little more detail never hurt anyone.
This should be considerably faster (the FirstKeyOnlyFilter is run on the server and strips all the column data before sending the result to the client):