Package org.apache.nifi.provenance
Interface ProvenanceReporter
public interface ProvenanceReporter
ProvenanceReporter generates and records Provenance-related events. A
ProvenanceReporter is always tied to a
ProcessSession
. Any events
that are generated are reported to Provenance only after the session has been
committed. If the session is rolled back, the events related to that session
are purged.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Emits a Provenance Event of typeADDINFO
that provides a linkage between the given FlowFile and alternate identifier.void
Emits a Provenance Event of typeCLONE
that establishes that the given child is an exact replica of the parent.void
Emits a Provenance Event of typeCREATE
that indicates that the given FlowFile was created by NiFi from data that was not received from an external entity.void
Emits a Provenance Event of typeCREATE
that indicates that the given FlowFile was created by NiFi from data that was not received from an external entity.void
Emits a Provenance Event of typeFETCH
that indicates that the content of the given FlowFile was overwritten with the data received from an external source.void
Emits a Provenance Event of typeFETCH
that indicates that the content of the given FlowFile was overwritten with the data received from an external source.void
Emits a Provenance Event of typeFETCH
that indicates that the content of the given FlowFile was overwritten with the data received from an external source.void
fork
(FlowFile parent, Collection<FlowFile> children) Emits a Provenance Event of typeFORK
that establishes that the given parent was split into multiple child FlowFiles.void
fork
(FlowFile parent, Collection<FlowFile> children, long forkDuration) Emits a Provenance Event of typeFORK
that establishes that the given parent was split into multiple child FlowFiles.void
fork
(FlowFile parent, Collection<FlowFile> children, String details) Emits a Provenance Event of typeFORK
that establishes that the given parent was split into multiple child FlowFiles.void
fork
(FlowFile parent, Collection<FlowFile> children, String details, long forkDuration) Emits a Provenance Event of typeFORK
that establishes that the given parent was split into multiple child FlowFiles.long
long
long
int
int
int
void
invokeRemoteProcess
(FlowFile flowFile, String transitUri) Emits a Provenance Event of typeProvenanceEventType.REMOTE_INVOCATION
that indicates a remote invocation is requested to an external endpoint using the given FlowFile.void
invokeRemoteProcess
(FlowFile flowFile, String transitUri, String details) Emits a Provenance Event of typeProvenanceEventType.REMOTE_INVOCATION
that indicates a remote invocation is requested to an external endpoint using the given FlowFile.void
join
(Collection<FlowFile> parents, FlowFile child) Emits a Provenance Event of typeJOIN
that establishes that the given parents were joined together to create a new child FlowFile.void
join
(Collection<FlowFile> parents, FlowFile child, long joinDuration) Emits a Provenance Event of typeJOIN
that establishes that the given parents were joined together to create a new child FlowFile.void
join
(Collection<FlowFile> parents, FlowFile child, String details) Emits a Provenance Event of typeJOIN
that establishes that the given parents were joined together to create a new child FlowFile.void
join
(Collection<FlowFile> parents, FlowFile child, String details, long joinDuration) Emits a Provenance Event of typeJOIN
that establishes that the given parents were joined together to create a new child FlowFile.void
modifyAttributes
(FlowFile flowFile) Emits a Provenance Event of typeATTRIBUTES_MODIFIED
that indicates that the Attributes of the given FlowFile were updated.void
modifyAttributes
(FlowFile flowFile, String details) Emits a Provenance Event of typeATTRIBUTES_MODIFIED
that indicates that the Attributes of the given FlowFile were updated.void
modifyContent
(FlowFile flowFile) Emits a Provenance Event of typeCONTENT_MODIFIED
that indicates that the content of the given FlowFile has been modified.void
modifyContent
(FlowFile flowFile, long processingMillis) Emits a Provenance Event of typeCONTENT_MODIFIED
that indicates that the content of the given FlowFile has been modified.void
modifyContent
(FlowFile flowFile, String details) Emits a Provenance Event of typeCONTENT_MODIFIED
that indicates that the content of the given FlowFile has been modified.void
modifyContent
(FlowFile flowFile, String details, long processingMillis) Emits a Provenance Event of typeCONTENT_MODIFIED
that indicates that the content of the given FlowFile has been modified.void
Emits a Provenance Event of typeRECEIVE
that indicates that the given FlowFile was created from data received from an external source.void
Emits a Provenance Event of typeRECEIVE
that indicates that the given FlowFile was created from data received from an external source.void
Emits a Provenance Event of typeRECEIVE
that indicates that the given FlowFile was created from data received from the specified URI and that the source system used the specified identifier (a URI with namespace) to refer to the data.void
Emits a Provenance Event of typeRECEIVE
that indicates that the given FlowFile was created from data received from an external source and provides additional details about the receipt of the FlowFile, such as a remote system's Distinguished Name.void
receive
(FlowFile flowFile, String transitUri, String sourceSystemFlowFileIdentifier, String details, long transmissionMillis) Emits a Provenance Event of typeRECEIVE
that indicates that the given FlowFile was created from data received from an external source and provides additional details about the receipt of the FlowFile, such as a remote system's Distinguished Name.void
route
(FlowFile flowFile, Relationship relationship) Emits a Provenance Event of typeROUTE
that indicates that the given FlowFile was routed to the givenRelationship
.void
route
(FlowFile flowFile, Relationship relationship, long processingDuration) Emits a Provenance Event of typeROUTE
that indicates that the given FlowFile was routed to the givenRelationship
.void
route
(FlowFile flowFile, Relationship relationship, String details) Emits a Provenance Event of typeROUTE
that indicates that the given FlowFile was routed to the givenRelationship
.void
route
(FlowFile flowFile, Relationship relationship, String details, long processingDuration) Emits a Provenance Event of typeROUTE
that indicates that the given FlowFile was routed to the givenRelationship
.void
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination.void
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination.void
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination.void
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination.void
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination.void
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination.void
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination.void
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination.
-
Method Details
-
receive
Emits a Provenance Event of typeRECEIVE
that indicates that the given FlowFile was created from data received from an external source.- Parameters:
flowFile
- the FlowFile that was receivedtransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.
-
receive
Emits a Provenance Event of typeRECEIVE
that indicates that the given FlowFile was created from data received from the specified URI and that the source system used the specified identifier (a URI with namespace) to refer to the data.- Parameters:
flowFile
- the FlowFile that was receivedtransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.sourceSystemFlowFileIdentifier
- the URI/identifier that the source system uses to refer to the data; if this value is non-null and is not a URI, the prefix "urn:tdo:" will be used to form a URI.
-
receive
Emits a Provenance Event of typeRECEIVE
that indicates that the given FlowFile was created from data received from an external source.- Parameters:
flowFile
- the FlowFile that was receivedtransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.transmissionMillis
- the number of milliseconds taken to transfer the data
-
receive
Emits a Provenance Event of typeRECEIVE
that indicates that the given FlowFile was created from data received from an external source and provides additional details about the receipt of the FlowFile, such as a remote system's Distinguished Name.- Parameters:
flowFile
- the FlowFile that was receivedtransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.details
- details about the receive event; for example, it may be relevant to include the DN of the sending systemtransmissionMillis
- the number of milliseconds taken to transfer the data
-
receive
void receive(FlowFile flowFile, String transitUri, String sourceSystemFlowFileIdentifier, String details, long transmissionMillis) Emits a Provenance Event of typeRECEIVE
that indicates that the given FlowFile was created from data received from an external source and provides additional details about the receipt of the FlowFile, such as a remote system's Distinguished Name.- Parameters:
flowFile
- the FlowFile that was receivedtransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.sourceSystemFlowFileIdentifier
- the URI/identifier that the source system uses to refer to the data; if this value is non-null and is not a URI, the prefix "urn:tdo:" will be used to form a URI.details
- details about the receive event; for example, it may be relevant to include the DN of the sending systemtransmissionMillis
- the number of milliseconds taken to transfer the data
-
fetch
Emits a Provenance Event of typeFETCH
that indicates that the content of the given FlowFile was overwritten with the data received from an external source.- Parameters:
flowFile
- the FlowFile whose content was replacedtransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred.
-
fetch
Emits a Provenance Event of typeFETCH
that indicates that the content of the given FlowFile was overwritten with the data received from an external source.- Parameters:
flowFile
- the FlowFile whose content was replacedtransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred.transmissionMillis
- the number of milliseconds taken to transfer the data
-
fetch
Emits a Provenance Event of typeFETCH
that indicates that the content of the given FlowFile was overwritten with the data received from an external source.- Parameters:
flowFile
- the FlowFile whose content was replacedtransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred.details
- details about the eventtransmissionMillis
- the number of milliseconds taken to transfer the data
-
send
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination. The external destination may be a remote system or may be a local destination, such as the local file system but is external to NiFi.- Parameters:
flowFile
- the FlowFile that was senttransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.
-
send
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination. The external destination may be a remote system or may be a local destination, such as the local file system but is external to NiFi.- Parameters:
flowFile
- the FlowFile that was senttransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.details
- additional details related to the SEND event, such as a remote system's Distinguished Name
-
send
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination. The external destination may be a remote system or may be a local destination, such as the local file system but is external to NiFi.- Parameters:
flowFile
- the FlowFile that was senttransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.transmissionMillis
- the number of milliseconds spent sending the data to the remote system
-
send
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination. The external destination may be a remote system or may be a local destination, such as the local file system but is external to NiFi.- Parameters:
flowFile
- the FlowFile that was senttransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.details
- additional details related to the SEND event, such as a remote system's Distinguished NametransmissionMillis
- the number of milliseconds spent sending the data to the remote system
-
send
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination. The external destination may be a remote system or may be a local destination, such as the local file system but is external to NiFi.- Parameters:
flowFile
- the FlowFile that was senttransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.force
- iftrue
, this event will be added to the Provenance Repository immediately and will still be persisted if theProcessSession
to which this ProvenanceReporter is associated is rolled back. Otherwise, the Event will be recorded only on a successful session commit.
-
send
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination. The external destination may be a remote system or may be a local destination, such as the local file system but is external to NiFi.- Parameters:
flowFile
- the FlowFile that was senttransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.details
- additional details related to the SEND event, such as a remote system's Distinguished Nameforce
- iftrue
, this event will be added to the Provenance Repository immediately and will still be persisted if theProcessSession
to which this ProvenanceReporter is associated is rolled back. Otherwise, the Event will be recorded only on a successful session commit.
-
send
Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination. The external destination may be a remote system or may be a local destination, such as the local file system but is external to NiFi.- Parameters:
flowFile
- the FlowFile that was senttransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.transmissionMillis
- the number of milliseconds spent sending the data to the remote systemforce
- iftrue
, this event will be added to the Provenance Repository immediately and will still be persisted if theProcessSession
to which this ProvenanceReporter is associated is rolled back. Otherwise, the Event will be recorded only on a successful session commit.
-
send
void send(FlowFile flowFile, String transitUri, String details, long transmissionMillis, boolean force) Emits a Provenance Event of typeSEND
that indicates that a copy of the given FlowFile was sent to an external destination. The external destination may be a remote system or may be a local destination, such as the local file system but is external to NiFi.- Parameters:
flowFile
- the FlowFile that was senttransitUri
- A URI that provides information about the System and Protocol information over which the transfer occurred. The intent of this field is such that both the sender and the receiver can publish the events to an external Enterprise-wide system that is then able to correlate the SEND and RECEIVE events.details
- additional details related to the SEND event, such as a remote system's Distinguished NametransmissionMillis
- the number of milliseconds spent sending the data to the remote systemforce
- iftrue
, this event will be added to the Provenance Repository immediately and will still be persisted if theProcessSession
to which this ProvenanceReporter is associated is rolled back. Otherwise, the Event will be recorded only on a successful session commit.
-
invokeRemoteProcess
Emits a Provenance Event of typeProvenanceEventType.REMOTE_INVOCATION
that indicates a remote invocation is requested to an external endpoint using the given FlowFile. The external endpoint may exist in a remote or a local system, but is external to NiFi.- Parameters:
flowFile
- the FlowFile that was used to make the remote invocationtransitUri
- A URI that provides information about the System and Protocol information over which the invocation occurred. The intent of this field is to identify they type and target resource or object of the invocation.
-
invokeRemoteProcess
Emits a Provenance Event of typeProvenanceEventType.REMOTE_INVOCATION
that indicates a remote invocation is requested to an external endpoint using the given FlowFile. The external endpoint may exist in a remote or a local system, but is external to NiFi.- Parameters:
flowFile
- the FlowFile that was used to make the remote invocationtransitUri
- A URI that provides information about the System and Protocol information over which the invocation occurred. The intent of this field is to identify they type and target resource or object of the invocation.details
- additional details related to the REMOTE_INVOCATION event, such as an explanation of the invoked process.
-
associate
Emits a Provenance Event of typeADDINFO
that provides a linkage between the given FlowFile and alternate identifier. This information can be useful if published to an external, enterprise-wide Provenance tracking system that is able to associate the data between different processes.- Parameters:
flowFile
- the FlowFile for which the association should be madealternateIdentifierNamespace
- the namespace of the alternate systemalternateIdentifier
- the identifier that the alternate system uses when referring to the data that is encompassed by this FlowFile
-
fork
Emits a Provenance Event of typeFORK
that establishes that the given parent was split into multiple child FlowFiles. In general, this method does not need to be called by Processors, as the ProcessSession will handle this automatically for you when callingProcessSession.create(FlowFile)
.- Parameters:
parent
- the FlowFile from which the children are derivedchildren
- the FlowFiles that are derived from the parent.
-
fork
Emits a Provenance Event of typeFORK
that establishes that the given parent was split into multiple child FlowFiles. In general, this method does not need to be called by Processors, as the ProcessSession will handle this automatically for you when callingProcessSession.create(FlowFile)
.- Parameters:
parent
- the FlowFile from which the children are derivedchildren
- the FlowFiles that are derived from the parent.details
- any details pertinent to the fork
-
fork
Emits a Provenance Event of typeFORK
that establishes that the given parent was split into multiple child FlowFiles. In general, this method does not need to be called by Processors, as the ProcessSession will handle this automatically for you when callingProcessSession.create(FlowFile)
.- Parameters:
parent
- the FlowFile from which the children are derivedchildren
- the FlowFiles that are derived from the parent.forkDuration
- the number of milliseconds that it took to perform the task
-
fork
Emits a Provenance Event of typeFORK
that establishes that the given parent was split into multiple child FlowFiles. In general, this method does not need to be called by Processors, as the ProcessSession will handle this automatically for you when callingProcessSession.create(FlowFile)
.- Parameters:
parent
- the FlowFile from which the children are derivedchildren
- the FlowFiles that are derived from the parent.details
- any details pertinent to the forkforkDuration
- the number of milliseconds that it took to perform the task
-
join
Emits a Provenance Event of typeJOIN
that establishes that the given parents were joined together to create a new child FlowFile. In general, this method does not need to be called by Processors, as the ProcessSession will handle this automatically for you when callingProcessSession.create(FlowFile)
.- Parameters:
parents
- the FlowFiles that are being joined together to create the childchild
- the FlowFile that is being created by joining the parents
-
join
Emits a Provenance Event of typeJOIN
that establishes that the given parents were joined together to create a new child FlowFile. In general, this method does not need to be called by Processors, as the ProcessSession will handle this automatically for you when callingProcessSession.create(FlowFile)
.- Parameters:
parents
- the FlowFiles that are being joined together to create the childchild
- the FlowFile that is being created by joining the parentsdetails
- any details pertinent to the event
-
join
Emits a Provenance Event of typeJOIN
that establishes that the given parents were joined together to create a new child FlowFile. In general, this method does not need to be called by Processors, as the ProcessSession will handle this automatically for you when callingProcessSession.create(FlowFile)
.- Parameters:
parents
- the FlowFiles that are being joined together to create the childchild
- the FlowFile that is being created by joining the parentsjoinDuration
- the number of milliseconds that it took to join the FlowFiles
-
join
Emits a Provenance Event of typeJOIN
that establishes that the given parents were joined together to create a new child FlowFile. In general, this method does not need to be called by Processors, as the ProcessSession will handle this automatically for you when callingProcessSession.create(FlowFile)
.- Parameters:
parents
- the FlowFiles that are being joined together to create the childchild
- the FlowFile that is being created by joining the parentsdetails
- any details pertinent to the eventjoinDuration
- the number of milliseconds that it took to join the FlowFiles
-
clone
Emits a Provenance Event of typeCLONE
that establishes that the given child is an exact replica of the parent. In general, this method does not need to be called by Processors, as theProcessSession
will handle this automatically for you when callingProcessSession.clone(FlowFile)
- Parameters:
parent
- the FlowFile that was clonedchild
- the clone
-
modifyContent
Emits a Provenance Event of typeCONTENT_MODIFIED
that indicates that the content of the given FlowFile has been modified. One of themodifyContent
methods should be called any time that the contents of a FlowFile are modified.- Parameters:
flowFile
- the FlowFile whose content is being modified
-
modifyContent
Emits a Provenance Event of typeCONTENT_MODIFIED
that indicates that the content of the given FlowFile has been modified. One of themodifyContent
methods should be called any time that the contents of a FlowFile are modified.- Parameters:
flowFile
- the FlowFile whose content is being modifieddetails
- Any details about how the content of the FlowFile has been modified. Details should not be specified if they can be inferred by other information in the event, such as the name of the Processor, as specifying this information will add undue overhead
-
modifyContent
Emits a Provenance Event of typeCONTENT_MODIFIED
that indicates that the content of the given FlowFile has been modified. One of themodifyContent
methods should be called any time that the contents of a FlowFile are modified.- Parameters:
flowFile
- the FlowFile whose content is being modifiedprocessingMillis
- the number of milliseconds spent processing the FlowFile
-
modifyContent
Emits a Provenance Event of typeCONTENT_MODIFIED
that indicates that the content of the given FlowFile has been modified. One of themodifyContent
methods should be called any time that the contents of a FlowFile are modified.- Parameters:
flowFile
- the FlowFile whose content is being modifieddetails
- Any details about how the content of the FlowFile has been modified. Details should not be specified if they can be inferred by other information in the event, such as the name of the Processor, as specifying this information will add undue overheadprocessingMillis
- the number of milliseconds spent processing the FlowFile
-
modifyAttributes
Emits a Provenance Event of typeATTRIBUTES_MODIFIED
that indicates that the Attributes of the given FlowFile were updated. It is not necessary to emit such an event for a FlowFile if other Events are already emitted by a Processor. For example, one should call bothmodifyContent(FlowFile)
andmodifyAttributes(FlowFile)
for the same FlowFile in the same Processor. Rather, the Processor should call just themodifyContent(FlowFile)
, as the call tomodifyContent(FlowFile)
will generate a Provenance Event that already contains all FlowFile attributes. As such, emitting another event that contains those attributes is unneeded and can result in a significant amount of overhead for storage and processing.- Parameters:
flowFile
- the FlowFile whose attributes were modified
-
modifyAttributes
Emits a Provenance Event of typeATTRIBUTES_MODIFIED
that indicates that the Attributes of the given FlowFile were updated. It is not necessary to emit such an event for a FlowFile if other Events are already emitted by a Processor. For example, one should call bothmodifyContent(FlowFile)
andmodifyAttributes(FlowFile)
for the same FlowFile in the same Processor. Rather, the Processor should call just themodifyContent(FlowFile)
, as the call tomodifyContent(FlowFile)
will generate a Provenance Event that already contains all FlowFile attributes. As such, emitting another event that contains those attributes is unneeded and can result in a significant amount of overhead for storage and processing.- Parameters:
flowFile
- the FlowFile whose attributes were modifieddetails
- any details should be provided about the attribute modification
-
route
Emits a Provenance Event of typeROUTE
that indicates that the given FlowFile was routed to the givenRelationship
. Note: this Event is intended for Processors whose sole job it is to route FlowFiles and should NOT be used as a way to indicate that the given FlowFile was routed to a standard 'success' or 'failure' relationship. Doing so can be problematic, as DataFlow Managers often will loop 'failure' relationships back to the same processor. As such, emitting a Route event to indicate that a FlowFile was routed to 'failure' can result in creating thousands of Provenance Events for a given FlowFile, resulting in a very difficult-to- understand lineage.- Parameters:
flowFile
- the FlowFile being routedrelationship
- the Relationship to which the FlowFile was routed
-
route
Emits a Provenance Event of typeROUTE
that indicates that the given FlowFile was routed to the givenRelationship
. Note: this Event is intended ONLY for Processors whose sole job it is to route FlowFiles and should NOT be used as a way to indicate that hte given FlowFile was routed to a standard 'success' or 'failure' relationship. Doing so can be problematic, as DataFlow Managers often will loop 'failure' relationships back to the same processor. As such, emitting a Route event to indicate that a FlowFile was routed to 'failure' can result in creating thousands of Provenance Events for a given FlowFile, resulting in a very difficult-to- understand lineage.- Parameters:
flowFile
- the FlowFile being routedrelationship
- the Relationship to which the FlowFile was routeddetails
- any details pertinent to the Route event, such as why the FlowFile was routed to the specified Relationship
-
route
Emits a Provenance Event of typeROUTE
that indicates that the given FlowFile was routed to the givenRelationship
. Note: this Event is intended ONLY for Processors whose sole job it is to route FlowFiles and should NOT be used as a way to indicate that hte given FlowFile was routed to a standard 'success' or 'failure' relationship. Doing so can be problematic, as DataFlow Managers often will loop 'failure' relationships back to the same processor. As such, emitting a Route event to indicate that a FlowFile was routed to 'failure' can result in creating thousands of Provenance Events for a given FlowFile, resulting in a very difficult-to- understand lineage.- Parameters:
flowFile
- the FlowFile being routedrelationship
- the Relationship to which the FlowFile was routedprocessingDuration
- the number of milliseconds that it took to determine how to route the FlowFile
-
route
Emits a Provenance Event of typeROUTE
that indicates that the given FlowFile was routed to the givenRelationship
. Note: this Event is intended ONLY for Processors whose sole job it is to route FlowFiles and should NOT be used as a way to indicate that hte given FlowFile was routed to a standard 'success' or 'failure' relationship. Doing so can be problematic, as DataFlow Managers often will loop 'failure' relationships back to the same processor. As such, emitting a Route event to indicate that a FlowFile was routed to 'failure' can result in creating thousands of Provenance Events for a given FlowFile, resulting in a very difficult-to- understand lineage.- Parameters:
flowFile
- the FlowFile being routedrelationship
- the Relationship to which the FlowFile was routeddetails
- any details pertinent to the Route event, such as why the FlowFile was routed to the specified RelationshipprocessingDuration
- the number of milliseconds that it took to determine how to route the FlowFile
-
create
Emits a Provenance Event of typeCREATE
that indicates that the given FlowFile was created by NiFi from data that was not received from an external entity. If the data was received from an external source, use thereceive(FlowFile, String)
event instead- Parameters:
flowFile
- the FlowFile that was created
-
create
Emits a Provenance Event of typeCREATE
that indicates that the given FlowFile was created by NiFi from data that was not received from an external entity. If the data was received from an external source, use thereceive(FlowFile, String, String, long)
event instead- Parameters:
flowFile
- the FlowFile that was createddetails
- any relevant details about the CREATE event
-
getFlowFilesReceived
int getFlowFilesReceived()- Returns:
- the number of FlowFiles for which there was a RECEIVE event
-
getBytesReceived
long getBytesReceived()- Returns:
- the sum of the sizes of all FlowFiles for which there was a RECEIVE event
-
getFlowFilesFetched
int getFlowFilesFetched()- Returns:
- the number of FlowFiles for which there was a FETCH event
-
getBytesFetched
long getBytesFetched()- Returns:
- the sum of the sizes of all FlowFiles for which there was a FETCH event
-
getFlowFilesSent
int getFlowFilesSent()- Returns:
- the number of FlowFiles for which there was a SEND event
-
getBytesSent
long getBytesSent()- Returns:
- the sum of the sizes of all FlowFiles for which there was a SEND event
-