org.apache.flink.runtime.rest.messages.job.savepoints.SavepointDisposalStatusHeaders Java Examples
The following examples show how to use
org.apache.flink.runtime.rest.messages.job.savepoints.SavepointDisposalStatusHeaders.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SavepointDisposalHandlers.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public SavepointDisposalStatusHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders) { super( leaderRetriever, timeout, responseHeaders, SavepointDisposalStatusHeaders.getInstance()); }
Example #2
Source File: RestClusterClient.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath) { final SavepointDisposalRequest savepointDisposalRequest = new SavepointDisposalRequest(savepointPath); final CompletableFuture<TriggerResponse> savepointDisposalTriggerFuture = sendRequest( SavepointDisposalTriggerHeaders.getInstance(), savepointDisposalRequest); final CompletableFuture<AsynchronousOperationInfo> savepointDisposalFuture = savepointDisposalTriggerFuture.thenCompose( (TriggerResponse triggerResponse) -> { final TriggerId triggerId = triggerResponse.getTriggerId(); final SavepointDisposalStatusHeaders savepointDisposalStatusHeaders = SavepointDisposalStatusHeaders.getInstance(); final SavepointDisposalStatusMessageParameters savepointDisposalStatusMessageParameters = savepointDisposalStatusHeaders.getUnresolvedMessageParameters(); savepointDisposalStatusMessageParameters.triggerIdPathParameter.resolve(triggerId); return pollResourceAsync( () -> sendRequest( savepointDisposalStatusHeaders, savepointDisposalStatusMessageParameters)); }); return savepointDisposalFuture.thenApply( (AsynchronousOperationInfo asynchronousOperationInfo) -> { if (asynchronousOperationInfo.getFailureCause() == null) { return Acknowledge.get(); } else { throw new CompletionException(asynchronousOperationInfo.getFailureCause()); } }); }
Example #3
Source File: SavepointDisposalHandlers.java From flink with Apache License 2.0 | 5 votes |
public SavepointDisposalStatusHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders) { super( leaderRetriever, timeout, responseHeaders, SavepointDisposalStatusHeaders.getInstance()); }
Example #4
Source File: RestClusterClient.java From flink with Apache License 2.0 | 5 votes |
@Override public CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath) { final SavepointDisposalRequest savepointDisposalRequest = new SavepointDisposalRequest(savepointPath); final CompletableFuture<TriggerResponse> savepointDisposalTriggerFuture = sendRequest( SavepointDisposalTriggerHeaders.getInstance(), savepointDisposalRequest); final CompletableFuture<AsynchronousOperationInfo> savepointDisposalFuture = savepointDisposalTriggerFuture.thenCompose( (TriggerResponse triggerResponse) -> { final TriggerId triggerId = triggerResponse.getTriggerId(); final SavepointDisposalStatusHeaders savepointDisposalStatusHeaders = SavepointDisposalStatusHeaders.getInstance(); final SavepointDisposalStatusMessageParameters savepointDisposalStatusMessageParameters = savepointDisposalStatusHeaders.getUnresolvedMessageParameters(); savepointDisposalStatusMessageParameters.triggerIdPathParameter.resolve(triggerId); return pollResourceAsync( () -> sendRequest( savepointDisposalStatusHeaders, savepointDisposalStatusMessageParameters)); }); return savepointDisposalFuture.thenApply( (AsynchronousOperationInfo asynchronousOperationInfo) -> { if (asynchronousOperationInfo.getFailureCause() == null) { return Acknowledge.get(); } else { throw new CompletionException(asynchronousOperationInfo.getFailureCause()); } }); }
Example #5
Source File: SavepointDisposalHandlers.java From flink with Apache License 2.0 | 5 votes |
public SavepointDisposalStatusHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders) { super( leaderRetriever, timeout, responseHeaders, SavepointDisposalStatusHeaders.getInstance()); }
Example #6
Source File: RestClusterClient.java From flink with Apache License 2.0 | 5 votes |
@Override public CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath) { final SavepointDisposalRequest savepointDisposalRequest = new SavepointDisposalRequest(savepointPath); final CompletableFuture<TriggerResponse> savepointDisposalTriggerFuture = sendRequest( SavepointDisposalTriggerHeaders.getInstance(), savepointDisposalRequest); final CompletableFuture<AsynchronousOperationInfo> savepointDisposalFuture = savepointDisposalTriggerFuture.thenCompose( (TriggerResponse triggerResponse) -> { final TriggerId triggerId = triggerResponse.getTriggerId(); final SavepointDisposalStatusHeaders savepointDisposalStatusHeaders = SavepointDisposalStatusHeaders.getInstance(); final SavepointDisposalStatusMessageParameters savepointDisposalStatusMessageParameters = savepointDisposalStatusHeaders.getUnresolvedMessageParameters(); savepointDisposalStatusMessageParameters.triggerIdPathParameter.resolve(triggerId); return pollResourceAsync( () -> sendRequest( savepointDisposalStatusHeaders, savepointDisposalStatusMessageParameters)); }); return savepointDisposalFuture.thenApply( (AsynchronousOperationInfo asynchronousOperationInfo) -> { if (asynchronousOperationInfo.getFailureCause() == null) { return Acknowledge.get(); } else { throw new CompletionException(asynchronousOperationInfo.getFailureCause()); } }); }
Example #7
Source File: RestClusterClientTest.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
private TestSavepointDisposalStatusHandler(OptionalFailure<AsynchronousOperationInfo>... responses) { super(SavepointDisposalStatusHeaders.getInstance()); this.responses = new ArrayDeque<>(Arrays.asList(responses)); }
Example #8
Source File: RestClusterClientTest.java From flink with Apache License 2.0 | 4 votes |
private TestSavepointDisposalStatusHandler(OptionalFailure<AsynchronousOperationInfo>... responses) { super(SavepointDisposalStatusHeaders.getInstance()); this.responses = new ArrayDeque<>(Arrays.asList(responses)); }
Example #9
Source File: RestClusterClientTest.java From flink with Apache License 2.0 | 4 votes |
private TestSavepointDisposalStatusHandler(OptionalFailure<AsynchronousOperationInfo>... responses) { super(SavepointDisposalStatusHeaders.getInstance()); this.responses = new ArrayDeque<>(Arrays.asList(responses)); }