[ https://issues.apache.org/jira/browse/FLINK-4738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15561660#comment-15561660 ]
ASF GitHub Bot commented on FLINK-4738: --------------------------------------- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/2594#discussion_r82562672 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java --- @@ -507,12 +509,18 @@ public void suspendJob(final Throwable cause) { * @return Acknowledge the task execution state update */ @RpcMethod - public boolean updateTaskExecutionState(final TaskExecutionState taskExecutionState) { + public Acknowledge updateTaskExecutionState(final TaskExecutionState taskExecutionState) throws ExecutionGraphException { if (taskExecutionState == null) { - return false; + throw new NullPointerException("TaskExecutionState must not be null."); + } + + if (executionGraph.updateState(taskExecutionState)) { + return Acknowledge.get(); } else { - return executionGraph.updateState(taskExecutionState); + throw new ExecutionGraphException("The execution attempt " + --- End diff -- Yes we could do this. I decided against it, however, because I didn't want to touch the `ExecutionGraph` with this PR (it's already touching too many files ;-). Furthermore, the `updateState` method is defined such that it returns `false` iff the execution attempt could not be found. Otherwise it can update the state and returns `true`. Therefore, I thought that it would be ok to throw the exception at this level. > Port TaskManager logic to TaskExecutor > -------------------------------------- > > Key: FLINK-4738 > URL: https://issues.apache.org/jira/browse/FLINK-4738 > Project: Flink > Issue Type: Sub-task > Components: Distributed Coordination > Reporter: Till Rohrmann > Assignee: Till Rohrmann > > Port the basic operations of the {{TaskManager}} to the {{TaskExecutor}}. > These operations include the task lifecycle methods, {{JobManager}} > association logic and setup of TaskManager components. -- This message was sent by Atlassian JIRA (v6.3.4#6332)