You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Sachin <sc...@gmail.com> on 2015/04/22 12:56:00 UTC

scan startrow and stoprow

My rowkey format is uniqueid|timestamp|randomnumber.

I want to retrieve data from hbase by using scanner with java api where my 
startRow : aabb|timeStamp1| 

stopRow is : aabb|timeStamp2|*any_number

timeStamp1 and timeStamp2 are time ranges. So I want to fetch all values in 
between above timestamp where my *any_number can be anything it's * in 
regular expression. So my start and stop rows become :

startRow : aabb|timeStamp1| 

stopRow is : aabb|timeStamp2|*

I set these param to scan object but its not fetching data from hbase. Can 
anyone tell me how to do that?


Re: scan startrow and stoprow

Posted by Ted Yu <yu...@gmail.com>.
Character '*' precedes character '0'
Probably that was why some rows were not returned. 

How long is the third component (number) normally ?

Cheers



> On Apr 22, 2015, at 3:56 AM, Sachin <sc...@gmail.com> wrote:
> 
> My rowkey format is uniqueid|timestamp|randomnumber.
> 
> I want to retrieve data from hbase by using scanner with java api where my 
> startRow : aabb|timeStamp1| 
> 
> stopRow is : aabb|timeStamp2|*any_number
> 
> timeStamp1 and timeStamp2 are time ranges. So I want to fetch all values in 
> between above timestamp where my *any_number can be anything it's * in 
> regular expression. So my start and stop rows become :
> 
> startRow : aabb|timeStamp1| 
> 
> stopRow is : aabb|timeStamp2|*
> 
> I set these param to scan object but its not fetching data from hbase. Can 
> anyone tell me how to do that?
>