RunOptions options = CliFrontendParser.parseRunCommand(parameters); SavepointRestoreSettings savepointSettings = options.getSavepointRestoreSettings(); assertTrue(savepointSettings.restoreSavepoint()); assertEquals("expectedSavepointPath", savepointSettings.getRestorePath()); assertFalse(savepointSettings.allowNonRestoredState()); RunOptions options = CliFrontendParser.parseRunCommand(parameters); SavepointRestoreSettings savepointSettings = options.getSavepointRestoreSettings(); assertTrue(savepointSettings.restoreSavepoint()); assertEquals("expectedSavepointPath", savepointSettings.getRestorePath()); assertTrue(savepointSettings.allowNonRestoredState());
@Override public String toString() { if (restoreSavepoint()) { return "SavepointRestoreSettings.forPath(" + "restorePath='" + restorePath + '\'' + ", allowNonRestoredState=" + allowNonRestoredState + ')'; } else { return "SavepointRestoreSettings.none()"; } }
@Override public String toString() { if (restoreSavepoint()) { return "SavepointRestoreSettings.forPath(" + "restorePath='" + restorePath + '\'' + ", allowNonRestoredState=" + allowNonRestoredState + ')'; } else { return "SavepointRestoreSettings.none()"; } }
@Override public String toString() { if (restoreSavepoint()) { return "SavepointRestoreSettings.forPath(" + "restorePath='" + restorePath + '\'' + ", allowNonRestoredState=" + allowNonRestoredState + ')'; } else { return "SavepointRestoreSettings.none()"; } }
@Override public String toString() { if (restoreSavepoint()) { return "SavepointRestoreSettings.forPath(" + "restorePath='" + restorePath + '\'' + ", allowNonRestoredState=" + allowNonRestoredState + ')'; } else { return "SavepointRestoreSettings.none()"; } }
/** * 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) { checkpointCoordinator.restoreSavepoint( savepointRestoreSettings.getRestorePath(), savepointRestoreSettings.allowNonRestoredState(), executionGraphToRestore.getAllVertices(), userCodeLoader); } } }
/** * 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) { checkpointCoordinator.restoreSavepoint( savepointRestoreSettings.getRestorePath(), savepointRestoreSettings.allowNonRestoredState(), executionGraphToRestore.getAllVertices(), userCodeLoader); } } }
/** * 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) { checkpointCoordinator.restoreSavepoint( savepointRestoreSettings.getRestorePath(), savepointRestoreSettings.allowNonRestoredState(), savepointRestoreSettings.resumeFromLatestCheckpoint(), executionGraphToRestore.getAllVertices(), userCodeLoader); } } }