private void disposeSavepoint ( ClusterClient < ? > clusterClient , String savepointPath ) throws FlinkException { Preconditions . checkNotNull ( savepointPath , "Missing required argument: savepoint path. " + "Usage: bin/flink savepoint -d <savepoint-path>" ) ; logAndSysout ( "Disposing savepoint '" + savepointPath + "'." ) ; final CompletableFuture < Acknowledge > disposeFuture = clusterClient . disposeSavepoint ( savepointPath ) ; logAndSysout ( "Waiting for response..." ) ; try { disposeFuture . get ( clientTimeout . toMillis ( ) , TimeUnit . MILLISECONDS ) ; } catch ( Exception e ) { throw new FlinkException ( "Disposing the savepoint '" + savepointPath + "' failed." , e ) ; } logAndSysout ( "Savepoint '" + savepointPath + "' disposed." ) ; }
Sends a SavepointDisposalRequest to the job manager .