Java Code Examples for org.apache.flink.api.common.accumulators.AccumulatorHelper#mergeInto()
The following examples show how to use
org.apache.flink.api.common.accumulators.AccumulatorHelper#mergeInto() .
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: ExecutionGraph.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
/** * Merges all accumulator results from the tasks previously executed in the Executions. * @return The accumulator map */ public Map<String, OptionalFailure<Accumulator<?, ?>>> aggregateUserAccumulators() { Map<String, OptionalFailure<Accumulator<?, ?>>> userAccumulators = new HashMap<>(); for (ExecutionVertex vertex : getAllExecutionVertices()) { Map<String, Accumulator<?, ?>> next = vertex.getCurrentExecutionAttempt().getUserAccumulators(); if (next != null) { AccumulatorHelper.mergeInto(userAccumulators, next); } } return userAccumulators; }
Example 2
Source File: ExecutionJobVertex.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public StringifiedAccumulatorResult[] getAggregatedUserAccumulatorsStringified() { Map<String, OptionalFailure<Accumulator<?, ?>>> userAccumulators = new HashMap<>(); for (ExecutionVertex vertex : taskVertices) { Map<String, Accumulator<?, ?>> next = vertex.getCurrentExecutionAttempt().getUserAccumulators(); if (next != null) { AccumulatorHelper.mergeInto(userAccumulators, next); } } return StringifiedAccumulatorResult.stringifyAccumulatorResults(userAccumulators); }
Example 3
Source File: ExecutionGraph.java From flink with Apache License 2.0 | 5 votes |
/** * Merges all accumulator results from the tasks previously executed in the Executions. * @return The accumulator map */ public Map<String, OptionalFailure<Accumulator<?, ?>>> aggregateUserAccumulators() { Map<String, OptionalFailure<Accumulator<?, ?>>> userAccumulators = new HashMap<>(); for (ExecutionVertex vertex : getAllExecutionVertices()) { Map<String, Accumulator<?, ?>> next = vertex.getCurrentExecutionAttempt().getUserAccumulators(); if (next != null) { AccumulatorHelper.mergeInto(userAccumulators, next); } } return userAccumulators; }
Example 4
Source File: ExecutionJobVertex.java From flink with Apache License 2.0 | 5 votes |
public StringifiedAccumulatorResult[] getAggregatedUserAccumulatorsStringified() { Map<String, OptionalFailure<Accumulator<?, ?>>> userAccumulators = new HashMap<>(); for (ExecutionVertex vertex : taskVertices) { Map<String, Accumulator<?, ?>> next = vertex.getCurrentExecutionAttempt().getUserAccumulators(); if (next != null) { AccumulatorHelper.mergeInto(userAccumulators, next); } } return StringifiedAccumulatorResult.stringifyAccumulatorResults(userAccumulators); }
Example 5
Source File: ExecutionGraph.java From flink with Apache License 2.0 | 5 votes |
/** * Merges all accumulator results from the tasks previously executed in the Executions. * @return The accumulator map */ public Map<String, OptionalFailure<Accumulator<?, ?>>> aggregateUserAccumulators() { Map<String, OptionalFailure<Accumulator<?, ?>>> userAccumulators = new HashMap<>(); for (ExecutionVertex vertex : getAllExecutionVertices()) { Map<String, Accumulator<?, ?>> next = vertex.getCurrentExecutionAttempt().getUserAccumulators(); if (next != null) { AccumulatorHelper.mergeInto(userAccumulators, next); } } return userAccumulators; }
Example 6
Source File: ExecutionJobVertex.java From flink with Apache License 2.0 | 5 votes |
public StringifiedAccumulatorResult[] getAggregatedUserAccumulatorsStringified() { Map<String, OptionalFailure<Accumulator<?, ?>>> userAccumulators = new HashMap<>(); for (ExecutionVertex vertex : taskVertices) { Map<String, Accumulator<?, ?>> next = vertex.getCurrentExecutionAttempt().getUserAccumulators(); if (next != null) { AccumulatorHelper.mergeInto(userAccumulators, next); } } return StringifiedAccumulatorResult.stringifyAccumulatorResults(userAccumulators); }