@Override public void updateTaskExecutionState(final TaskExecutionState taskExecutionState) { if (taskExecutionState.getExecutionState().isTerminal()) { runAsync(() -> unregisterTaskAndNotifyFinalState(jobMasterGateway, taskExecutionState.getID())); } else { TaskExecutor.this.updateTaskExecutionState(jobMasterGateway, taskExecutionState); } } }
@Override public void updateTaskExecutionState(final TaskExecutionState taskExecutionState) { if (taskExecutionState.getExecutionState().isTerminal()) { runAsync(() -> unregisterTaskAndNotifyFinalState(jobMasterGateway, taskExecutionState.getID())); } else { TaskExecutor.this.updateTaskExecutionState(jobMasterGateway, taskExecutionState); } } }
private void updateTaskExecutionState( final UUID jobMasterLeaderId, final JobMasterGateway jobMasterGateway, final TaskExecutionState taskExecutionState) { final ExecutionAttemptID executionAttemptID = taskExecutionState.getID(); Future<Acknowledge> futureAcknowledge = jobMasterGateway.updateTaskExecutionState( jobMasterLeaderId, taskExecutionState); futureAcknowledge.exceptionallyAsync(new ApplyFunction<Throwable, Void>() { @Override public Void apply(Throwable value) { failTask(executionAttemptID, value); return null; } }, getMainThreadExecutor()); }
private void updateTaskExecutionState( final JobMasterGateway jobMasterGateway, final TaskExecutionState taskExecutionState) { final ExecutionAttemptID executionAttemptID = taskExecutionState.getID(); CompletableFuture<Acknowledge> futureAcknowledge = jobMasterGateway.updateTaskExecutionState(taskExecutionState); futureAcknowledge.whenCompleteAsync( (ack, throwable) -> { if (throwable != null) { failTask(executionAttemptID, throwable); } }, getMainThreadExecutor()); }
/** * Updates the task execution state for a given task. * * @param taskExecutionState New task execution state for a given task * @return Acknowledge the task execution state update */ @Override public CompletableFuture<Acknowledge> updateTaskExecutionState( final TaskExecutionState taskExecutionState) { checkNotNull(taskExecutionState, "taskExecutionState"); if (executionGraph.updateState(taskExecutionState)) { return CompletableFuture.completedFuture(Acknowledge.get()); } else { return FutureUtils.completedExceptionally( new ExecutionGraphException("The execution attempt " + taskExecutionState.getID() + " was not found.")); } }
private void updateTaskExecutionState( final JobMasterGateway jobMasterGateway, final TaskExecutionState taskExecutionState) { final ExecutionAttemptID executionAttemptID = taskExecutionState.getID(); CompletableFuture<Acknowledge> futureAcknowledge = jobMasterGateway.updateTaskExecutionState(taskExecutionState); futureAcknowledge.whenCompleteAsync( (ack, throwable) -> { if (throwable != null) { failTask(executionAttemptID, throwable); } }, getMainThreadExecutor()); }
/** * Updates the task execution state for a given task. * * @param taskExecutionState New task execution state for a given task * @return Acknowledge the task execution state update */ @Override public CompletableFuture<Acknowledge> updateTaskExecutionState( final TaskExecutionState taskExecutionState) { checkNotNull(taskExecutionState, "taskExecutionState"); if (executionGraph.updateState(taskExecutionState)) { return CompletableFuture.completedFuture(Acknowledge.get()); } else { return FutureUtils.completedExceptionally( new ExecutionGraphException("The execution attempt " + taskExecutionState.getID() + " was not found.")); } }
@Override public void updateTaskExecutionState(TaskExecutionState taskExecutionState) { final TaskMessages.TaskMessage taskMessage; if (taskExecutionState.getExecutionState().isTerminal()) { taskMessage = new TaskMessages.TaskInFinalState(taskExecutionState.getID()); } else { taskMessage = new TaskMessages.UpdateTaskExecutionState(taskExecutionState); } actorGateway.tell(taskMessage); } }
@Override public void updateTaskExecutionState(TaskExecutionState taskExecutionState) { final TaskMessages.TaskMessage taskMessage; if (taskExecutionState.getExecutionState().isTerminal()) { taskMessage = new TaskMessages.TaskInFinalState(taskExecutionState.getID()); } else { taskMessage = new TaskMessages.UpdateTaskExecutionState(taskExecutionState); } actorGateway.tell(taskMessage); } }
/** * Updates the task execution state for a given task. * * @param taskExecutionState New task execution state for a given task * @return Acknowledge the task execution state update */ @Override public CompletableFuture<Acknowledge> updateTaskExecutionState( final TaskExecutionState taskExecutionState) { checkNotNull(taskExecutionState, "taskExecutionState"); if (graphManager.isReconciling()) { return FutureUtils.completedExceptionally( new JobMasterException("The job master is reconciling with task executors.")); } if (executionGraph.updateState(taskExecutionState)) { return CompletableFuture.completedFuture(Acknowledge.get()); } else { return FutureUtils.completedExceptionally( new ExecutionGraphException("The execution attempt " + taskExecutionState.getID() + " was not found.")); } }
/** * Updates the task execution state for a given task. * * @param taskExecutionState New task execution state for a given task * @return Acknowledge the task execution state update */ @RpcMethod public Acknowledge updateTaskExecutionState( final UUID leaderSessionID, final TaskExecutionState taskExecutionState) throws Exception { checkNotNull(taskExecutionState, "taskExecutionState"); validateLeaderSessionId(leaderSessionID); if (executionGraph.updateState(taskExecutionState)) { return Acknowledge.get(); } else { throw new ExecutionGraphException("The execution attempt " + taskExecutionState.getID() + " was not found."); } }
private void updateTaskExecutionState( final JobMasterGateway jobMasterGateway, final TaskExecutionState taskExecutionState) { final ExecutionAttemptID executionAttemptID = taskExecutionState.getID();
final Execution attempt = currentExecutions.get(state.getID());
final Execution attempt = currentExecutions.get(state.getID());
final Execution attempt = currentExecutions.get(state.getID());
final Execution attempt = currentExecutions.get(state.getID());