Does HBase have any command that works like SQL LIMIT query?
SQL LIMIT
I can do it by setStart and setEnd, but I do not want to iterate all
setStart
setEnd
From the HBase shell you can use LIMIT:
hbase> scan 'test-table', {'LIMIT' => 5}
From the Java API you can use Scan.setMaxResultSize(N) or scan.setMaxResultsPerColumnFamily(N).
Scan.setMaxResultSize(N)
scan.setMaxResultsPerColumnFamily(N)