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 <bbende@apache.org>
This commit is contained in:
Mark Payne 2018-01-22 14:50:19 -05:00 committed by Bryan Bende
parent 3ebfcd5ae5
commit 6f282c6843
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
1 changed files with 2 additions and 0 deletions

View File

@ -426,6 +426,8 @@ public class MergeContent extends BinFiles {
protected void setUpBinManager(final BinManager binManager, final ProcessContext context) { protected void setUpBinManager(final BinManager binManager, final ProcessContext context) {
if (MERGE_STRATEGY_DEFRAGMENT.equals(context.getProperty(MERGE_STRATEGY).getValue())) { if (MERGE_STRATEGY_DEFRAGMENT.equals(context.getProperty(MERGE_STRATEGY).getValue())) {
binManager.setFileCountAttribute(FRAGMENT_COUNT_ATTRIBUTE); binManager.setFileCountAttribute(FRAGMENT_COUNT_ATTRIBUTE);
} else {
binManager.setFileCountAttribute(null);
} }
} }