Display strings using HBase

Is there a way to do pagination in HBase based on rowkeys?

I wanted to have the same effect as in SQL with SELECT * FROM table LIMIT 10 OFFSET 10 .

If this is not possible, what is the best way to tune my strings for the correct query?

+4
source share
2 answers

You can use PageFilter for this . When you create an instance of PageFilter, you specify the pageSize parameter, which determines how many lines per page should be returned.

Filter Filter = new PageFilter (10);

And if you want to do this through the HBase shell, you can use LIMIT with a SCAN request:

scan table, LIMIT => 10

+5
source

How about using a ColumnPaginationFilter?

 scan 't1', {FILTER => org.apache.hadoop.hbase.filter.ColumnPaginationFilter.new(<count>, <start_offset>)} 
0
source

Source: https://habr.com/ru/post/1494587/


All Articles