options.setStartRow(eid);
final KijiRowScanner scanner = reader.getScanner(dataRequest, options);
try {
final Iterator<KijiRowData> itr = scanner.iterator();
if (itr.hasNext()) {
final KijiRowData scanData = itr.next();
if (scanData.getEntityId().equals(eid)) {
return scanData;
}
}
// Fall back to normal get (should be empty);
final KijiRowData getData = reader.get(eid, dataRequest);
for (final Column columnRequest : dataRequest.getColumns()) {
if (!columnRequest.isPagingEnabled()) {
final KijiColumnName column = columnRequest.getColumnName();
if (column.isFullyQualified()) {
Preconditions.checkState(
getData.getCells(column.getFamily(), column.getQualifier()).isEmpty(),
"Fell back to a get of a non-empty row.");
} else {
final FamilyLayout family = table.getLayout().getFamilyMap().get(column.getFamily());
if (family.isMapType()) {
Preconditions.checkState(getData.getCells(columnRequest.getFamily()).isEmpty(),
"Fell back to a get of a non-empty row.");
} else {
for (final String qualifier : family.getColumnMap().keySet()) {
Preconditions.checkState(
getData.getCells(columnRequest.getFamily(), qualifier).isEmpty(),
"Fell back to a get of a non-empty row.");
}
}
}
}