public interface ProvenanceEventBuilder
Modifier and Type | Method and Description |
---|---|
ProvenanceEventBuilder |
addChildFlowFile(FlowFile child)
Adds the given FlowFile as a child for Events of type
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE
This is valid only for
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE events and will be ignored for any
other event types. |
ProvenanceEventBuilder |
addChildFlowFile(String childId)
Adds the given FlowFile identifier as a child for Events of type
ProvenanceEventType.FORK and ProvenanceEventType.CLONE |
ProvenanceEventBuilder |
addParentFlowFile(FlowFile parent)
Adds the given FlowFile as a parent for Events of type,
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE
This is valid only for
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE events and will be ignored for any
other event types. |
ProvenanceEventRecord |
build()
Builds the Provenance Event.
|
ProvenanceEventBuilder |
copy() |
ProvenanceEventBuilder |
fromEvent(ProvenanceEventRecord event)
Populates the values of the Event being built from the values in the
given event
|
ProvenanceEventBuilder |
fromFlowFile(FlowFile flowFile)
Populates the builder with as much information as it can from the given
FlowFile
|
List<String> |
getChildFlowFileIds() |
String |
getFlowFileId() |
List<String> |
getParentFlowFileIds() |
ProvenanceEventBuilder |
removeChildFlowFile(FlowFile child)
Removes the given FlowFile as a child for Events of type
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE
This is valid only for
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE events and will be ignored for any
other event types. |
ProvenanceEventBuilder |
removeParentFlowFile(FlowFile parent)
Removes the given FlowFile as a parent for Events of type,
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE
This is valid only for
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE events and will be ignored for any
other event types. |
ProvenanceEventBuilder |
setAlternateIdentifierUri(String alternateIdentifierUri)
Associates the given identifier with the FlowFile for which this Event is
created.
|
ProvenanceEventBuilder |
setAttributes(Map<String,String> previousAttributes,
Map<String,String> updatedAttributes)
Sets the attributes that existed on the FlowFile before this event
occurred and any attributes that were added or updated as a result of
this event.
|
ProvenanceEventBuilder |
setComponentId(String componentId)
Sets the unique identifier of the NiFi Component (such as a
Processor ) that is generating the Event |
ProvenanceEventBuilder |
setComponentType(String componentType)
Sets the type of the Component that is generating the Event.
|
ProvenanceEventBuilder |
setCurrentContentClaim(String container,
String section,
String identifier,
Long offset,
long size)
Sets the Content Claim that the FlowFile is associated with as a result
of this event
|
ProvenanceEventBuilder |
setDetails(String details)
Sets the details for this event.
|
ProvenanceEventBuilder |
setEventDuration(long millis)
Sets the amount of time that was required in order to perform the
function referred to by this event
|
ProvenanceEventBuilder |
setEventTime(long eventTime)
Sets the time at which the Provenance Event took place
|
ProvenanceEventBuilder |
setEventType(ProvenanceEventType eventType)
Sets the type of
ProvenanceEventRecord |
ProvenanceEventBuilder |
setFlowFileEntryDate(long entryDate)
Sets the date and time at which the FlowFile entered the flow
|
ProvenanceEventBuilder |
setFlowFileUUID(String uuid)
Sets the UUID to associate with the FlowFile
|
ProvenanceEventBuilder |
setLineageStartDate(long startDate)
Sets the time at which the FlowFile's lineage began
|
ProvenanceEventBuilder |
setPreviousContentClaim(String container,
String section,
String identifier,
Long offset,
long size)
Sets the Content Claim that the FlowFile was previously associated with
before this event occurred.
|
ProvenanceEventBuilder |
setRelationship(Relationship relationship)
Sets the to which the FlowFile was routed for
ProvenanceEventType.ROUTE events. |
ProvenanceEventBuilder |
setSourceQueueIdentifier(String identifier)
Sets the identifier of the FlowFile Queue from which the FlowFile was
pulled
|
ProvenanceEventBuilder |
setSourceSystemFlowFileIdentifier(String sourceSystemFlowFileIdentifier)
Sets the identifier that is used by the remote system to refer to the
FlowFile for which this Event is being created.
|
ProvenanceEventBuilder |
setTransitUri(String transitUri)
Sets the Transit URI that is used for the Event.
|
ProvenanceEventBuilder setEventType(ProvenanceEventType eventType)
ProvenanceEventRecord
eventType
- of the eventProvenanceEventBuilder fromEvent(ProvenanceEventRecord event)
event
- the event from which to populate the Builders valuesProvenanceEventBuilder setFlowFileEntryDate(long entryDate)
entryDate
- of the flow fileProvenanceEventBuilder setPreviousContentClaim(String container, String section, String identifier, Long offset, long size)
container
- for previous contentsection
- for previous contentidentifier
- for previous contentoffset
- for previous contentsize
- for previous contentProvenanceEventBuilder setCurrentContentClaim(String container, String section, String identifier, Long offset, long size)
container
- for resulting contentsection
- for resulting contentidentifier
- for resulting contentoffset
- for resulting contentsize
- for resulting contentProvenanceEventBuilder setSourceQueueIdentifier(String identifier)
identifier
- of the source queueProvenanceEventBuilder setAttributes(Map<String,String> previousAttributes, Map<String,String> updatedAttributes)
previousAttributes
- Map of all attributes before the event occurredupdatedAttributes
- Map containing all attributes that were added or
updated. If any entry has a value of null
, that attribute is
considered removedProvenanceEventBuilder setFlowFileUUID(String uuid)
uuid
- of the flowfileProvenanceEventBuilder setEventTime(long eventTime)
eventTime
- time of the eventProvenanceEventBuilder setEventDuration(long millis)
millis
- of the eventProvenanceEventBuilder setLineageStartDate(long startDate)
startDate
- start date of the eventProvenanceEventBuilder setComponentId(String componentId)
Processor
) that is generating the EventcomponentId
- that produced the eventProvenanceEventBuilder setComponentType(String componentType)
Processor
s, this is the Simple Class Name of the Processor.componentType
- of the component that made the eventProvenanceEventBuilder setSourceSystemFlowFileIdentifier(String sourceSystemFlowFileIdentifier)
ProvenanceEventType.RECEIVE
and ProvenanceEventType.SEND
and will be ignored for any other
event types.sourceSystemFlowFileIdentifier
- identifier the remote system usedProvenanceEventBuilder setTransitUri(String transitUri)
ProvenanceEventType.RECEIVE
and ProvenanceEventType.SEND
and will be ignored for any other
event types.transitUri
- of the eventProvenanceEventBuilder addParentFlowFile(FlowFile parent)
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
This is valid only for
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
events and will be ignored for any
other event types.parent
- flowfile that this event is derived fromProvenanceEventBuilder removeParentFlowFile(FlowFile parent)
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
This is valid only for
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
events and will be ignored for any
other event types.parent
- previous parent of this eventProvenanceEventBuilder addChildFlowFile(FlowFile child)
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
This is valid only for
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
events and will be ignored for any
other event types.child
- the child to addProvenanceEventBuilder addChildFlowFile(String childId)
ProvenanceEventType.FORK
and ProvenanceEventType.CLONE
childId
- the ID of the FlowFile that is a childProvenanceEventBuilder removeChildFlowFile(FlowFile child)
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
This is valid only for
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
events and will be ignored for any
other event types.child
- to removeProvenanceEventBuilder setAlternateIdentifierUri(String alternateIdentifierUri)
ProvenanceEventType.ADDINFO
events and
will be ignored for any other event types.alternateIdentifierUri
- another identifier of the flowfile this event is forProvenanceEventBuilder setDetails(String details)
details
- a description of the eventProvenanceEventBuilder setRelationship(Relationship relationship)
ProvenanceEventType.ROUTE
events. This is valid only for
ProvenanceEventType.ROUTE
events and will be ignored for any
other event types.relationship
- to which flowfiles in this event were routedProvenanceEventBuilder fromFlowFile(FlowFile flowFile)
flowFile
- to source attributes for this event fromProvenanceEventRecord build()
ProvenanceEventRecord.getEventId()
on the
ProvenanceEventRecord
that is returned will yield
-1
. This is because the implementation of the Event may
depend on the ProvevenanceEventRepository
to generate the unique
identifier.List<String> getChildFlowFileIds()
addChildFlowFile(FlowFile)
List<String> getParentFlowFileIds()
addParentFlowFile(FlowFile)
String getFlowFileId()
ProvenanceEventBuilder copy()
Copyright © 2022 Apache NiFi Project. All rights reserved.