Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/5560#discussion_r170279814
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
---
@@ -1156,6 +1213,26 @@ private void disposeSavepoint(String savepointPath) {
}
}
+ /**
+ * Tries to restore the given {@link ExecutionGraph} from the provided
{@link SavepointRestoreSettings}.
+ *
+ * @param executionGraphToRestore {@link ExecutionGraph} which is
supposed to be restored
+ * @param savepointRestoreSettings {@link SavepointRestoreSettings}
containing information about the savepoint to restore from
+ * @throws Exception if the {@link ExecutionGraph} could not be restored
+ */
+ private void tryRestoreExecutionGraphFromSavepoint(ExecutionGraph
executionGraphToRestore, SavepointRestoreSettings savepointRestoreSettings)
throws Exception {
+ if (savepointRestoreSettings.restoreSavepoint()) {
+ final CheckpointCoordinator checkpointCoordinator =
executionGraphToRestore.getCheckpointCoordinator();
+ if (checkpointCoordinator != null) {
--- End diff --
I think at this point the `checkpointCoordinator` should not be `null`
(there already are checks before). Maybe replace it with a `checkState`.
---