Search in sources :

Example 1 with JobVertexDetailsInfo

use of org.apache.flink.runtime.rest.messages.JobVertexDetailsInfo in project flink by apache.

the class JobVertexDetailsHandler method createJobVertexDetailsInfo.

private static JobVertexDetailsInfo createJobVertexDetailsInfo(AccessExecutionJobVertex jobVertex, JobID jobID, @Nullable MetricFetcher metricFetcher) {
    List<SubtaskExecutionAttemptDetailsInfo> subtasks = new ArrayList<>();
    final long now = System.currentTimeMillis();
    for (AccessExecutionVertex vertex : jobVertex.getTaskVertices()) {
        final AccessExecution execution = vertex.getCurrentExecutionAttempt();
        final JobVertexID jobVertexID = jobVertex.getJobVertexId();
        subtasks.add(SubtaskExecutionAttemptDetailsInfo.create(execution, metricFetcher, jobID, jobVertexID));
    }
    return new JobVertexDetailsInfo(jobVertex.getJobVertexId(), jobVertex.getName(), jobVertex.getParallelism(), jobVertex.getMaxParallelism(), now, subtasks);
}
Also used : SubtaskExecutionAttemptDetailsInfo(org.apache.flink.runtime.rest.messages.job.SubtaskExecutionAttemptDetailsInfo) AccessExecution(org.apache.flink.runtime.executiongraph.AccessExecution) JobVertexID(org.apache.flink.runtime.jobgraph.JobVertexID) JobVertexDetailsInfo(org.apache.flink.runtime.rest.messages.JobVertexDetailsInfo) ArrayList(java.util.ArrayList) AccessExecutionVertex(org.apache.flink.runtime.executiongraph.AccessExecutionVertex)

Aggregations

ArrayList (java.util.ArrayList)1 AccessExecution (org.apache.flink.runtime.executiongraph.AccessExecution)1 AccessExecutionVertex (org.apache.flink.runtime.executiongraph.AccessExecutionVertex)1 JobVertexID (org.apache.flink.runtime.jobgraph.JobVertexID)1 JobVertexDetailsInfo (org.apache.flink.runtime.rest.messages.JobVertexDetailsInfo)1 SubtaskExecutionAttemptDetailsInfo (org.apache.flink.runtime.rest.messages.job.SubtaskExecutionAttemptDetailsInfo)1