org.apache.flink.runtime.rest.messages.TriggerIdPathParameter Java Examples
The following examples show how to use
org.apache.flink.runtime.rest.messages.TriggerIdPathParameter.
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: RestClusterClientTest.java From flink with Apache License 2.0 | 6 votes |
@Override protected CompletableFuture<AsynchronousOperationResult<AsynchronousOperationInfo>> handleRequest(@Nonnull HandlerRequest<EmptyRequestBody, SavepointDisposalStatusMessageParameters> request, @Nonnull DispatcherGateway gateway) throws RestHandlerException { final TriggerId actualTriggerId = request.getPathParameter(TriggerIdPathParameter.class); if (actualTriggerId.equals(triggerId)) { final OptionalFailure<AsynchronousOperationInfo> nextResponse = responses.poll(); if (nextResponse != null) { if (nextResponse.isFailure()) { throw new RestHandlerException("Failure", HttpResponseStatus.BAD_REQUEST, nextResponse.getFailureCause()); } else { return CompletableFuture.completedFuture(AsynchronousOperationResult.completed(nextResponse.getUnchecked())); } } else { throw new AssertionError(); } } else { throw new AssertionError(); } }
Example #2
Source File: RestClusterClientTest.java From flink with Apache License 2.0 | 6 votes |
@Override protected CompletableFuture<AsynchronousOperationResult<AsynchronousOperationInfo>> handleRequest(@Nonnull HandlerRequest<EmptyRequestBody, SavepointDisposalStatusMessageParameters> request, @Nonnull DispatcherGateway gateway) throws RestHandlerException { final TriggerId actualTriggerId = request.getPathParameter(TriggerIdPathParameter.class); if (actualTriggerId.equals(triggerId)) { final OptionalFailure<AsynchronousOperationInfo> nextResponse = responses.poll(); if (nextResponse != null) { if (nextResponse.isFailure()) { throw new RestHandlerException("Failure", HttpResponseStatus.BAD_REQUEST, nextResponse.getFailureCause()); } else { return CompletableFuture.completedFuture(AsynchronousOperationResult.completed(nextResponse.getUnchecked())); } } else { throw new AssertionError(); } } else { throw new AssertionError(); } }
Example #3
Source File: RestClusterClientTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Override protected CompletableFuture<AsynchronousOperationResult<AsynchronousOperationInfo>> handleRequest(@Nonnull HandlerRequest<EmptyRequestBody, SavepointDisposalStatusMessageParameters> request, @Nonnull DispatcherGateway gateway) throws RestHandlerException { final TriggerId actualTriggerId = request.getPathParameter(TriggerIdPathParameter.class); if (actualTriggerId.equals(triggerId)) { final OptionalFailure<AsynchronousOperationInfo> nextResponse = responses.poll(); if (nextResponse != null) { if (nextResponse.isFailure()) { throw new RestHandlerException("Failure", HttpResponseStatus.BAD_REQUEST, nextResponse.getFailureCause()); } else { return CompletableFuture.completedFuture(AsynchronousOperationResult.completed(nextResponse.getUnchecked())); } } else { throw new AssertionError(); } } else { throw new AssertionError(); } }
Example #4
Source File: AbstractAsynchronousOperationHandlersTest.java From flink with Apache License 2.0 | 5 votes |
private static HandlerRequest<EmptyRequestBody, TriggerMessageParameters> statusOperationRequest(TriggerId triggerId) throws HandlerRequestException { return new HandlerRequest<>( EmptyRequestBody.getInstance(), new TriggerMessageParameters(), Collections.singletonMap(TriggerIdPathParameter.KEY, triggerId.toString()), Collections.emptyMap()); }
Example #5
Source File: RestClusterClientSavepointTriggerTest.java From flink with Apache License 2.0 | 5 votes |
@Override protected CompletableFuture<AsynchronousOperationResult<SavepointInfo>> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> request, @Nonnull DispatcherGateway gateway) throws RestHandlerException { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return CompletableFuture.completedFuture(AsynchronousOperationResult.completed(savepointHandlerLogic.apply(triggerId))); }
Example #6
Source File: AbstractAsynchronousOperationHandlersTest.java From flink with Apache License 2.0 | 5 votes |
private static HandlerRequest<EmptyRequestBody, TriggerMessageParameters> statusOperationRequest(TriggerId triggerId) throws HandlerRequestException { return new HandlerRequest<>( EmptyRequestBody.getInstance(), new TriggerMessageParameters(), Collections.singletonMap(TriggerIdPathParameter.KEY, triggerId.toString()), Collections.emptyMap()); }
Example #7
Source File: StopWithSavepointHandlersTest.java From flink with Apache License 2.0 | 5 votes |
private static HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> savepointStatusRequest( final TriggerId triggerId) throws HandlerRequestException { final Map<String, String> pathParameters = new HashMap<>(); pathParameters.put(JobIDPathParameter.KEY, JOB_ID.toString()); pathParameters.put(TriggerIdPathParameter.KEY, triggerId.toString()); return new HandlerRequest<>( EmptyRequestBody.getInstance(), new SavepointStatusMessageParameters(), pathParameters, Collections.emptyMap()); }
Example #8
Source File: SavepointHandlersTest.java From flink with Apache License 2.0 | 5 votes |
private static HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> savepointStatusRequest( final TriggerId triggerId) throws HandlerRequestException { final Map<String, String> pathParameters = new HashMap<>(); pathParameters.put(JobIDPathParameter.KEY, JOB_ID.toString()); pathParameters.put(TriggerIdPathParameter.KEY, triggerId.toString()); return new HandlerRequest<>( EmptyRequestBody.getInstance(), new SavepointStatusMessageParameters(), pathParameters, Collections.emptyMap()); }
Example #9
Source File: RestClusterClientSavepointTriggerTest.java From flink with Apache License 2.0 | 5 votes |
@Override protected CompletableFuture<AsynchronousOperationResult<SavepointInfo>> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> request, @Nonnull DispatcherGateway gateway) throws RestHandlerException { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return CompletableFuture.completedFuture(AsynchronousOperationResult.completed(savepointHandlerLogic.apply(triggerId))); }
Example #10
Source File: StopWithSavepointHandlersTest.java From flink with Apache License 2.0 | 5 votes |
private static HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> savepointStatusRequest( final TriggerId triggerId) throws HandlerRequestException { final Map<String, String> pathParameters = new HashMap<>(); pathParameters.put(JobIDPathParameter.KEY, JOB_ID.toString()); pathParameters.put(TriggerIdPathParameter.KEY, triggerId.toString()); return new HandlerRequest<>( EmptyRequestBody.getInstance(), new SavepointStatusMessageParameters(), pathParameters, Collections.emptyMap()); }
Example #11
Source File: SavepointHandlersTest.java From flink with Apache License 2.0 | 5 votes |
private static HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> savepointStatusRequest( final TriggerId triggerId) throws HandlerRequestException { final Map<String, String> pathParameters = new HashMap<>(); pathParameters.put(JobIDPathParameter.KEY, JOB_ID.toString()); pathParameters.put(TriggerIdPathParameter.KEY, triggerId.toString()); return new HandlerRequest<>( EmptyRequestBody.getInstance(), new SavepointStatusMessageParameters(), pathParameters, Collections.emptyMap()); }
Example #12
Source File: RestClusterClientSavepointTriggerTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override protected CompletableFuture<AsynchronousOperationResult<SavepointInfo>> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> request, @Nonnull DispatcherGateway gateway) throws RestHandlerException { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return CompletableFuture.completedFuture(AsynchronousOperationResult.completed(savepointHandlerLogic.apply(triggerId))); }
Example #13
Source File: AbstractAsynchronousOperationHandlersTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
private static HandlerRequest<EmptyRequestBody, TriggerMessageParameters> statusOperationRequest(TriggerId triggerId) throws HandlerRequestException { return new HandlerRequest<>( EmptyRequestBody.getInstance(), new TriggerMessageParameters(), Collections.singletonMap(TriggerIdPathParameter.KEY, triggerId.toString()), Collections.emptyMap()); }
Example #14
Source File: SavepointHandlersTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
private static HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> savepointStatusRequest( final TriggerId triggerId) throws HandlerRequestException { final Map<String, String> pathParameters = new HashMap<>(); pathParameters.put(JobIDPathParameter.KEY, JOB_ID.toString()); pathParameters.put(TriggerIdPathParameter.KEY, triggerId.toString()); return new HandlerRequest<>( EmptyRequestBody.getInstance(), new SavepointStatusMessageParameters(), pathParameters, Collections.emptyMap()); }
Example #15
Source File: RescalingHandlers.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override protected AsynchronousJobOperationKey getOperationKey(HandlerRequest<EmptyRequestBody, RescalingStatusMessageParameters> request) { final JobID jobId = request.getPathParameter(JobIDPathParameter.class); final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return AsynchronousJobOperationKey.of(triggerId, jobId); }
Example #16
Source File: SavepointDisposalHandlers.java From flink with Apache License 2.0 | 4 votes |
@Override protected OperationKey getOperationKey(HandlerRequest<EmptyRequestBody, SavepointDisposalStatusMessageParameters> request) { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return new OperationKey(triggerId); }
Example #17
Source File: SavepointHandlers.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override protected AsynchronousJobOperationKey getOperationKey(HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> request) { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); final JobID jobId = request.getPathParameter(JobIDPathParameter.class); return AsynchronousJobOperationKey.of(triggerId, jobId); }
Example #18
Source File: AbstractAsynchronousOperationHandlersTest.java From flink with Apache License 2.0 | 4 votes |
@Override protected TestOperationKey getOperationKey(HandlerRequest<EmptyRequestBody, TriggerMessageParameters> request) { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return new TestOperationKey(triggerId); }
Example #19
Source File: SavepointHandlers.java From flink with Apache License 2.0 | 4 votes |
@Override protected AsynchronousJobOperationKey getOperationKey(HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> request) { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); final JobID jobId = request.getPathParameter(JobIDPathParameter.class); return AsynchronousJobOperationKey.of(triggerId, jobId); }
Example #20
Source File: ClusterDataSetDeleteHandlers.java From flink with Apache License 2.0 | 4 votes |
@Override protected OperationKey getOperationKey(HandlerRequest<EmptyRequestBody, ClusterDataSetDeleteStatusMessageParameters> request) { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return new OperationKey(triggerId); }
Example #21
Source File: SavepointHandlers.java From flink with Apache License 2.0 | 4 votes |
@Override protected AsynchronousJobOperationKey getOperationKey(HandlerRequest<EmptyRequestBody, SavepointStatusMessageParameters> request) { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); final JobID jobId = request.getPathParameter(JobIDPathParameter.class); return AsynchronousJobOperationKey.of(triggerId, jobId); }
Example #22
Source File: SavepointDisposalHandlers.java From flink with Apache License 2.0 | 4 votes |
@Override protected OperationKey getOperationKey(HandlerRequest<EmptyRequestBody, SavepointDisposalStatusMessageParameters> request) { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return new OperationKey(triggerId); }
Example #23
Source File: AbstractAsynchronousOperationHandlersTest.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override protected TestOperationKey getOperationKey(HandlerRequest<EmptyRequestBody, TriggerMessageParameters> request) { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return new TestOperationKey(triggerId); }
Example #24
Source File: AbstractAsynchronousOperationHandlersTest.java From flink with Apache License 2.0 | 4 votes |
@Override protected TestOperationKey getOperationKey(HandlerRequest<EmptyRequestBody, TriggerMessageParameters> request) { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return new TestOperationKey(triggerId); }
Example #25
Source File: SavepointDisposalHandlers.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override protected OperationKey getOperationKey(HandlerRequest<EmptyRequestBody, SavepointDisposalStatusMessageParameters> request) { final TriggerId triggerId = request.getPathParameter(TriggerIdPathParameter.class); return new OperationKey(triggerId); }