use of org.apache.flink.runtime.rest.messages.JobMessageParameters in project flink by apache.
the class LocalRecoveryITCase method waitUntilCheckpointCompleted.
private void waitUntilCheckpointCompleted(Configuration configuration, int restPort, JobID jobId, Deadline deadline) throws Exception {
final RestClient restClient = new RestClient(configuration, Executors.directExecutor());
final JobMessageParameters messageParameters = new JobMessageParameters();
messageParameters.jobPathParameter.resolve(jobId);
CommonTestUtils.waitUntilCondition(() -> {
final CheckpointingStatistics checkpointingStatistics = restClient.sendRequest("localhost", restPort, CheckpointingStatisticsHeaders.getInstance(), messageParameters, EmptyRequestBody.getInstance()).join();
return checkpointingStatistics.getCounts().getNumberCompletedCheckpoints() > 0;
}, deadline);
}
Aggregations