From c1f90b70cedc7c5d942a67dcc0b12068dbf5acd7 Mon Sep 17 00:00:00 2001 From: Ufuk Celebi Date: Wed, 7 Dec 2016 14:26:35 +0100 Subject: [PATCH] [FLINK-5276] [eg] Check for null when archiving prior execution attempts --- .../flink/runtime/executiongraph/ExecutionVertex.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java index b1e84750fdcdf..e74b4c8a3eedd 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java @@ -132,7 +132,7 @@ public ExecutionVertex( this.jobVertex = jobVertex; this.subTaskIndex = subTaskIndex; - this.resultPartitions = new LinkedHashMap(producedDataSets.length, 1); + this.resultPartitions = new LinkedHashMap<>(producedDataSets.length, 1); for (IntermediateResult result : producedDataSets) { IntermediateResultPartition irp = new IntermediateResultPartition(result, this, subTaskIndex); @@ -580,7 +580,10 @@ public void prepareForArchiving() throws IllegalStateException { // prepare previous executions for archiving for (Execution exec : priorExecutions) { - exec.prepareForArchiving(); + // The bounded list returns null for evicted executions + if (exec != null) { + exec.prepareForArchiving(); + } } // clear the unnecessary fields in this class