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 Type
    Method
    Description
    void
    associate(FlowFile flowFile, String alternateIdentifierNamespace, String alternateIdentifier)
    Emits a Provenance Event of type ADDINFO that provides a linkage between the given FlowFile and alternate identifier.
    void
    clone(FlowFile parent, FlowFile child)
    Emits a Provenance Event of type CLONE that establishes that the given child is an exact replica of the parent.
    void
    create(FlowFile flowFile)
    Emits a Provenance Event of type CREATE that indicates that the given FlowFile was created by NiFi from data that was not received from an external entity.
    void
    create(FlowFile flowFile, String details)
    Emits a Provenance Event of type CREATE that indicates that the given FlowFile was created by NiFi from data that was not received from an external entity.
    void
    fetch(FlowFile flowFile, String transitUri)
    Emits a Provenance Event of type FETCH that indicates that the content of the given FlowFile was overwritten with the data received from an external source.
    void
    fetch(FlowFile flowFile, String transitUri, long transmissionMillis)
    Emits a Provenance Event of type FETCH that indicates that the content of the given FlowFile was overwritten with the data received from an external source.
    void
    fetch(FlowFile flowFile, String transitUri, String details, long transmissionMillis)
    Emits a Provenance Event of type FETCH 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 type FORK 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 type FORK 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 type FORK 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 type FORK 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 type ProvenanceEventType.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 type ProvenanceEventType.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 type JOIN 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 type JOIN 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 type JOIN 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 type JOIN that establishes that the given parents were joined together to create a new child FlowFile.
    void
    Emits a Provenance Event of type ATTRIBUTES_MODIFIED that indicates that the Attributes of the given FlowFile were updated.
    void
    modifyAttributes(FlowFile flowFile, String details)
    Emits a Provenance Event of type ATTRIBUTES_MODIFIED that indicates that the Attributes of the given FlowFile were updated.
    void
    Emits a Provenance Event of type CONTENT_MODIFIED that indicates that the content of the given FlowFile has been modified.
    void
    modifyContent(FlowFile flowFile, long processingMillis)
    Emits a Provenance Event of type CONTENT_MODIFIED that indicates that the content of the given FlowFile has been modified.
    void
    modifyContent(FlowFile flowFile, String details)
    Emits a Provenance Event of type CONTENT_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 type CONTENT_MODIFIED that indicates that the content of the given FlowFile has been modified.
    void
    receive(FlowFile flowFile, String transitUri)
    Emits a Provenance Event of type RECEIVE that indicates that the given FlowFile was created from data received from an external source.
    void
    receive(FlowFile flowFile, String transitUri, long transmissionMillis)
    Emits a Provenance Event of type RECEIVE that indicates that the given FlowFile was created from data received from an external source.
    void
    receive(FlowFile flowFile, String transitUri, String sourceSystemFlowFileIdentifier)
    Emits a Provenance Event of type RECEIVE 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
    receive(FlowFile flowFile, String transitUri, String details, long transmissionMillis)
    Emits a Provenance Event of type RECEIVE 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 type RECEIVE 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 type ROUTE that indicates that the given FlowFile was routed to the given Relationship.
    void
    route(FlowFile flowFile, Relationship relationship, long processingDuration)
    Emits a Provenance Event of type ROUTE that indicates that the given FlowFile was routed to the given Relationship.
    void
    route(FlowFile flowFile, Relationship relationship, String details)
    Emits a Provenance Event of type ROUTE that indicates that the given FlowFile was routed to the given Relationship.
    void
    route(FlowFile flowFile, Relationship relationship, String details, long processingDuration)
    Emits a Provenance Event of type ROUTE that indicates that the given FlowFile was routed to the given Relationship.
    void
    send(FlowFile flowFile, String transitUri)
    Emits a Provenance Event of type SEND that indicates that a copy of the given FlowFile was sent to an external destination.
    void
    send(FlowFile flowFile, String transitUri, boolean force)
    Emits a Provenance Event of type SEND that indicates that a copy of the given FlowFile was sent to an external destination.
    void
    send(FlowFile flowFile, String transitUri, long transmissionMillis)
    Emits a Provenance Event of type SEND that indicates that a copy of the given FlowFile was sent to an external destination.
    void
    send(FlowFile flowFile, String transitUri, long transmissionMillis, boolean force)
    Emits a Provenance Event of type SEND that indicates that a copy of the given FlowFile was sent to an external destination.
    void
    send(FlowFile flowFile, String transitUri, String details)
    Emits a Provenance Event of type SEND that indicates that a copy of the given FlowFile was sent to an external destination.
    void
    send(FlowFile flowFile, String transitUri, String details, boolean force)
    Emits a Provenance Event of type SEND that indicates that a copy of the given FlowFile was sent to an external destination.
    void
    send(FlowFile flowFile, String transitUri, String details, long transmissionMillis)
    Emits a Provenance Event of type SEND that indicates that a copy of the given FlowFile was sent to an external destination.
    void
    send(FlowFile flowFile, String transitUri, String details, long transmissionMillis, boolean force)
    Emits a Provenance Event of type SEND that indicates that a copy of the given FlowFile was sent to an external destination.
  • Method Details

    • receive

      void receive(FlowFile flowFile, String transitUri)
      Emits a Provenance Event of type RECEIVE that indicates that the given FlowFile was created from data received from an external source.
      Parameters:
      flowFile - the FlowFile that was received
      transitUri - 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

      void receive(FlowFile flowFile, String transitUri, String sourceSystemFlowFileIdentifier)
      Emits a Provenance Event of type RECEIVE 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 received
      transitUri - 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

      void receive(FlowFile flowFile, String transitUri, long transmissionMillis)
      Emits a Provenance Event of type RECEIVE that indicates that the given FlowFile was created from data received from an external source.
      Parameters:
      flowFile - the FlowFile that was received
      transitUri - 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

      void receive(FlowFile flowFile, String transitUri, String details, long transmissionMillis)
      Emits a Provenance Event of type RECEIVE 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 received
      transitUri - 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 system
      transmissionMillis - 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 type RECEIVE 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 received
      transitUri - 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 system
      transmissionMillis - the number of milliseconds taken to transfer the data
    • fetch

      void fetch(FlowFile flowFile, String transitUri)
      Emits a Provenance Event of type FETCH 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 replaced
      transitUri - A URI that provides information about the System and Protocol information over which the transfer occurred.
    • fetch

      void fetch(FlowFile flowFile, String transitUri, long transmissionMillis)
      Emits a Provenance Event of type FETCH 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 replaced
      transitUri - 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

      void fetch(FlowFile flowFile, String transitUri, String details, long transmissionMillis)
      Emits a Provenance Event of type FETCH 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 replaced
      transitUri - A URI that provides information about the System and Protocol information over which the transfer occurred.
      details - details about the event
      transmissionMillis - the number of milliseconds taken to transfer the data
    • send

      void send(FlowFile flowFile, String transitUri)
      Emits a Provenance Event of type SEND 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 sent
      transitUri - 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

      void send(FlowFile flowFile, String transitUri, String details)
      Emits a Provenance Event of type SEND 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 sent
      transitUri - 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

      void send(FlowFile flowFile, String transitUri, long transmissionMillis)
      Emits a Provenance Event of type SEND 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 sent
      transitUri - 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

      void send(FlowFile flowFile, String transitUri, String details, long transmissionMillis)
      Emits a Provenance Event of type SEND 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 sent
      transitUri - 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
      transmissionMillis - the number of milliseconds spent sending the data to the remote system
    • send

      void send(FlowFile flowFile, String transitUri, boolean force)
      Emits a Provenance Event of type SEND 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 sent
      transitUri - 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 - if true, this event will be added to the Provenance Repository immediately and will still be persisted if the ProcessSession 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, boolean force)
      Emits a Provenance Event of type SEND 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 sent
      transitUri - 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
      force - if true, this event will be added to the Provenance Repository immediately and will still be persisted if the ProcessSession 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, long transmissionMillis, boolean force)
      Emits a Provenance Event of type SEND 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 sent
      transitUri - 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
      force - if true, this event will be added to the Provenance Repository immediately and will still be persisted if the ProcessSession 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 type SEND 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 sent
      transitUri - 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
      transmissionMillis - the number of milliseconds spent sending the data to the remote system
      force - if true, this event will be added to the Provenance Repository immediately and will still be persisted if the ProcessSession to which this ProvenanceReporter is associated is rolled back. Otherwise, the Event will be recorded only on a successful session commit.
    • invokeRemoteProcess

      void invokeRemoteProcess(FlowFile flowFile, String transitUri)
      Emits a Provenance Event of type ProvenanceEventType.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 invocation
      transitUri - 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

      void invokeRemoteProcess(FlowFile flowFile, String transitUri, String details)
      Emits a Provenance Event of type ProvenanceEventType.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 invocation
      transitUri - 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

      void associate(FlowFile flowFile, String alternateIdentifierNamespace, String alternateIdentifier)
      Emits a Provenance Event of type ADDINFO 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 made
      alternateIdentifierNamespace - the namespace of the alternate system
      alternateIdentifier - the identifier that the alternate system uses when referring to the data that is encompassed by this FlowFile
    • fork

      void fork(FlowFile parent, Collection<FlowFile> children)
      Emits a Provenance Event of type FORK 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 calling ProcessSession.create(FlowFile).
      Parameters:
      parent - the FlowFile from which the children are derived
      children - the FlowFiles that are derived from the parent.
    • fork

      void fork(FlowFile parent, Collection<FlowFile> children, String details)
      Emits a Provenance Event of type FORK 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 calling ProcessSession.create(FlowFile).
      Parameters:
      parent - the FlowFile from which the children are derived
      children - the FlowFiles that are derived from the parent.
      details - any details pertinent to the fork
    • fork

      void fork(FlowFile parent, Collection<FlowFile> children, long forkDuration)
      Emits a Provenance Event of type FORK 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 calling ProcessSession.create(FlowFile).
      Parameters:
      parent - the FlowFile from which the children are derived
      children - the FlowFiles that are derived from the parent.
      forkDuration - the number of milliseconds that it took to perform the task
    • fork

      void fork(FlowFile parent, Collection<FlowFile> children, String details, long forkDuration)
      Emits a Provenance Event of type FORK 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 calling ProcessSession.create(FlowFile).
      Parameters:
      parent - the FlowFile from which the children are derived
      children - the FlowFiles that are derived from the parent.
      details - any details pertinent to the fork
      forkDuration - the number of milliseconds that it took to perform the task
    • join

      void join(Collection<FlowFile> parents, FlowFile child)
      Emits a Provenance Event of type JOIN 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 calling ProcessSession.create(FlowFile).
      Parameters:
      parents - the FlowFiles that are being joined together to create the child
      child - the FlowFile that is being created by joining the parents
    • join

      void join(Collection<FlowFile> parents, FlowFile child, String details)
      Emits a Provenance Event of type JOIN 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 calling ProcessSession.create(FlowFile).
      Parameters:
      parents - the FlowFiles that are being joined together to create the child
      child - the FlowFile that is being created by joining the parents
      details - any details pertinent to the event
    • join

      void join(Collection<FlowFile> parents, FlowFile child, long joinDuration)
      Emits a Provenance Event of type JOIN 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 calling ProcessSession.create(FlowFile).
      Parameters:
      parents - the FlowFiles that are being joined together to create the child
      child - the FlowFile that is being created by joining the parents
      joinDuration - the number of milliseconds that it took to join the FlowFiles
    • join

      void join(Collection<FlowFile> parents, FlowFile child, String details, long joinDuration)
      Emits a Provenance Event of type JOIN 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 calling ProcessSession.create(FlowFile).
      Parameters:
      parents - the FlowFiles that are being joined together to create the child
      child - the FlowFile that is being created by joining the parents
      details - any details pertinent to the event
      joinDuration - the number of milliseconds that it took to join the FlowFiles
    • clone

      void clone(FlowFile parent, FlowFile child)
      Emits a Provenance Event of type CLONE 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 the ProcessSession will handle this automatically for you when calling ProcessSession.clone(FlowFile)
      Parameters:
      parent - the FlowFile that was cloned
      child - the clone
    • modifyContent

      void modifyContent(FlowFile flowFile)
      Emits a Provenance Event of type CONTENT_MODIFIED that indicates that the content of the given FlowFile has been modified. One of the modifyContent methods should be called any time that the contents of a FlowFile are modified.
      Parameters:
      flowFile - the FlowFile whose content is being modified
    • modifyContent

      void modifyContent(FlowFile flowFile, String details)
      Emits a Provenance Event of type CONTENT_MODIFIED that indicates that the content of the given FlowFile has been modified. One of the modifyContent methods should be called any time that the contents of a FlowFile are modified.
      Parameters:
      flowFile - the FlowFile whose content is being modified
      details - 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

      void modifyContent(FlowFile flowFile, long processingMillis)
      Emits a Provenance Event of type CONTENT_MODIFIED that indicates that the content of the given FlowFile has been modified. One of the modifyContent methods should be called any time that the contents of a FlowFile are modified.
      Parameters:
      flowFile - the FlowFile whose content is being modified
      processingMillis - the number of milliseconds spent processing the FlowFile
    • modifyContent

      void modifyContent(FlowFile flowFile, String details, long processingMillis)
      Emits a Provenance Event of type CONTENT_MODIFIED that indicates that the content of the given FlowFile has been modified. One of the modifyContent methods should be called any time that the contents of a FlowFile are modified.
      Parameters:
      flowFile - the FlowFile whose content is being modified
      details - 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
      processingMillis - the number of milliseconds spent processing the FlowFile
    • modifyAttributes

      void modifyAttributes(FlowFile flowFile)
      Emits a Provenance Event of type ATTRIBUTES_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 both modifyContent(FlowFile) and modifyAttributes(FlowFile) for the same FlowFile in the same Processor. Rather, the Processor should call just the modifyContent(FlowFile), as the call to modifyContent(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

      void modifyAttributes(FlowFile flowFile, String details)
      Emits a Provenance Event of type ATTRIBUTES_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 both modifyContent(FlowFile) and modifyAttributes(FlowFile) for the same FlowFile in the same Processor. Rather, the Processor should call just the modifyContent(FlowFile), as the call to modifyContent(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
      details - any details should be provided about the attribute modification
    • route

      void route(FlowFile flowFile, Relationship relationship)
      Emits a Provenance Event of type ROUTE that indicates that the given FlowFile was routed to the given Relationship. 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 routed
      relationship - the Relationship to which the FlowFile was routed
    • route

      void route(FlowFile flowFile, Relationship relationship, String details)
      Emits a Provenance Event of type ROUTE that indicates that the given FlowFile was routed to the given Relationship. 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 routed
      relationship - the Relationship to which the FlowFile was routed
      details - any details pertinent to the Route event, such as why the FlowFile was routed to the specified Relationship
    • route

      void route(FlowFile flowFile, Relationship relationship, long processingDuration)
      Emits a Provenance Event of type ROUTE that indicates that the given FlowFile was routed to the given Relationship. 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 routed
      relationship - the Relationship to which the FlowFile was routed
      processingDuration - the number of milliseconds that it took to determine how to route the FlowFile
    • route

      void route(FlowFile flowFile, Relationship relationship, String details, long processingDuration)
      Emits a Provenance Event of type ROUTE that indicates that the given FlowFile was routed to the given Relationship. 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 routed
      relationship - the Relationship to which the FlowFile was routed
      details - any details pertinent to the Route event, such as why the FlowFile was routed to the specified Relationship
      processingDuration - the number of milliseconds that it took to determine how to route the FlowFile
    • create

      void create(FlowFile flowFile)
      Emits a Provenance Event of type CREATE 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 the receive(FlowFile, String) event instead
      Parameters:
      flowFile - the FlowFile that was created
    • create

      void create(FlowFile flowFile, String details)
      Emits a Provenance Event of type CREATE 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 the receive(FlowFile, String, String, long) event instead
      Parameters:
      flowFile - the FlowFile that was created
      details - 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