"Cannot restore backup to MetaTable instance in state %s.", state);
LOG.info(String.format("Restoring meta table from backup with %d entries.",
backup.getTables().size()));
for (Map.Entry<String, TableBackup> tableEntry: backup.getTables().entrySet()) {
final String tableName = tableEntry.getKey();
final TableBackup tableBackup = tableEntry.getValue();
Preconditions.checkState(tableName.equals(tableBackup.getName()), String.format(
"Inconsistent table backup: entry '%s' does not match table name '%s'.",
tableName, tableBackup.getName()));
restoreLayoutsFromBackup(tableName, tableBackup.getTableLayoutsBackup());
restoreKeyValuesFromBackup(tableName, tableBackup.getKeyValueBackup());
}
// TODO: Something to flush the C* table?
//mTable.flushCommits();
LOG.info("Flushing commits to tables '{}' and '{}'", mLayoutTable, mKeyValueTable);
}