Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/2837#discussion_r88906146
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ArchivedExecutionVertex.java
---
@@ -38,9 +39,10 @@
public ArchivedExecutionVertex(ExecutionVertex vertex) {
this.subTaskIndex = vertex.getParallelSubtaskIndex();
- this.priorExecutions = new ArrayList<>();
- for (Execution priorExecution : vertex.getPriorExecutions()) {
- priorExecutions.add(priorExecution.archive());
+ EvictingBoundedList<Execution> copyOfPriorExecutionsList =
vertex.getCopyOfPriorExecutionsList();
+ this.priorExecutions = new
ArrayList<>(copyOfPriorExecutionsList.size());
+ for (Execution priorExecution : copyOfPriorExecutionsList) {
+ priorExecutions.add(priorExecution != null ?
priorExecution.archive() : null);
--- End diff --
Why don't we use the `EvictingBoundedList` here instead of copying all
elements, also those not being contained in the EvictingBoundedList over to an
`ArrayList`? Should save some space.
---
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.
---