hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Ganesan <vi...@scaligent.com>
Subject Pagination with HBase - getting previous page of data
Date Fri, 25 Jan 2013 04:58:58 GMT
I'm displaying rows of data from a HBase table in a data grid UI. The grid
shows 25 rows at a time i.e. it is paginated. User can click on
Next/Previous to paginate through the data 25 rows at a time. I can
implement Next easily by setting a HBase
org.apache.hadoop.hbase.filter.PageFilter and setting startRow on the
org.apache.hadoop.hbase.client.Scan to be the row id of the next batch's
row that is sent to the UI with the previous batch. However, I can't seem
to be able to do the same with Previous. I can set the endRow on the Scan
to be the row id of the last row of the previous batch but since HBase
Scans are always in the forward direction, there is no way to set a
PageFilter that can get 25 rows ending at a particular row. The only option
seems to be to get *all* rows up to the end row and filter out all but the
last 25 in the caller, which seems very inefficient. Any ideas on how this
can be done efficiently?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message