ijokarumawak commented on a change in pull request #3517: NIFI-6349 Fix to
MergeRecords for fragments over multiple iterations
URL: https://github.com/apache/nifi/pull/3517#discussion_r291519991
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/merge/RecordBinManager.java
##########
@@ -195,6 +197,9 @@ private RecordBinThresholds createThresholds() {
final String mergeStrategy =
context.getProperty(MergeRecord.MERGE_STRATEGY).getValue();
if
(MergeRecord.MERGE_STRATEGY_DEFRAGMENT.getValue().equals(mergeStrategy)) {
fragmentCountAttribute = MergeContent.FRAGMENT_COUNT_ATTRIBUTE;
+ if (!StringUtils.isEmpty(fragmentCountAttribute)) {
Review comment:
This if statement always return true as it checks `MergeContent.
FRAGMENT_COUNT_ATTRIBUTE` constant value. I assume you wanted to check whether
`flowfile.getAttribute(fragmentCountAttribute)` is not null/empty?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services