public class ProvenanceEventConsumer extends Object
| Modifier and Type | Field and Description |
|---|---|
private int |
batchSize |
static AllowableValue |
BEGINNING_OF_STREAM |
private List<String> |
componentIds |
private Pattern |
componentTypeRegex |
static AllowableValue |
END_OF_STREAM |
private List<ProvenanceEventType> |
eventTypes |
private long |
firstEventId |
static String |
LAST_EVENT_ID_KEY |
private ComponentLog |
logger |
static PropertyDescriptor |
PROVENANCE_BATCH_SIZE |
static PropertyDescriptor |
PROVENANCE_START_POSITION |
private boolean |
scheduled |
private String |
startPositionValue |
| Constructor and Description |
|---|
ProvenanceEventConsumer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTargetComponentId(String... ids) |
void |
addTargetEventType(ProvenanceEventType... types) |
void |
consumeEvents(ReportingContext context,
BiConsumer<ComponentMapHolder,List<ProvenanceEventRecord>> consumer) |
private List<ProvenanceEventRecord> |
filterEvents(ComponentMapHolder componentMapHolder,
List<ProvenanceEventRecord> provenanceEvents) |
private boolean |
isFilteringEnabled() |
boolean |
isScheduled() |
void |
setBatchSize(int batchSize) |
void |
setComponentTypeRegex(String componentTypeRegex) |
void |
setLogger(ComponentLog logger) |
void |
setScheduled(boolean scheduled) |
void |
setStartPositionValue(String startPositionValue) |
private long |
updateLastEventId(List<ProvenanceEventRecord> events,
StateManager stateManager) |
public static final String LAST_EVENT_ID_KEY
public static final AllowableValue BEGINNING_OF_STREAM
public static final AllowableValue END_OF_STREAM
public static final PropertyDescriptor PROVENANCE_START_POSITION
public static final PropertyDescriptor PROVENANCE_BATCH_SIZE
private String startPositionValue
private Pattern componentTypeRegex
private List<ProvenanceEventType> eventTypes
private int batchSize
private volatile long firstEventId
private volatile boolean scheduled
private ComponentLog logger
public void setStartPositionValue(String startPositionValue)
public void setBatchSize(int batchSize)
public void setComponentTypeRegex(String componentTypeRegex)
public void addTargetEventType(ProvenanceEventType... types)
public void addTargetComponentId(String... ids)
public void setScheduled(boolean scheduled)
public boolean isScheduled()
public void setLogger(ComponentLog logger)
public void consumeEvents(ReportingContext context, BiConsumer<ComponentMapHolder,List<ProvenanceEventRecord>> consumer) throws ProcessException
ProcessExceptionprivate long updateLastEventId(List<ProvenanceEventRecord> events, StateManager stateManager)
private boolean isFilteringEnabled()
private List<ProvenanceEventRecord> filterEvents(ComponentMapHolder componentMapHolder, List<ProvenanceEventRecord> provenanceEvents)
Copyright © 2018 Apache NiFi Project. All rights reserved.