throw new UnknownScannerException("Name: " + scannerName);
}
this.leases.renewLease(scannerId, scannerId);
// Collect values to be returned here
HbaseMapWritable values = new HbaseMapWritable();
HStoreKey key = new HStoreKey();
TreeMap<Text, byte []> results = new TreeMap<Text, byte []>();
while (s.next(key, results)) {
for(Map.Entry<Text, byte []> e: results.entrySet()) {
values.put(new HStoreKey(key.getRow(), e.getKey(), key.getTimestamp()),
new ImmutableBytesWritable(e.getValue()));
}
if(values.size() > 0) {
// Row has something in it. Return the value.
break;
}
// No data for this row, go get another.
results.clear();
}
return values.size() == 0 ? null : values;
} catch (IOException e) {
checkFileSystem();
throw e;
}