I can execute through setStart and setEnd, but I don’t want to iterate all the rows.
hbase> scan'test-table', {'LIMIT' => 5}
Scan.setMaxResultSize(N) or scan.setMaxResultsPerColumnFamily(N) can be used from the Java API.
> HBase API docs – Scan.setMaxResultSize
> HBase API docs – Scan.setMaxResultsPerColumnFamily
Is there anything similar to SQL LIMIT in HBase? Order?
I can execute through setStart and setEnd, but I don’t want to iterate all the rows.
You can use LIMIT from the HBase shell:
hbase> scan'test-table' , {'LIMIT' => 5}
Scan.setMaxResultSize(N) or scan.setMaxResultsPerColumnFamily(N) can be used from Java API.
> HBase API docs – Scan.setMaxResultSize
> HBase API docs – Scan.setMaxResultsPerColumnFamily