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#SPAWN ,
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE
This is valid only for null null null null null ProvenanceEventType#SPAWN ,
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE events and will be ignored for any
other event types. |
ProvenanceEventBuilder |
addParentFlowFile(FlowFile parent)
Adds the given FlowFile as a parent for Events of type
ProvenanceEventType#SPAWN ,
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE
This is valid only for null null null null null ProvenanceEventType#SPAWN ,
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE events and will be ignored for any
other event types. |
ProvenanceEventRecord |
build()
Builds the Provenance Event.
|
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
|
ProvenanceEventBuilder |
removeChildFlowFile(FlowFile child)
Removes the given FlowFile as a child for Events of type
ProvenanceEventType#SPAWN ,
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE
This is valid only for null null null null null ProvenanceEventType#SPAWN ,
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#SPAWN ,
ProvenanceEventType.FORK , ProvenanceEventType.JOIN , and
ProvenanceEventType.CLONE
This is valid only for null null null null null ProvenanceEventType#SPAWN ,
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 |
setLineageIdentifiers(Set<String> lineageIdentifiers)
Sets the Lineage Identifiers.
|
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
- ProvenanceEventBuilder fromEvent(ProvenanceEventRecord event)
event
- the event from which to populate the Builders valuesProvenanceEventBuilder setFlowFileEntryDate(long entryDate)
entryDate
- ProvenanceEventBuilder setLineageIdentifiers(Set<String> lineageIdentifiers)
lineageIdentifiers
- ProvenanceEventBuilder setPreviousContentClaim(String container, String section, String identifier, Long offset, long size)
container
- section
- identifier
- offset
- size
- ProvenanceEventBuilder setCurrentContentClaim(String container, String section, String identifier, Long offset, long size)
container
- section
- identifier
- offset
- size
- ProvenanceEventBuilder setSourceQueueIdentifier(String identifier)
identifier
- ProvenanceEventBuilder setAttributes(Map<String,String> previousAttributes, Map<String,String> updatedAttributes)
previousAttributes
- updatedAttributes
- 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
- ProvenanceEventBuilder setEventTime(long eventTime)
eventTime
- ProvenanceEventBuilder setEventDuration(long millis)
millis
- ProvenanceEventBuilder setLineageStartDate(long startDate)
startDate
- ProvenanceEventBuilder setComponentId(String componentId)
Processor
) that is generating the EventcomponentId
- ProvenanceEventBuilder setComponentType(String componentType)
Processor
s, this is the Simple Class Name of the Processor.componentType
- ProvenanceEventBuilder setSourceSystemFlowFileIdentifier(String sourceSystemFlowFileIdentifier)
ProvenanceEventType.RECEIVE
and ProvenanceEventType.SEND
and will be ignored for any other
event types.sourceSystemFlowFileIdentifier
- ProvenanceEventBuilder setTransitUri(String transitUri)
ProvenanceEventType.RECEIVE
and ProvenanceEventType.SEND
and will be ignored for any other
event types.transitUri
- ProvenanceEventBuilder addParentFlowFile(FlowFile parent)
ProvenanceEventType#SPAWN
,
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
This is valid only for null null null null null ProvenanceEventType#SPAWN
,
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
events and will be ignored for any
other event types.parent
- ProvenanceEventBuilder removeParentFlowFile(FlowFile parent)
ProvenanceEventType#SPAWN
,
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
This is valid only for null null null null null ProvenanceEventType#SPAWN
,
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
events and will be ignored for any
other event types.parent
- ProvenanceEventBuilder addChildFlowFile(FlowFile child)
ProvenanceEventType#SPAWN
,
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
This is valid only for null null null null null ProvenanceEventType#SPAWN
,
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
events and will be ignored for any
other event types.child
- ProvenanceEventBuilder removeChildFlowFile(FlowFile child)
ProvenanceEventType#SPAWN
,
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
This is valid only for null null null null null ProvenanceEventType#SPAWN
,
ProvenanceEventType.FORK
, ProvenanceEventType.JOIN
, and
ProvenanceEventType.CLONE
events and will be ignored for any
other event types.child
- ProvenanceEventBuilder setAlternateIdentifierUri(String alternateIdentifierUri)
ProvenanceEventType.ADDINFO
events and
will be ignored for any other event types.alternateIdentifierUri
- ProvenanceEventBuilder setDetails(String details)
details
- ProvenanceEventBuilder setRelationship(Relationship relationship)
ProvenanceEventType.ROUTE
events. This is valid only for
ProvenanceEventType.ROUTE
events and will be ignored for any
other event types.relationship
- ProvenanceEventBuilder fromFlowFile(FlowFile flowFile)
flowFile
- ProvenanceEventRecord 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.Copyright © 2015 Apache NiFi (incubating). All rights reserved.