).build();
final KijiTableReader reader = table.openTableReader();
try {
// Fire up a row scanner!
final KijiRowScanner scanner = reader.getScanner(dataRequest);
try {
// There is a small enough amount of data that we can just put all of the rows into a hash
// from entity ID to row data.
HashMap<EntityId, KijiRowData> allData = new HashMap<EntityId, KijiRowData>();
for (KijiRowData row : scanner) {
EntityId eid = row.getEntityId();
assert (!allData.containsKey(eid));
allData.put(eid, row);
}
assertTrue(allData.containsKey(alice));
assertTrue(allData.containsKey(bob));
assertTrue(allData.containsKey(cathy));
assertTrue(allData.containsKey(david));
assertTrue(allData.get(alice).containsColumn(pets, cat));
assertTrue(allData.get(alice).containsColumn(pets, dog));
assertFalse(allData.get(alice).containsColumn(pets, rabbit));
assertFalse(allData.get(alice).containsColumn(pets, fish));
assertFalse(allData.get(alice).containsColumn(pets, bird));
assertTrue(allData.get(bob).containsColumn(pets, cat));
assertTrue(allData.get(bob).containsColumn(pets, rabbit));
assertFalse(allData.get(bob).containsColumn(pets, dog));
assertFalse(allData.get(bob).containsColumn(pets, fish));
assertFalse(allData.get(bob).containsColumn(pets, bird));
assertTrue(allData.get(cathy).containsColumn(pets, cat));
assertTrue(allData.get(cathy).containsColumn(pets, fish));
assertFalse(allData.get(cathy).containsColumn(pets, dog));
assertFalse(allData.get(cathy).containsColumn(pets, rabbit));
assertFalse(allData.get(cathy).containsColumn(pets, bird));
assertTrue(allData.get(david).containsColumn(pets, cat));
assertTrue(allData.get(david).containsColumn(pets, bird));
assertFalse(allData.get(david).containsColumn(pets, dog));
assertFalse(allData.get(david).containsColumn(pets, rabbit));
assertFalse(allData.get(david).containsColumn(pets, fish));
} finally {
scanner.close();
}
} finally {
reader.close();
}
} finally {