}
static Value checkTabletMetadata(KeyExtent extent, TServerInstance instance, SortedMap<Key,Value> tabletsKeyValues, Text metadataEntry)
throws AccumuloException {
TServerInstance future = null;
Value prevEndRow = null;
Value dir = null;
Value time = null;
for (Entry<Key,Value> entry : tabletsKeyValues.entrySet()) {
Key key = entry.getKey();
if (!metadataEntry.equals(key.getRow())) {
log.info("Unexpected row in tablet metadata " + metadataEntry + " " + key.getRow());
return null;
}
Text cf = key.getColumnFamily();
if (cf.equals(Constants.METADATA_FUTURE_LOCATION_COLUMN_FAMILY)) {
if (future != null) {
throw new AccumuloException("Tablet has multiple future locations " + extent);
}
future = new TServerInstance(entry.getValue(), key.getColumnQualifier());
} else if (cf.equals(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY)) {
log.info("Tablet seems to be already assigned to " + new TServerInstance(entry.getValue(), key.getColumnQualifier()));
return null;
} else if (Constants.METADATA_PREV_ROW_COLUMN.hasColumns(key)) {
prevEndRow = entry.getValue();
} else if (Constants.METADATA_DIRECTORY_COLUMN.hasColumns(key)) {
dir = entry.getValue();