Thanks, that's much simpler. I looked into the API docs for the Key class and found a way to get it down to just: scan.setRange(new Range(new Key(entityUID, startTime), new Key(entityUID, endTime)));
Unfortunately, that doesn't return any results. Is the scan inclusive? Is it not including the byte array values that is messing it up? I know the problem isn't with the connection because scanning the table without any range values from my program works. On Thu, Jul 17, 2014 at 11:09 AM, Josh Elser <[email protected]> wrote: > Sure is. Just provide a start Key and end Key. > > scan.setRange(new Range(new Key(singleRowId.getBytes(), > startTime.getBytes(), "0".getBytes()), true, new > Key(singleRowId.getBytes(), endTime.getBytes(), "1".getBytes()), true); > > The range spans the single row you are interested in, and you can specify > up to the column qualifier for the start and end key. If you don't specify > the visibility of timestamp, you would end up getting all key-values > (cv,timestamp,value) between those two keys. > > > On 7/17/14, 11:03 AM, Ryan wrote: > >> Hi, I'm learning Accumulo and am attempting to write a Java client that >> scans over an Accumulo table using a single row id and a range of column >> families. Going through the API, the closest thing I've found to this >> feature is the 'bound method: >> >> scan.setRange(new Range(entity).bound(new Column(startTime.getBytes(), >> "0".getBytes(), "public".getBytes()), new Column(endTime.getBytes(), >> "1".getBytes(), "public".getBytes()))); >> >> Is there a simpler way to do this without a need to include the >> visibility or column qualifier? >> >> The API version I'm using is 1.5.1. >> >
