Github user mxm commented on a diff in the pull request:
https://github.com/apache/flink/pull/934#discussion_r35635248
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
---
@@ -142,17 +146,25 @@
* through the UpdateTaskExecutionState message.
* @param accumulatorSnapshot The serialized flink and user-defined
accumulators
*/
- public void updateAccumulators(AccumulatorSnapshot accumulatorSnapshot)
{
+ public void updateAccumulators(BaseAccumulatorSnapshot
accumulatorSnapshot) {
Map<AccumulatorRegistry.Metric, Accumulator<?, ?>>
flinkAccumulators;
- Map<String, Accumulator<?, ?>> userAccumulators;
+ Map<String, Accumulator<?, ?>> smallUserAccumulators = null;
+ Map<String, List<BlobKey>> largeUserAccumulators = null;
try {
flinkAccumulators =
accumulatorSnapshot.deserializeFlinkAccumulators();
- userAccumulators =
accumulatorSnapshot.deserializeUserAccumulators(userClassLoader);
+
+ if(accumulatorSnapshot instanceof
SmallAccumulatorSnapshot) {
+ smallUserAccumulators =
((SmallAccumulatorSnapshot) accumulatorSnapshot).
+
deserializeSmallUserAccumulators(userClassLoader);
+ } else if(accumulatorSnapshot instanceof
LargeAccumulatorSnapshot) {
+ largeUserAccumulators =
((LargeAccumulatorSnapshot) accumulatorSnapshot).
+ getLargeAccumulatorBlobKeys();
+ }
--- End diff --
You could throw a RuntimeException otherwise.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---