hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vajrakumar" <vajra.ku...@pointcross.com>
Subject RE: Paging On HBASE like solr
Date Thu, 22 Nov 2012 10:16:22 GMT
Hello Doug,
First of all thanks for taking time to reply.

As per my knowledge goes  below two lines take the rowkey as a parameter for
representing start and end.

scan.setStartRow( Bytes.toBytes("row"));                   // start key is
scan.setStopRow( Bytes.toBytes("row" +  (char)0));  // stop key is exclusive

In my case irrespective of rowkey I need 100 rows always. If I go with this
concept if 5 rows are deleted in between 1 to 100 then it will give me 95
but not 100.
But for me always I need 100 (I mean rowCount whatever I pass) rows.

And as after usage there may be deletions of rows or adding and all on DB, I
can't keep track of rows for this paging..
Paging needs a fixed number of rows in each page always.

-----Original Message-----
From: Doug Meil [mailto:doug.meil@explorysmedical.com] 
Sent: 22 November 2012 00:21
To: user@hbase.apache.org
Subject: Re: Paging On HBASE like solr 

Hi there,

Pretty similar approach with Hbase.  See the Scan class.


On 11/21/12 1:04 PM, "Vajrakumar" <vajra.kumar@pointcross.com> wrote:

>Hello all,
>As we do paging in solr using start and rowCount I need to implement 
>same through hbase.
>In Detail:
>I have 1000 rows data which I need to display in 10 pages each page 
>containing 100 rows.
>So on click of next page we will send current rowStart
>(1,101,201,301,401,501...) and rowCount (100 for all the pages) to a 
>method which will query hbase and return me the result.
>One solution is to always query more than rowCount starting from th 
>rowkey of last passed row, and in a for loop count depending on row key 
>and return when it becomes 100 (i.e., rowCount) . But its poor solution 
>i know.
>Thanks in advance.
>Sent from Samsung Mobile

View raw message