use of io.prestosql.execution.ExecutionFailureInfo in project hetu-core by openlookeng.
the class HttpRemoteTask method failTask.
/**
* Move the task directly to the failed state if there was a failure in this task
*/
private void failTask(Throwable cause) {
TaskStatus taskStatus = getTaskStatus();
if (!taskStatus.getState().isDone()) {
log.debug(cause, "Remote task %s failed with %s", taskStatus.getSelf(), cause);
}
ExecutionFailureInfo failureInfo = toFailure(cause);
if (SystemSessionProperties.isSnapshotEnabled(session)) {
if (isResumableFailure(failureInfo)) {
// Determine if the failure can be recovered by resuming query from a previous checkpoing
taskStatus = failWith(taskStatus, RESUMABLE_FAILURE, ImmutableList.of(failureInfo));
taskStatusFetcher.updateTaskStatus(taskStatus);
return;
}
log.debug(cause, "Snapshot: remote task %s failed with unresumable error %s", taskStatus.getSelf(), cause);
}
abort(failWith(taskStatus, FAILED, ImmutableList.of(failureInfo)));
}
Aggregations