accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Fuchs <afu...@apache.org>
Subject Re: Why the Range not find the data
Date Wed, 14 Oct 2015 18:44:20 GMT
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> 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