// 4. Wait until the INPUT_SPLIT_ALL_DONE_PATH node has been created
// 5. Process any mutations deriving from add edge requests
// 6. Wait for superstep INPUT_SUPERSTEP to complete.
if (getRestartedSuperstep() != UNSET_SUPERSTEP) {
setCachedSuperstep(getRestartedSuperstep());
return new FinishedSuperstepStats(0, false, 0, 0, true,
CheckpointStatus.NONE);
}
JSONObject jobState = getJobState();
if (jobState != null) {
try {
if ((ApplicationState.valueOf(jobState.getString(JSONOBJ_STATE_KEY)) ==
ApplicationState.START_SUPERSTEP) &&
jobState.getLong(JSONOBJ_SUPERSTEP_KEY) ==
getSuperstep()) {
if (LOG.isInfoEnabled()) {
LOG.info("setup: Restarting from an automated " +
"checkpointed superstep " +
getSuperstep() + ", attempt " +
getApplicationAttempt());
}
setRestartedSuperstep(getSuperstep());
return new FinishedSuperstepStats(0, false, 0, 0, true,
CheckpointStatus.NONE);
}
} catch (JSONException e) {
throw new RuntimeException(
"setup: Failed to get key-values from " +