List<ExecutionFailureInfo> failures = ImmutableList.of(); if (state == TaskState.FAILED) { failures = toFailures(taskStateMachine.getFailureCauses());
List<ExecutionFailureInfo> failures = ImmutableList.of(); if (state == FAILED) { failures = toFailures(taskStateMachine.getFailureCauses());
public static ExecutionFailureInfo toFailure(Throwable failure) { if (failure == null) { return null; } // todo prevent looping with suppressed cause loops and such String type; if (failure instanceof Failure) { type = ((Failure) failure).getType(); } else { type = failure.getClass().getCanonicalName(); } return new ExecutionFailureInfo(type, failure.getMessage(), toFailure(failure.getCause()), toFailures(asList(failure.getSuppressed())), Lists.transform(asList(failure.getStackTrace()), toStringFunction()), getErrorLocation(failure), toErrorCode(failure)); }
List<ExecutionFailureInfo> failures = ImmutableList.of(); if (state == TaskState.FAILED) { failures = toFailures(taskStateMachine.getFailureCauses());
@Override public TaskInfo getTaskInfo() { TaskState state = taskStateMachine.getState(); List<ExecutionFailureInfo> failures = ImmutableList.of(); if (state == TaskState.FAILED) { failures = toFailures(taskStateMachine.getFailureCauses()); } return new TaskInfo( taskStateMachine.getTaskId(), TASK_INSTANCE_ID, nextTaskInfoVersion.getAndIncrement(), state, location, DateTime.now(), sharedBuffer.getInfo(), ImmutableSet.<PlanNodeId>of(), taskContext.getTaskStats(), failures, true); }