Package org.apache.nifi.provenance
Interface ProvenanceEventRecord
public interface ProvenanceEventRecord
Describes an event that happened to a FlowFile.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault String
getAttribute
(String attributeName) Returns the attribute with the given nameReturns the best event identifier for this event (eventId if available, descriptive identifier if not yet persisted to allow for traceability).long
long
long
long
long
long
Since the receiving system will usually refer to the data using a different identifier than the source system, this information is used to correlate the receive system's FlowFile with the sending system's datadefault boolean
-
Field Details
-
REMOTE_INPUT_PORT_TYPE
- See Also:
-
REMOTE_OUTPUT_PORT_TYPE
- See Also:
-
-
Method Details
-
getEventId
long getEventId()- Returns:
- a unique ID for this Provenance Event. Depending on the
implementation, the Event ID may be set to -1 until the event has been
added to the
ProvenanceEventRepository
-
getEventTime
long getEventTime()- Returns:
- the time at which this Provenance Event was created, as the number of milliseconds since epoch
-
getFlowFileEntryDate
long getFlowFileEntryDate()- Returns:
- the EntryDate of the FlowFile to which this Event is associated
-
getLineageStartDate
long getLineageStartDate()- Returns:
- the time at which the lineage began
-
getFileSize
long getFileSize()- Returns:
- the size of the FlowFile to which this Event is associated
-
getPreviousFileSize
Long getPreviousFileSize()- Returns:
- the previous size of the FlowFile to which this Event is
associated, if the FlowFile previously had content and its size was
known; otherwise, returns
null
-
getEventDuration
long getEventDuration()- Returns:
- the amount of time in milliseconds that elapsed while performing this event. If not populated, the value -1 will be returned
-
getEventType
ProvenanceEventType getEventType()- Returns:
- the type of this Provenance Event
-
getAttributes
- Returns:
- all FlowFile attributes that were associated with the FlowFile at the time that this ProvenanceEvent was created
-
getAttribute
Returns the attribute with the given name- Parameters:
attributeName
- the name of the attribute to get- Returns:
- the attribute with the given name or
null
if no attribute exists with the given name
-
getPreviousAttributes
- Returns:
- all FlowFile attributes that existed on the FlowFile before this event occurred
-
getUpdatedAttributes
- Returns:
- all FlowFile attributes that were updated as a result of this event
-
getComponentId
String getComponentId()- Returns:
- the ID of the Processor/component that created this Provenance Event
-
getComponentType
String getComponentType()- Returns:
- the fully-qualified Class Name of the Processor/component that created this Provenance Event
-
isRemotePortType
default boolean isRemotePortType()- Returns:
- whether this event originated from a remote group port
-
getTransitUri
String getTransitUri()- Returns:
- 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.
-
getSourceSystemFlowFileIdentifier
String getSourceSystemFlowFileIdentifier()Since the receiving system will usually refer to the data using a different identifier than the source system, this information is used to correlate the receive system's FlowFile with the sending system's data- Returns:
- the UUID that the Source System used to refer to this data; this
is applicable only when the
ProvenanceEventType
is of typeRECEIVE
-
getFlowFileUuid
String getFlowFileUuid()- Returns:
- the UUID of the FlowFile with which this Event is associated
-
getParentUuids
- Returns:
- the UUID's of all Parent FlowFiles. This is applicable only when
the
ProvenanceEventType
is of typeinvalid reference
SPAWN
-
getChildUuids
- Returns:
- the UUID's of all Child FlowFiles. This is applicable only when
the
ProvenanceEventType
is of typeinvalid reference
SPAWN
-
getAlternateIdentifierUri
String getAlternateIdentifierUri()- Returns:
- the Alternate Identifier associated with the FlowFile with which
this Event is associated. This is applicable only when the
ProvenanceEventType
is of typeProvenanceEventType.ADDINFO
-
getDetails
String getDetails()- Returns:
- the details for this record, if any were supplied. Otherwise,
returns
null
-
getRelationship
String getRelationship()- Returns:
- the relationship to which this record was routed if the event
type is
ProvenanceEventType.ROUTE
. The relationship is applicable only to this type
-
getSourceQueueIdentifier
String getSourceQueueIdentifier()- Returns:
- the identifier of the queue from which the FlowFile was taken, if
any. If the FlowFile is created as a result of this event (in this case,
the Event Type is one of null null null null null null null null
ProvenanceEventType.CREATE
,ProvenanceEventType.RECEIVE
,ProvenanceEventType.FORK
,ProvenanceEventType.JOIN
, orProvenanceEventType.CLONE
), or if the queue identifier is unknown, then this method will returnnull
-
getContentClaimSection
String getContentClaimSection()- Returns:
- the Section for the Content Claim that this Event refers to, if
any; otherwise, returns
null
-
getPreviousContentClaimSection
String getPreviousContentClaimSection()- Returns:
- the Section for the Content Claim that the FlowFile previously
referenced, if any; otherwise, returns
null
-
getContentClaimContainer
String getContentClaimContainer()- Returns:
- the Container for the Content Claim that this Event refers to, if
any; otherwise, returns
null
-
getPreviousContentClaimContainer
String getPreviousContentClaimContainer()- Returns:
- the Container for the Content Claim that the FlowFile previously
referenced, if any; otherwise, returns
null
-
getContentClaimIdentifier
String getContentClaimIdentifier()- Returns:
- the Identifier for the Content Claim that this Event refers to,
if any; otherwise, returns
null
-
getPreviousContentClaimIdentifier
String getPreviousContentClaimIdentifier()- Returns:
- the Identifier for the Content Claim that the FlowFile previously
referenced, if any; otherwise, returns
null
-
getContentClaimOffset
Long getContentClaimOffset()- Returns:
- the offset into the Content Claim at which the FlowFile's content
begins, if any; otherwise, returns
null
-
getPreviousContentClaimOffset
Long getPreviousContentClaimOffset()- Returns:
- the offset into the Content Claim at which the FlowFile's
previous content began, if any; otherwise, returns
null
-
getBestEventIdentifier
String getBestEventIdentifier()Returns the best event identifier for this event (eventId if available, descriptive identifier if not yet persisted to allow for traceability).- Returns:
- a descriptive event ID to allow tracing
-