Search in sources :

Example 1 with JobDetailsHeaders

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)));
}
Also used : JobDetailsHeaders(org.apache.flink.runtime.rest.messages.job.JobDetailsHeaders) JobMessageParameters(org.apache.flink.runtime.rest.messages.JobMessageParameters)

Example 2 with JobDetailsHeaders

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);
}
Also used : JobDetailsHeaders(org.apache.flink.runtime.rest.messages.job.JobDetailsHeaders) JobMessageParameters(org.apache.flink.runtime.rest.messages.JobMessageParameters)

Aggregations

JobMessageParameters (org.apache.flink.runtime.rest.messages.JobMessageParameters)2 JobDetailsHeaders (org.apache.flink.runtime.rest.messages.job.JobDetailsHeaders)2