Search in sources :

Example 1 with SavepointStatusMessageParameters

use of org.apache.flink.runtime.rest.messages.job.savepoints.SavepointStatusMessageParameters in project flink by apache.

the class RestClusterClient method pollSavepointAsync.

private CompletableFuture<SavepointInfo> pollSavepointAsync(final JobID jobId, final TriggerId triggerID) {
    return pollResourceAsync(() -> {
        final SavepointStatusHeaders savepointStatusHeaders = SavepointStatusHeaders.getInstance();
        final SavepointStatusMessageParameters savepointStatusMessageParameters = savepointStatusHeaders.getUnresolvedMessageParameters();
        savepointStatusMessageParameters.jobIdPathParameter.resolve(jobId);
        savepointStatusMessageParameters.triggerIdPathParameter.resolve(triggerID);
        return sendRequest(savepointStatusHeaders, savepointStatusMessageParameters);
    });
}
Also used : SavepointStatusMessageParameters(org.apache.flink.runtime.rest.messages.job.savepoints.SavepointStatusMessageParameters) SavepointStatusHeaders(org.apache.flink.runtime.rest.messages.job.savepoints.SavepointStatusHeaders)

Example 2 with SavepointStatusMessageParameters

use of org.apache.flink.runtime.rest.messages.job.savepoints.SavepointStatusMessageParameters in project flink by apache.

the class SavepointHandlersTest method savepointStatusRequest.

private static HandlerRequest<EmptyRequestBody> 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 HandlerRequest.resolveParametersAndCreate(EmptyRequestBody.getInstance(), new SavepointStatusMessageParameters(), pathParameters, Collections.emptyMap(), Collections.emptyList());
}
Also used : SavepointStatusMessageParameters(org.apache.flink.runtime.rest.messages.job.savepoints.SavepointStatusMessageParameters) HashMap(java.util.HashMap)

Example 3 with SavepointStatusMessageParameters

use of org.apache.flink.runtime.rest.messages.job.savepoints.SavepointStatusMessageParameters in project flink by apache.

the class StopWithSavepointHandlersTest method savepointStatusRequest.

private static HandlerRequest<EmptyRequestBody> 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 HandlerRequest.resolveParametersAndCreate(EmptyRequestBody.getInstance(), new SavepointStatusMessageParameters(), pathParameters, Collections.emptyMap(), Collections.emptyList());
}
Also used : SavepointStatusMessageParameters(org.apache.flink.runtime.rest.messages.job.savepoints.SavepointStatusMessageParameters) HashMap(java.util.HashMap)

Aggregations

SavepointStatusMessageParameters (org.apache.flink.runtime.rest.messages.job.savepoints.SavepointStatusMessageParameters)3 HashMap (java.util.HashMap)2 SavepointStatusHeaders (org.apache.flink.runtime.rest.messages.job.savepoints.SavepointStatusHeaders)1