private String triggerSavepoint ( ClusterClient < ? > clusterClient , JobID jobId , String savepointDirectory ) throws FlinkException { logAndSysout ( "Triggering savepoint for job " + jobId + ' ' ) ; CompletableFuture < String > savepointPathFuture = clusterClient . triggerSavepoint ( jobId , savepointDirectory ) ; logAndSysout ( "Waiting for response..." ) ; final String savepointPath ; try { savepointPath = savepointPathFuture . get ( ) ; } catch ( Exception e ) { Throwable cause = ExceptionUtils . stripExecutionException ( e ) ; throw new FlinkException ( "Triggering a savepoint for the job " + jobId + " failed." , cause ) ; } logAndSysout ( "Savepoint completed. Path: " + savepointPath ) ; logAndSysout ( "You can resume your program from this savepoint with the run command." ) ; return savepointPath ; }
Sends a SavepointTriggerMessage to the job manager .