use of org.apache.flink.runtime.rest.messages.JobVertexAccumulatorsInfo in project flink by apache.
the class JobVertexAccumulatorsHandler method handleRequest.
@Override
protected JobVertexAccumulatorsInfo handleRequest(HandlerRequest<EmptyRequestBody> request, AccessExecutionJobVertex jobVertex) throws RestHandlerException {
StringifiedAccumulatorResult[] accs = jobVertex.getAggregatedUserAccumulatorsStringified();
ArrayList<UserAccumulator> userAccumulatorList = new ArrayList<>(accs.length);
for (StringifiedAccumulatorResult acc : accs) {
userAccumulatorList.add(new UserAccumulator(acc.getName(), acc.getType(), acc.getValue()));
}
return new JobVertexAccumulatorsInfo(jobVertex.getJobVertexId().toString(), userAccumulatorList);
}
Aggregations