[ 
https://issues.apache.org/jira/browse/NIFI-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14282076#comment-14282076
 ] 

Mark Payne commented on NIFI-121:
---------------------------------

Ajay,

Thank you for the contribution!

I looked over the patch. I think this patch will cause an issue: the 
session.clone() is called from 1 session and then the FlowFile returned. A 
different session would then be used to call putAllAttributes and transfer. 
This is going to end up throwing a FlowFileHandlingException with a message 
similar to "FlowFile not known in this session." If this doesn't make sense, 
let me know, and I'll try to clarify.

For what it's worth, this Processor is probably the most complicated of all of 
the processors that we have. I'd highly recommend a unit test for any 
modification here. Hopefully the existing unit tests for this processor are 
easy enough to follow along that it will make sense how to create a test for 
this. Configuring a Minimum Number of Entries and a Maximum Number of Entries 
both as "1" will guarantee that all bins are exactly 1 FlowFile, so that should 
help to test it.

Thanks
-Mark

> When MergeContent is configured to perform Binary Concatenation, if 
> generating bundle of 1 FlowFile, should just Clone original FLowFile instead 
> of copying data
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-121
>                 URL: https://issues.apache.org/jira/browse/NIFI-121
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Matt Gilman
>            Priority: Minor
>
> Much more efficient



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to