public static KeyExtent fixSplit(ServerContext context, Text metadataEntry,
SortedMap<ColumnFQ,Value> columns, ZooLock lock) throws AccumuloException {
log.info("Incomplete split {} attempting to fix", metadataEntry);
Value oper = columns.get(TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN);
if (columns.get(TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN) == null) {
throw new IllegalArgumentException(
"Metadata entry does not have split ratio (" + metadataEntry + ")");
}
double splitRatio = Double.parseDouble(
new String(columns.get(TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN).get(), UTF_8));
Value prevEndRowIBW = columns.get(TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN);
if (prevEndRowIBW == null) {
throw new IllegalArgumentException(
"Metadata entry does not have prev row (" + metadataEntry + ")");
}
Value time = columns.get(TabletsSection.ServerColumnFamily.TIME_COLUMN);
if (time == null) {
throw new IllegalArgumentException(
"Metadata entry does not have time (" + metadataEntry + ")");
}
Text metadataPrevEndRow = KeyExtent.decodePrevEndRow(prevEndRowIBW);
Table.ID tableId = (new KeyExtent(metadataEntry, (Text) null)).getTableId();
return fixSplit(context, tableId, metadataEntry, metadataPrevEndRow, oper, splitRatio, lock);
}