Matthew Clarke created NIFI-4298:
------------------------------------

             Summary: NiFi allows users to remove critical Attributes that are 
needed by processors.
                 Key: NIFI-4298
                 URL: https://issues.apache.org/jira/browse/NIFI-4298
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
    Affects Versions: 1.2.0
            Reporter: Matthew Clarke


The UpdateAttribute processor provides users with the ability to provide a 
"Delete Attributes Expression".   

While FlowFile properties entryDate, lineageDate, fileSize, and uuid are 
protected and can not be removed, FlowFile attributes path and filename can be 
removed.

Removal of these attributes has adverse affects on many other processors.  Any 
processor that will write a FlowFile out requires the filename attribute.

In addition, I have found that the MergeContent processor (configured to use 
FlowFileStreams as the merge strategy). also, for whatever reason, requires 
that the path attribute exists on the FlowFile.

If this attribute is missing, a NPE is thrown and the session is rolled back.

2017-08-14 19:27:00,156 ERROR [Timer-Driven Process Thread-7] 
o.a.n.processors.standard.MergeContent 
MergeContent[id=d7213e1f-0c03-1715-93cc-b1be9228ec36] Failed to process bundle 
of 1 files due to java.lang.NullPointerException; rolling back sessions: {}


A stack trace is not produced even if DEBUG is enabled for this processor.

NiFi needs to prevent users from being able to remove attributes which may be 
"required" by other processors.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to