From 6f282c6843066f79fc7d53ebec98b4e4bb39f833 Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Mon, 22 Jan 2018 14:50:19 -0500 Subject: [PATCH] NIFI-4803: Ensure that we set the FileCountAttribute of BinManager to the proper value, regardless of the merge strategy This closes #2423. Signed-off-by: Bryan Bende --- .../java/org/apache/nifi/processors/standard/MergeContent.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java index e78cd4f4e8..5b8007b87f 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java @@ -426,6 +426,8 @@ public class MergeContent extends BinFiles { protected void setUpBinManager(final BinManager binManager, final ProcessContext context) { if (MERGE_STRATEGY_DEFRAGMENT.equals(context.getProperty(MERGE_STRATEGY).getValue())) { binManager.setFileCountAttribute(FRAGMENT_COUNT_ATTRIBUTE); + } else { + binManager.setFileCountAttribute(null); } }