private static JobVerticesInfo createJobVerticesInfo(AccessExecutionGraph executionGraph, @Nullable MetricFetcher<?> metricFetcher) { Collection<JobVerticesInfo.JobVertex> jobVertices = new ArrayList<>(executionGraph.getAllVertices().size()); Collection<JobVerticesInfo.JobOperator> jobOperators = new ArrayList<>(); metricFetcher.update(); for (AccessExecutionJobVertex accessExecutionJobVertex : executionGraph.getVerticesTopologically()) { final JobVerticesInfo.JobVertex jobVertex = createJobVertex( accessExecutionJobVertex, executionGraph.getJobID(), metricFetcher, jobOperators); jobVertices.add(jobVertex); } return new JobVerticesInfo(jobVertices, jobOperators); }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { String json = createSubtasksAccumulatorsJson(task); String path = SUBTASKS_ALL_ACCUMULATORS_REST_PATH .replace(":jobid", graph.getJobID().toString()) .replace(":vertexid", task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; } }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { String json = createVertexAccumulatorsJson(task); String path = JOB_VERTEX_ACCUMULATORS_REST_PATH .replace(":jobid", graph.getJobID().toString()) .replace(":vertexid", task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; } }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { String json = createSubtasksAccumulatorsJson(task); String path = SUBTASKS_ALL_ACCUMULATORS_REST_PATH .replace(":jobid", graph.getJobID().toString()) .replace(":vertexid", task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; } }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { Collection<? extends AccessExecutionJobVertex> allVertices = graph.getAllVertices().values(); List<ArchivedJson> archive = new ArrayList<>(allVertices.size()); for (AccessExecutionJobVertex task : allVertices) { ResponseBody json = createSubtaskTimesInfo(task); String path = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { String json = createSubtaskTimesJson(task); String path = SUBTASK_TIMES_REST_PATH .replace(":jobid", graph.getJobID().toString()) .replace(":vertexid", task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; } }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { String json = createVertexAccumulatorsJson(task); String path = JOB_VERTEX_ACCUMULATORS_REST_PATH .replace(":jobid", graph.getJobID().toString()) .replace(":vertexid", task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; } }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { String json = createSubtaskTimesJson(task); String path = SUBTASK_TIMES_REST_PATH .replace(":jobid", graph.getJobID().toString()) .replace(":vertexid", task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; } }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { Collection<? extends AccessExecutionJobVertex> allVertices = graph.getAllVertices().values(); List<ArchivedJson> archive = new ArrayList<>(allVertices.size()); for (AccessExecutionJobVertex task : allVertices) { ResponseBody json = createSubtaskTimesInfo(task); String path = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { Collection<? extends AccessExecutionJobVertex> vertices = graph.getAllVertices().values(); List<ArchivedJson> archive = new ArrayList<>(vertices.size()); for (AccessExecutionJobVertex task : vertices) { ResponseBody json = createJobVertexDetailsInfo(task, graph.getJobID(), null); String path = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { Collection<? extends AccessExecutionJobVertex> vertices = graph.getAllVertices().values(); List<ArchivedJson> archive = new ArrayList<>(vertices.size()); for (AccessExecutionJobVertex task : vertices) { ResponseBody json = createJobVertexDetailsInfo(task, graph.getJobID(), null); String path = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { Collection<? extends AccessExecutionJobVertex> allVertices = graph.getAllVertices().values(); List<ArchivedJson> archive = new ArrayList<>(allVertices.size()); for (AccessExecutionJobVertex task : allVertices) { ResponseBody json = createSubtaskTimesInfo(task); String path = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { Collection<? extends AccessExecutionJobVertex> vertices = graph.getAllVertices().values(); List<ArchivedJson> archive = new ArrayList<>(vertices.size()); for (AccessExecutionJobVertex task : vertices) { ResponseBody json = createJobVertexTaskManagersInfo(task, graph.getJobID(), metricFetcher); String path = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { String json = createVertexDetailsByTaskManagerJson(task, graph.getJobID().toString(), null); String path = JOB_VERTEX_TASKMANAGERS_REST_PATH .replace(":jobid", graph.getJobID().toString()) .replace(":vertexid", task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; } }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { Collection<? extends AccessExecutionJobVertex> vertices = graph.getAllVertices().values(); List<ArchivedJson> archive = new ArrayList<>(vertices.size()); for (AccessExecutionJobVertex task : vertices) { ResponseBody json = createJobVertexTaskManagersInfo(task, graph.getJobID(), null); String path = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { Collection<? extends AccessExecutionJobVertex> vertices = graph.getAllVertices().values(); List<ArchivedJson> archive = new ArrayList<>(vertices.size()); for (AccessExecutionJobVertex task : vertices) { ResponseBody json = createJobVertexDetailsInfo(task, graph.getJobID(), metricFetcher, resourceManagerGatewayRetriever, timeout); String path = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { Collection<? extends AccessExecutionJobVertex> vertices = graph.getAllVertices().values(); List<ArchivedJson> archive = new ArrayList<>(vertices.size()); for (AccessExecutionJobVertex task : vertices) { ResponseBody json = createJobVertexTaskManagersInfo(task, graph.getJobID(), null); String path = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { String json = createVertexDetailsByTaskManagerJson(task, graph.getJobID().toString(), null); String path = JOB_VERTEX_TASKMANAGERS_REST_PATH .replace(":jobid", graph.getJobID().toString()) .replace(":vertexid", task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; } }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { String json = createVertexDetailsJson(task, graph.getJobID().toString(), null); String path = JOB_VERTEX_DETAILS_REST_PATH .replace(":jobid", graph.getJobID().toString()) .replace(":vertexid", task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; } }
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { String json = createVertexDetailsJson(task, graph.getJobID().toString(), null); String path = JOB_VERTEX_DETAILS_REST_PATH .replace(":jobid", graph.getJobID().toString()) .replace(":vertexid", task.getJobVertexId().toString()); archive.add(new ArchivedJson(path, json)); } return archive; } }