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 <[email protected]> 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. >
