From c34a84c8bc91a2642022b51770cabd191c57dfb5 Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Thu, 19 Sep 2024 08:45:35 +0200 Subject: [PATCH] fix: do not accumulate events from different batches --- .../java/io/egm/nifi/reporting/AbstractProvenanceReporter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-provenance-reporting-tasks/src/main/java/io/egm/nifi/reporting/AbstractProvenanceReporter.java b/nifi-provenance-reporting-tasks/src/main/java/io/egm/nifi/reporting/AbstractProvenanceReporter.java index 31e9f32..36edfe0 100644 --- a/nifi-provenance-reporting-tasks/src/main/java/io/egm/nifi/reporting/AbstractProvenanceReporter.java +++ b/nifi-provenance-reporting-tasks/src/main/java/io/egm/nifi/reporting/AbstractProvenanceReporter.java @@ -112,9 +112,9 @@ private void processProvenanceEvents(ReportingContext context) { final List detailsAsError = Arrays.asList(context.getProperty(DETAILS_AS_ERROR).getValue().toLowerCase().split(",")); final String nifiUrl = context.getProperty(NIFI_URL).getValue(); - final List> allSources = new ArrayList<>(); consumer.consumeEvents(context, ((componentMapHolder, provenanceEventRecords) -> { + final List> allSources = new ArrayList<>(); getLogger().debug("Starting to consume events"); for (final ProvenanceEventRecord e: provenanceEventRecords) { getLogger().debug("Processing provenance event: {}", e.getEventId());