/**
* Create a new reader from the split, and match the edits against the passed columns.
*/
private void testSplit(InputSplit split, byte[]... columns) throws Exception {
HLogRecordReader reader = new HLogRecordReader();
reader.initialize(split, MapReduceTestUtil.createDummyMapTaskAttemptContext(conf));
for (byte[] column : columns) {
assertTrue(reader.nextKeyValue());
KeyValue kv = reader.getCurrentValue().getKeyValues().get(0);
if (!Bytes.equals(column, kv.getQualifier())) {
assertTrue("expected [" + Bytes.toString(column) + "], actual ["
+ Bytes.toString(kv.getQualifier()) + "]", false);
}
}
assertFalse(reader.nextKeyValue());
reader.close();
}