VoltTable[] savefile_data;
savefile_data = performRestoreScanWork(path, nonce);
//LOG.trace("Restore Scan Results "+savefile_data[0]);
ClusterSaveFileState savefile_state = null;
try {
savefile_state = new ClusterSaveFileState(savefile_data[0], execution_context, (int) allowExport);
} catch (IOException e) {
throw new VoltAbortException(e.getMessage());
}
List<String> relevantTableNames = null;
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);