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

Matt Burgess commented on NIFI-6093:
------------------------------------

You're right, whether I think using the original is a good idea or not, the 
other Split processors certainly do add those attributes, so there's likely a 
good reason (probably your use case) and at the least SplitRecord should be 
consistent with the other Split processors (hence NIFI-3988). I will add the 
count and ID attributes to the original flow file, thanks for your explanation!

> SplitRecord processor doesn't propagate fragment* attributes to original 
> relationship
> -------------------------------------------------------------------------------------
>
>                 Key: NIFI-6093
>                 URL: https://issues.apache.org/jira/browse/NIFI-6093
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.9.0
>            Reporter: Dmitry Mashkov
>            Priority: Major
>
> Hello Team, 
> As I already described in summary, SplitRecord processor missed fragment* 
> attributes as result it is impossible to use Wait/Notify pattern to wait 
> splits processing. 
> I think follow patch can be applied 
> {code:java}
> Index: 
> nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitRecord.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- 
> nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitRecord.java
>  (date 1550371815000)
> +++ 
> nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitRecord.java
>  (date 1551441180000)
> @@ -206,7 +206,8 @@
> return;
> }
> - session.transfer(original, REL_ORIGINAL);
> + final FlowFile originalFlowFile = 
> FragmentAttributes.copyAttributesToOriginal(session, original, fragmentId, 
> splits.size());
> + session.transfer(originalFlowFile, REL_ORIGINAL);
> // Add the fragment count to each split
> for(FlowFile split : splits) {
> session.putAttribute(split, FRAGMENT_COUNT, String.valueOf(splits.size()));
> {code}
>  
> Sincerely,
> Dmitry.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to