accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lu Qin <luq.j...@gmail.com>
Subject Re: Why the Range not find the data
Date Thu, 15 Oct 2015 02:56:14 GMT

Thanks all.I have solve it by Range.exact

> 在 2015年10月15日,02:44,Adam Fuchs <afuchs@apache.org> 写道:
> 
> Try using the Range.exact(...) and Range.prefix(...) helper methods to generate specific
ranges. Key.followingKey(...) might also be helpful.
> 
> Cheers,
> Adam
> 
> On Wed, Oct 14, 2015 at 9:59 AM, Lu Qin <luq.java@gmail.com <mailto:luq.java@gmail.com>>
wrote:
> In my accumulo cluster ,the table has this data:
> 0 cf0:cq0 []    v0
> 1 cf1:cq1 []    v1
> 
> then I use scan to find it like this:
> ranges.add(new Range(new Key(new Text("0"), new Text("cf0")), true,
>                      new Key(new Text("0"), new Text("cf0")), true));
> but it tell me #results=0.
> 
>  If i code like this:
> ranges.add(new Range(new Key(new Text("0"), new Text("cf0")), true,
>                      new Key(new Text("0"), new Text("cf00")), true));
> it works OK.
> 
> 
> api show me if I set true ,it will include the start and end key.Why I can not find the
data ?
> 
> Thanks.
> 


Mime
View raw message