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.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---