From 382345a624a5095a3fb6e75f6b479e6259ef4bcc Mon Sep 17 00:00:00 2001 From: Prez Cannady Date: Thu, 14 Jan 2016 18:58:41 -0500 Subject: [PATCH] Using AccumulatorSnapshot's class loader deserializing accumulators with the system class loader results in a ClassNotFoundException for AccumulatorRegistry and probably other stuff. Exposed by Spring. --- .../apache/flink/runtime/accumulators/AccumulatorSnapshot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/accumulators/AccumulatorSnapshot.java b/flink-runtime/src/main/java/org/apache/flink/runtime/accumulators/AccumulatorSnapshot.java index b813153c2b5c52..d0f4bad015b6bb 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/accumulators/AccumulatorSnapshot.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/accumulators/AccumulatorSnapshot.java @@ -71,7 +71,7 @@ public ExecutionAttemptID getExecutionAttemptID() { * @return the serialized map */ public Map> deserializeFlinkAccumulators() throws IOException, ClassNotFoundException { - return flinkAccumulators.deserializeValue(ClassLoader.getSystemClassLoader()); + return flinkAccumulators.deserializeValue(getClass().getClassLoader()); } /**