org.apache.flink.runtime.rest.messages.job.SubtasksAllAccumulatorsInfo Java Examples
The following examples show how to use
org.apache.flink.runtime.rest.messages.job.SubtasksAllAccumulatorsInfo.
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: SubtasksAllAccumulatorsHandler.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override protected SubtasksAllAccumulatorsInfo handleRequest(HandlerRequest<EmptyRequestBody, JobVertexMessageParameters> request, AccessExecutionJobVertex jobVertex) throws RestHandlerException { JobVertexID jobVertexId = jobVertex.getJobVertexId(); int parallelism = jobVertex.getParallelism(); final List<SubtasksAllAccumulatorsInfo.SubtaskAccumulatorsInfo> subtaskAccumulatorsInfos = new ArrayList<>(); for (AccessExecutionVertex vertex : jobVertex.getTaskVertices()) { TaskManagerLocation location = vertex.getCurrentAssignedResourceLocation(); String locationString = location == null ? "(unassigned)" : location.getHostname(); StringifiedAccumulatorResult[] accs = vertex.getCurrentExecutionAttempt().getUserAccumulatorsStringified(); List<UserAccumulator> userAccumulators = new ArrayList<>(accs.length); for (StringifiedAccumulatorResult acc : accs) { userAccumulators.add(new UserAccumulator(acc.getName(), acc.getType(), acc.getValue())); } subtaskAccumulatorsInfos.add( new SubtasksAllAccumulatorsInfo.SubtaskAccumulatorsInfo( vertex.getCurrentExecutionAttempt().getParallelSubtaskIndex(), vertex.getCurrentExecutionAttempt().getAttemptNumber(), locationString, userAccumulators )); } return new SubtasksAllAccumulatorsInfo(jobVertexId, parallelism, subtaskAccumulatorsInfos); }
Example #2
Source File: SubtasksAllAccumulatorsHandler.java From flink with Apache License 2.0 | 5 votes |
@Override protected SubtasksAllAccumulatorsInfo handleRequest(HandlerRequest<EmptyRequestBody, JobVertexMessageParameters> request, AccessExecutionJobVertex jobVertex) throws RestHandlerException { JobVertexID jobVertexId = jobVertex.getJobVertexId(); int parallelism = jobVertex.getParallelism(); final List<SubtasksAllAccumulatorsInfo.SubtaskAccumulatorsInfo> subtaskAccumulatorsInfos = new ArrayList<>(); for (AccessExecutionVertex vertex : jobVertex.getTaskVertices()) { TaskManagerLocation location = vertex.getCurrentAssignedResourceLocation(); String locationString = location == null ? "(unassigned)" : location.getHostname(); StringifiedAccumulatorResult[] accs = vertex.getCurrentExecutionAttempt().getUserAccumulatorsStringified(); List<UserAccumulator> userAccumulators = new ArrayList<>(accs.length); for (StringifiedAccumulatorResult acc : accs) { userAccumulators.add(new UserAccumulator(acc.getName(), acc.getType(), acc.getValue())); } subtaskAccumulatorsInfos.add( new SubtasksAllAccumulatorsInfo.SubtaskAccumulatorsInfo( vertex.getCurrentExecutionAttempt().getParallelSubtaskIndex(), vertex.getCurrentExecutionAttempt().getAttemptNumber(), locationString, userAccumulators )); } return new SubtasksAllAccumulatorsInfo(jobVertexId, parallelism, subtaskAccumulatorsInfos); }
Example #3
Source File: SubtasksAllAccumulatorsHandler.java From flink with Apache License 2.0 | 5 votes |
@Override protected SubtasksAllAccumulatorsInfo handleRequest(HandlerRequest<EmptyRequestBody, JobVertexMessageParameters> request, AccessExecutionJobVertex jobVertex) throws RestHandlerException { JobVertexID jobVertexId = jobVertex.getJobVertexId(); int parallelism = jobVertex.getParallelism(); final List<SubtasksAllAccumulatorsInfo.SubtaskAccumulatorsInfo> subtaskAccumulatorsInfos = new ArrayList<>(); for (AccessExecutionVertex vertex : jobVertex.getTaskVertices()) { TaskManagerLocation location = vertex.getCurrentAssignedResourceLocation(); String locationString = location == null ? "(unassigned)" : location.getHostname(); StringifiedAccumulatorResult[] accs = vertex.getCurrentExecutionAttempt().getUserAccumulatorsStringified(); List<UserAccumulator> userAccumulators = new ArrayList<>(accs.length); for (StringifiedAccumulatorResult acc : accs) { userAccumulators.add(new UserAccumulator(acc.getName(), acc.getType(), acc.getValue())); } subtaskAccumulatorsInfos.add( new SubtasksAllAccumulatorsInfo.SubtaskAccumulatorsInfo( vertex.getCurrentExecutionAttempt().getParallelSubtaskIndex(), vertex.getCurrentExecutionAttempt().getAttemptNumber(), locationString, userAccumulators )); } return new SubtasksAllAccumulatorsInfo(jobVertexId, parallelism, subtaskAccumulatorsInfos); }
Example #4
Source File: SubtasksAllAccumulatorsHeaders.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public Class<SubtasksAllAccumulatorsInfo> getResponseClass() { return SubtasksAllAccumulatorsInfo.class; }
Example #5
Source File: SubtasksAllAccumulatorsHandler.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
public SubtasksAllAccumulatorsHandler(GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, SubtasksAllAccumulatorsInfo, JobVertexMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor) { super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); }
Example #6
Source File: SubtasksAllAccumulatorsHeaders.java From flink with Apache License 2.0 | 4 votes |
@Override public Class<SubtasksAllAccumulatorsInfo> getResponseClass() { return SubtasksAllAccumulatorsInfo.class; }
Example #7
Source File: SubtasksAllAccumulatorsHandler.java From flink with Apache License 2.0 | 4 votes |
public SubtasksAllAccumulatorsHandler(GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, SubtasksAllAccumulatorsInfo, JobVertexMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor) { super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); }
Example #8
Source File: SubtasksAllAccumulatorsHeaders.java From flink with Apache License 2.0 | 4 votes |
@Override public Class<SubtasksAllAccumulatorsInfo> getResponseClass() { return SubtasksAllAccumulatorsInfo.class; }
Example #9
Source File: SubtasksAllAccumulatorsHandler.java From flink with Apache License 2.0 | 4 votes |
public SubtasksAllAccumulatorsHandler(GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, SubtasksAllAccumulatorsInfo, JobVertexMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor) { super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); }