diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java index d447ddd478..6ad65c1f48 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java @@ -103,8 +103,7 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE private final Map records = new HashMap<>(); private final Map connectionCounts = new HashMap<>(); private final Map> unacknowledgedFlowFiles = new HashMap<>(); - private final Map localCounters = new HashMap<>(); - private final Map globalCounters = new HashMap<>(); + private final Map counters = new HashMap<>(); private final Map appendableStreams = new HashMap<>(); private final ProcessContext context; private final Set recursionSet = new HashSet<>();// set used to track what is currently being operated on to prevent logic failures if recursive calls occurring @@ -397,11 +396,7 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE } } - for (final Map.Entry entry : checkpoint.localCounters.entrySet()) { - adjustCounter(entry.getKey(), entry.getValue(), true); - } - - for (final Map.Entry entry : checkpoint.globalCounters.entrySet()) { + for (final Map.Entry entry : checkpoint.counters.entrySet()) { adjustCounter(entry.getKey(), entry.getValue(), true); } @@ -993,8 +988,7 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE connectionCounts.clear(); createdFlowFiles.clear(); removedFlowFiles.clear(); - globalCounters.clear(); - localCounters.clear(); + counters.clear(); generatedProvenanceEvents.clear(); forkEventBuilders.clear(); @@ -1167,8 +1161,7 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE return; } - adjustCounter(name, delta, localCounters); - adjustCounter(name, delta, globalCounters); + adjustCounter(name, delta, counters); } private void adjustCounter(final String name, final long delta, final Map map) { @@ -2554,8 +2547,7 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE private final Map records = new HashMap<>(); private final Map connectionCounts = new HashMap<>(); private final Map> unacknowledgedFlowFiles = new HashMap<>(); - private final Map localCounters = new HashMap<>(); - private final Map globalCounters = new HashMap<>(); + private final Map counters = new HashMap<>(); private final Set deleteOnCommit = new HashSet<>(); private final Set removedFlowFiles = new HashSet<>(); @@ -2581,8 +2573,7 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE this.records.putAll(session.records); this.connectionCounts.putAll(session.connectionCounts); this.unacknowledgedFlowFiles.putAll(session.unacknowledgedFlowFiles); - this.localCounters.putAll(session.localCounters); - this.globalCounters.putAll(session.globalCounters); + this.counters.putAll(session.counters); this.deleteOnCommit.addAll(session.deleteOnCommit); this.removedFlowFiles.addAll(session.removedFlowFiles);