Oh, sorry, Josh is right. My explanation is similar, and would apply if you had specified the cq as well as the cf. I misread your code and did not notice you had not specified cq in your range.
On Wed, Oct 14, 2015 at 10:53 AM Christopher <[email protected]> wrote: > The end key you've chosen in the first case occur before any of your data: > > The key is composed of: row, column family, column qualifier, column > visibility, and timestamp. You've selected a key which would include > everything up to, and including the column visibility, but the default > timestamp it uses (Long.MAX_VALUE) would occur before any of your data > (timestamps sort in reverse order to show most recent first). You can view > timestamps with -st or --show-timestamps option on your scan command in the > shell. Your data likely has a real timestamp (less than Long.MAX_VALUE) and > would sort after. > > What you probably want is to specify the end key's CF as "cf0\0". > > 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. >> >
