use of org.apache.flink.runtime.rest.messages.job.JobDetailsHeaders in project flink by apache.
the class SavepointITCase method waitUntilAllTasksAreRunning.
public static void waitUntilAllTasksAreRunning(RestClusterClient<?> restClusterClient, JobID jobId) throws Exception {
// access the REST endpoint of the cluster to determine the state of each
// ExecutionVertex
final JobDetailsHeaders detailsHeaders = JobDetailsHeaders.getInstance();
final JobMessageParameters params = detailsHeaders.getUnresolvedMessageParameters();
params.jobPathParameter.resolve(jobId);
CommonTestUtils.waitUntilCondition(() -> restClusterClient.sendRequest(detailsHeaders, params, EmptyRequestBody.getInstance()).thenApply(detailsInfo -> allVerticesRunning(detailsInfo.getJobVerticesPerState())).get(), Deadline.fromNow(Duration.ofSeconds(10)));
}
use of org.apache.flink.runtime.rest.messages.job.JobDetailsHeaders in project flink by apache.
the class RestClusterClient method getJobDetails.
/**
* Requests the job details.
*
* @param jobId The job id
* @return Job details
*/
public CompletableFuture<JobDetailsInfo> getJobDetails(JobID jobId) {
final JobDetailsHeaders detailsHeaders = JobDetailsHeaders.getInstance();
final JobMessageParameters params = new JobMessageParameters();
params.jobPathParameter.resolve(jobId);
return sendRequest(detailsHeaders, params);
}
Aggregations