org.apache.flink.runtime.rest.messages.job.SubtaskExecutionAttemptDetailsInfo Java Examples
The following examples show how to use
org.apache.flink.runtime.rest.messages.job.SubtaskExecutionAttemptDetailsInfo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SubtaskCurrentAttemptDetailsHandler.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskMessageParameters> request, AccessExecutionVertex executionVertex) throws RestHandlerException { final AccessExecution execution = executionVertex.getCurrentExecutionAttempt(); final MutableIOMetrics ioMetrics = new MutableIOMetrics(); final JobID jobID = request.getPathParameter(JobIDPathParameter.class); final JobVertexID jobVertexID = request.getPathParameter(JobVertexIdPathParameter.class); ioMetrics.addIOMetrics( execution, metricFetcher, jobID.toString(), jobVertexID.toString() ); return SubtaskExecutionAttemptDetailsInfo.create(execution, ioMetrics); }
Example #2
Source File: JobVertexDetailsHandler.java From flink with Apache License 2.0 | 6 votes |
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(), now, subtasks); }
Example #3
Source File: SubtaskExecutionAttemptDetailsHandler.java From flink with Apache License 2.0 | 6 votes |
private static SubtaskExecutionAttemptDetailsInfo createDetailsInfo( AccessExecution execution, JobID jobID, JobVertexID jobVertexID, @Nullable MetricFetcher metricFetcher) { final MutableIOMetrics ioMetrics = new MutableIOMetrics(); ioMetrics.addIOMetrics( execution, metricFetcher, jobID.toString(), jobVertexID.toString() ); return SubtaskExecutionAttemptDetailsInfo.create(execution, ioMetrics); }
Example #4
Source File: SubtaskCurrentAttemptDetailsHandler.java From flink with Apache License 2.0 | 6 votes |
@Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskMessageParameters> request, AccessExecutionVertex executionVertex) throws RestHandlerException { final AccessExecution execution = executionVertex.getCurrentExecutionAttempt(); final MutableIOMetrics ioMetrics = new MutableIOMetrics(); final JobID jobID = request.getPathParameter(JobIDPathParameter.class); final JobVertexID jobVertexID = request.getPathParameter(JobVertexIdPathParameter.class); ioMetrics.addIOMetrics( execution, metricFetcher, jobID.toString(), jobVertexID.toString() ); return SubtaskExecutionAttemptDetailsInfo.create(execution, ioMetrics); }
Example #5
Source File: SubtaskExecutionAttemptDetailsHandler.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
private static SubtaskExecutionAttemptDetailsInfo createDetailsInfo( AccessExecution execution, JobID jobID, JobVertexID jobVertexID, @Nullable MetricFetcher metricFetcher) { final MutableIOMetrics ioMetrics = new MutableIOMetrics(); ioMetrics.addIOMetrics( execution, metricFetcher, jobID.toString(), jobVertexID.toString() ); return SubtaskExecutionAttemptDetailsInfo.create(execution, ioMetrics); }
Example #6
Source File: SubtaskCurrentAttemptDetailsHandler.java From flink with Apache License 2.0 | 5 votes |
public SubtaskCurrentAttemptDetailsHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, SubtaskExecutionAttemptDetailsInfo, SubtaskMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor, MetricFetcher metricFetcher) { super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); this.metricFetcher = Preconditions.checkNotNull(metricFetcher); }
Example #7
Source File: SubtaskExecutionAttemptDetailsHandler.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameters> request, AccessExecution execution) throws RestHandlerException { final JobID jobID = request.getPathParameter(JobIDPathParameter.class); final JobVertexID jobVertexID = request.getPathParameter(JobVertexIdPathParameter.class); return createDetailsInfo(execution, jobID, jobVertexID, metricFetcher); }
Example #8
Source File: SubtaskExecutionAttemptDetailsHandler.java From flink with Apache License 2.0 | 5 votes |
/** * Instantiates a new subtask execution attempt details handler. * * @param leaderRetriever the leader retriever * @param timeout the timeout * @param responseHeaders the response headers * @param messageHeaders the message headers * @param executionGraphCache the execution graph cache * @param executor the executor */ public SubtaskExecutionAttemptDetailsHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, SubtaskExecutionAttemptDetailsInfo, SubtaskAttemptMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor, MetricFetcher metricFetcher) { super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); this.metricFetcher = Preconditions.checkNotNull(metricFetcher); }
Example #9
Source File: SubtaskExecutionAttemptDetailsHandler.java From flink with Apache License 2.0 | 5 votes |
@Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameters> request, AccessExecution execution) throws RestHandlerException { final JobID jobID = request.getPathParameter(JobIDPathParameter.class); final JobVertexID jobVertexID = request.getPathParameter(JobVertexIdPathParameter.class); return createDetailsInfo(execution, jobID, jobVertexID, metricFetcher); }
Example #10
Source File: SubtaskExecutionAttemptDetailsHandler.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
/** * Instantiates a new subtask execution attempt details handler. * * @param leaderRetriever the leader retriever * @param timeout the timeout * @param responseHeaders the response headers * @param messageHeaders the message headers * @param executionGraphCache the execution graph cache * @param executor the executor */ public SubtaskExecutionAttemptDetailsHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, SubtaskExecutionAttemptDetailsInfo, SubtaskAttemptMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor, MetricFetcher metricFetcher) { super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); this.metricFetcher = Preconditions.checkNotNull(metricFetcher); }
Example #11
Source File: SubtaskCurrentAttemptDetailsHandler.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public SubtaskCurrentAttemptDetailsHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, SubtaskExecutionAttemptDetailsInfo, SubtaskMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor, MetricFetcher metricFetcher) { super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); this.metricFetcher = Preconditions.checkNotNull(metricFetcher); }
Example #12
Source File: JobVertexDetailsInfo.java From flink with Apache License 2.0 | 5 votes |
@JsonCreator public JobVertexDetailsInfo( @JsonDeserialize(using = JobVertexIDDeserializer.class) @JsonProperty(FIELD_NAME_VERTEX_ID) JobVertexID id, @JsonProperty(FIELD_NAME_VERTEX_NAME) String name, @JsonProperty(FIELD_NAME_PARALLELISM) int parallelism, @JsonProperty(FIELD_NAME_NOW) long now, @JsonProperty(FIELD_NAME_SUBTASKS) List<SubtaskExecutionAttemptDetailsInfo> subtasks) { this.id = checkNotNull(id); this.name = checkNotNull(name); this.parallelism = parallelism; this.now = now; this.subtasks = checkNotNull(subtasks); }
Example #13
Source File: SubtaskCurrentAttemptDetailsHandler.java From flink with Apache License 2.0 | 5 votes |
public SubtaskCurrentAttemptDetailsHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, SubtaskExecutionAttemptDetailsInfo, SubtaskMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor, MetricFetcher metricFetcher) { super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); this.metricFetcher = Preconditions.checkNotNull(metricFetcher); }
Example #14
Source File: SubtaskCurrentAttemptDetailsHandler.java From flink with Apache License 2.0 | 5 votes |
@Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskMessageParameters> request, AccessExecutionVertex executionVertex) throws RestHandlerException { final AccessExecution execution = executionVertex.getCurrentExecutionAttempt(); final JobID jobID = request.getPathParameter(JobIDPathParameter.class); final JobVertexID jobVertexID = request.getPathParameter(JobVertexIdPathParameter.class); return SubtaskExecutionAttemptDetailsInfo.create(execution, metricFetcher, jobID, jobVertexID); }
Example #15
Source File: SubtaskExecutionAttemptDetailsHandler.java From flink with Apache License 2.0 | 5 votes |
/** * Instantiates a new subtask execution attempt details handler. * * @param leaderRetriever the leader retriever * @param timeout the timeout * @param responseHeaders the response headers * @param messageHeaders the message headers * @param executionGraphCache the execution graph cache * @param executor the executor */ public SubtaskExecutionAttemptDetailsHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, SubtaskExecutionAttemptDetailsInfo, SubtaskAttemptMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor, MetricFetcher metricFetcher) { super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); this.metricFetcher = Preconditions.checkNotNull(metricFetcher); }
Example #16
Source File: SubtaskExecutionAttemptDetailsHandler.java From flink with Apache License 2.0 | 5 votes |
@Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameters> request, AccessExecution execution) throws RestHandlerException { final JobID jobID = request.getPathParameter(JobIDPathParameter.class); final JobVertexID jobVertexID = request.getPathParameter(JobVertexIdPathParameter.class); return SubtaskExecutionAttemptDetailsInfo.create(execution, metricFetcher, jobID, jobVertexID); }
Example #17
Source File: SubtaskExecutionAttemptDetailsHandler.java From flink with Apache License 2.0 | 5 votes |
@Override public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException { List<ArchivedJson> archive = new ArrayList<>(16); for (AccessExecutionJobVertex task : graph.getAllVertices().values()) { for (AccessExecutionVertex subtask : task.getTaskVertices()) { ResponseBody curAttemptJson = SubtaskExecutionAttemptDetailsInfo.create(subtask.getCurrentExecutionAttempt(), null, graph.getJobID(), task.getJobVertexId()); String curAttemptPath = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()) .replace(':' + SubtaskIndexPathParameter.KEY, String.valueOf(subtask.getParallelSubtaskIndex())) .replace(':' + SubtaskAttemptPathParameter.KEY, String.valueOf(subtask.getCurrentExecutionAttempt().getAttemptNumber())); archive.add(new ArchivedJson(curAttemptPath, curAttemptJson)); for (int x = 0; x < subtask.getCurrentExecutionAttempt().getAttemptNumber(); x++) { AccessExecution attempt = subtask.getPriorExecutionAttempt(x); if (attempt != null) { ResponseBody json = SubtaskExecutionAttemptDetailsInfo.create(attempt, null, graph.getJobID(), task.getJobVertexId()); String path = getMessageHeaders().getTargetRestEndpointURL() .replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString()) .replace(':' + JobVertexIdPathParameter.KEY, task.getJobVertexId().toString()) .replace(':' + SubtaskIndexPathParameter.KEY, String.valueOf(subtask.getParallelSubtaskIndex())) .replace(':' + SubtaskAttemptPathParameter.KEY, String.valueOf(attempt.getAttemptNumber())); archive.add(new ArchivedJson(path, json)); } } } } return archive; }
Example #18
Source File: JobVertexDetailsInfoTest.java From flink with Apache License 2.0 | 4 votes |
@Override protected JobVertexDetailsInfo getTestResponseInstance() throws Exception { final Random random = new Random(); final IOMetricsInfo jobVertexMetrics = new IOMetricsInfo( random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean()); List<SubtaskExecutionAttemptDetailsInfo> vertexTaskDetailList = new ArrayList<>(); vertexTaskDetailList.add(new SubtaskExecutionAttemptDetailsInfo( 0, ExecutionState.CREATED, random.nextInt(), "local1", System.currentTimeMillis(), System.currentTimeMillis(), 1L, jobVertexMetrics, "taskmanagerId1")); vertexTaskDetailList.add(new SubtaskExecutionAttemptDetailsInfo( 1, ExecutionState.FAILED, random.nextInt(), "local2", System.currentTimeMillis(), System.currentTimeMillis(), 1L, jobVertexMetrics, "taskmanagerId2")); vertexTaskDetailList.add(new SubtaskExecutionAttemptDetailsInfo( 2, ExecutionState.FINISHED, random.nextInt(), "local3", System.currentTimeMillis(), System.currentTimeMillis(), 1L, jobVertexMetrics, "taskmanagerId3")); return new JobVertexDetailsInfo( new JobVertexID(), "jobVertex" + random.nextLong(), random.nextInt(), System.currentTimeMillis(), vertexTaskDetailList); }
Example #19
Source File: JobVertexDetailsInfo.java From flink with Apache License 2.0 | 4 votes |
@JsonIgnore public List<SubtaskExecutionAttemptDetailsInfo> getSubtasks() { return Collections.unmodifiableList(subtasks); }
Example #20
Source File: BatchFineGrainedRecoveryITCase.java From flink with Apache License 2.0 | 4 votes |
private InternalTaskInfo(String name, SubtaskExecutionAttemptDetailsInfo vertexTaskDetail) { this.name = name; this.attempt = vertexTaskDetail.getAttempt(); }