opts.parseArgs(Verify.class.getName(), args);
Scanner scanner = opts.getConnector().createScanner(opts.tableName, opts.auths);
scanner.fetchColumnFamily(BulkPlusOne.CHECK_COLUMN_FAMILY);
Text startBadRow = null;
Text lastBadRow = null;
Value currentBadValue = null;
for (Entry<Key,Value> entry : scanner) {
// System.out.println("Entry: " + entry);
byte[] value = entry.getValue().get();
if (!Arrays.equals(value, zero)) {
if (currentBadValue == null || entry.getValue().equals(currentBadValue)) {
// same value, keep skipping ahead
lastBadRow = new Text(entry.getKey().getRow());
if (startBadRow == null)
startBadRow = lastBadRow;
} else {
// new bad value, report
report(startBadRow, lastBadRow, currentBadValue);
startBadRow = lastBadRow = new Text(entry.getKey().getRow());
}
currentBadValue = new Value(entry.getValue());
} else {
// end of bad range, report
if (startBadRow != null) {
report(startBadRow, lastBadRow, currentBadValue);
}