try {
relevantTableNames = SnapshotUtil.retrieveRelevantTableNames(path, nonce);
} catch (Exception e) {
ColumnInfo[] result_columns = new ColumnInfo[2];
int ii = 0;
result_columns[ii++] = new ColumnInfo("RESULT", VoltType.STRING);
result_columns[ii++] = new ColumnInfo("ERR_MSG", VoltType.STRING);
VoltTable results[] = new VoltTable[] { new VoltTable(result_columns) };
results[0].addRow("FAILURE", e.toString());
return results;
}
assert (relevantTableNames != null);
assert (relevantTableNames.size() > 0);
VoltTable[] results = null;
for (String tableName : relevantTableNames) {
if (!savefile_state.getSavedTableNames().contains(tableName)) {
if (results == null) {
ColumnInfo[] result_columns = new ColumnInfo[2];
int ii = 0;
result_columns[ii++] = new ColumnInfo("RESULT", VoltType.STRING);
result_columns[ii++] = new ColumnInfo("ERR_MSG", VoltType.STRING);
results = new VoltTable[] { new VoltTable(result_columns) };
}
results[0].addRow("FAILURE", "Save data contains no information for table " + tableName);
}
final TableSaveFileState saveFileState = savefile_state.getTableState(tableName);
if (saveFileState == null || !saveFileState.isConsistent()) {
if (results == null) {
ColumnInfo[] result_columns = new ColumnInfo[2];
int ii = 0;
result_columns[ii++] = new ColumnInfo("RESULT", VoltType.STRING);
result_columns[ii++] = new ColumnInfo("ERR_MSG", VoltType.STRING);
results = new VoltTable[] { new VoltTable(result_columns) };
}
results[0].addRow("FAILURE", "Save data for " + tableName + " is inconsistent " + "(potentially missing partitions) or corrupted");
}
}