assertTrue("[seek check " + (i) + " ]" , i == tuple.get(1).asInt4());
}
// The below is for testing RangeRetrieverHandler.
RangeRetrieverHandler handler = new RangeRetrieverHandler(
new File(new Path(workDir, "output").toUri()), keySchema, comp);
Map<String,List<String>> kvs = Maps.newHashMap();
Tuple startTuple = new VTuple(1);
startTuple.put(0, DatumFactory.createInt4(50));
kvs.put("start", Lists.newArrayList(
new String(Base64.encodeBase64(
RowStoreUtil.RowStoreEncoder.toBytes(keySchema, startTuple), false))));
Tuple endTuple = new VTuple(1);
endTuple.put(0, DatumFactory.createInt4(80));
kvs.put("end", Lists.newArrayList(
new String(Base64.encodeBase64(
RowStoreUtil.RowStoreEncoder.toBytes(keySchema, endTuple), false))));
FileChunk chunk = handler.get(kvs);
scanner.seek(chunk.startOffset());
keytuple = scanner.next();
assertEquals(50, keytuple.get(1).asInt4());