You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Burgess (JIRA)" <ji...@apache.org> on 2019/03/13 19:16:00 UTC

[jira] [Commented] (NIFI-6093) SplitRecord processor doesn't propagate fragment* attributes to original relationship

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

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

Can you describe your use case, where you want to use the original flow file as the Wait/Notify trigger versus the split records? On the original relationship, what would the fragment.index be? I realize it may not be used by MergeRecord or Wait/Notify, but I think having synthetic attribute values could cause more harm than good. Still willing to discuss options though :)

> 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)