flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java
/**
	 * Sends a {@link org.apache.flink.runtime.messages.JobManagerMessages.DisposeSavepoint}
	 * message to the job manager.
	 */
Sends a  org.apache.flink.runtime.messages.JobManagerMessages.DisposeSavepoint
message to the job manager.
Sends a org . apache . flink . runtime . messages . JobManagerMessages . DisposeSavepoint message to the job manager .
private int disposeSavepoint(SavepointOptions options) {
		try {
			String savepointPath = options.getSavepointPath();
			if (savepointPath == null) {
				throw new IllegalArgumentException("Missing required argument: savepoint path. " +
						"Usage: bin/flink savepoint -d <savepoint-path>");
			}
			ActorGateway jobManager = getJobManagerGateway(options);
			logAndSysout("Disposing savepoint '" + savepointPath + "'.");
			Object msg = new DisposeSavepoint(savepointPath);
			Future<Object> response = jobManager.ask(msg, clientTimeout);
			Object result;
			try {
				logAndSysout("Waiting for response...");
				result = Await.result(response, clientTimeout);
			} catch (Exception e) {
				throw new Exception("Disposing the savepoint with path" + savepointPath + " failed.", e);
			}
			if (result.getClass() == JobManagerMessages.getDisposeSavepointSuccess().getClass()) {
				logAndSysout("Savepoint '" + savepointPath + "' disposed.");
				return 0;
			} else if (result instanceof DisposeSavepointFailure) {
				DisposeSavepointFailure failure = (DisposeSavepointFailure) result;
				if (failure.cause() instanceof ClassNotFoundException) {
					throw new ClassNotFoundException("Savepoint disposal failed, because of a " +
							"missing class. This is most likely caused by a custom state " +
							"instance, which cannot be disposed without the user code class " +
							"loader. Please provide the program jar with which you have created " +
							"the savepoint via -j <JAR> for disposal.",
							failure.cause().getCause());
				} else {
					throw failure.cause();
				}
			} else {
				throw new IllegalStateException("Unknown JobManager response of type " +
						result.getClass());
			}
		} catch (Throwable t) {
			return handleError(t);
		}
	}
private int disposeSavepoint ( SavepointOptions options ) { try { String savepointPath = options . getSavepointPath ( ) ; if ( savepointPath == null ) { throw new IllegalArgumentException ( "Missing required argument: savepoint path. " + "Usage: bin/flink savepoint -d <savepoint-path>" ) ; } ActorGateway jobManager = getJobManagerGateway ( options ) ; logAndSysout ( "Disposing savepoint '" + savepointPath + "'." ) ; Object msg = new DisposeSavepoint ( savepointPath ) ; Future < Object > response = jobManager . ask ( msg , clientTimeout ) ; Object result ; try { logAndSysout ( "Waiting for response..." ) ; result = Await . result ( response , clientTimeout ) ; } catch ( Exception e ) { throw new Exception ( "Disposing the savepoint with path" + savepointPath + " failed." , e ) ; } if ( result . getClass ( ) == JobManagerMessages . getDisposeSavepointSuccess ( ) . getClass ( ) ) { logAndSysout ( "Savepoint '" + savepointPath + "' disposed." ) ; return 0 ; } else if ( result instanceof DisposeSavepointFailure ) { DisposeSavepointFailure failure = ( DisposeSavepointFailure ) result ; if ( failure . cause ( ) instanceof ClassNotFoundException ) { throw new ClassNotFoundException ( "Savepoint disposal failed, because of a " + "missing class. This is most likely caused by a custom state " + "instance, which cannot be disposed without the user code class " + "loader. Please provide the program jar with which you have created " + "the savepoint via -j <JAR> for disposal." , failure . cause ( ) . getCause ( ) ) ; } else { throw failure . cause ( ) ; } } else { throw new IllegalStateException ( "Unknown JobManager response of type " + result . getClass ( ) ) ; } } catch ( Throwable t ) { return handleError ( t ) ; } }
Sends a {@link org.apache.flink.runtime.messages.JobManagerMessages.DisposeSavepoint}
 message to the job manager.
Sends a { @link org . apache . flink . runtime . messages . JobManagerMessages . DisposeSavepoint } message to the job manager .