Class ProvenanceEventConsumer

java.lang.Object
org.apache.nifi.reporting.util.provenance.ProvenanceEventConsumer

public class ProvenanceEventConsumer extends Object
  • Field Details

    • LAST_EVENT_ID_KEY

      public static final String LAST_EVENT_ID_KEY
      See Also:
    • BEGINNING_OF_STREAM

      public static final AllowableValue BEGINNING_OF_STREAM
    • END_OF_STREAM

      public static final AllowableValue END_OF_STREAM
    • PROVENANCE_START_POSITION

      public static final PropertyDescriptor PROVENANCE_START_POSITION
    • PROVENANCE_BATCH_SIZE

      public static final PropertyDescriptor PROVENANCE_BATCH_SIZE
    • startPositionValue

      private String startPositionValue
    • componentTypeRegex

      private Pattern componentTypeRegex
    • componentTypeRegexExclude

      private Pattern componentTypeRegexExclude
    • componentNameRegex

      private Pattern componentNameRegex
    • componentNameRegexExclude

      private Pattern componentNameRegexExclude
    • eventTypes

      private List<ProvenanceEventType> eventTypes
    • eventTypesExclude

      private List<ProvenanceEventType> eventTypesExclude
    • componentIds

      private List<String> componentIds
    • componentIdsExclude

      private List<String> componentIdsExclude
    • batchSize

      private int batchSize
    • firstEventId

      private volatile long firstEventId
    • scheduled

      private volatile boolean scheduled
    • logger

      private ComponentLog logger
  • Constructor Details

    • ProvenanceEventConsumer

      public ProvenanceEventConsumer()
  • Method Details

    • setStartPositionValue

      public void setStartPositionValue(String startPositionValue)
    • setBatchSize

      public void setBatchSize(int batchSize)
    • setComponentTypeRegex

      public void setComponentTypeRegex(String componentTypeRegex)
    • setComponentTypeRegexExclude

      public void setComponentTypeRegexExclude(String componentTypeRegex)
    • setComponentNameRegex

      public void setComponentNameRegex(String componentNameRegex)
    • setComponentNameRegexExclude

      public void setComponentNameRegexExclude(String componentNameRegexExclude)
    • addTargetEventType

      public void addTargetEventType(ProvenanceEventType... types)
    • addTargetEventTypeExclude

      public void addTargetEventTypeExclude(ProvenanceEventType... types)
    • addTargetComponentId

      public void addTargetComponentId(String... ids)
    • addTargetComponentIdExclude

      public void addTargetComponentIdExclude(String... ids)
    • setScheduled

      public void setScheduled(boolean scheduled)
    • isScheduled

      public boolean isScheduled()
    • setLogger

      public void setLogger(ComponentLog logger)
    • consumeEvents

      public void consumeEvents(ReportingContext context, BiConsumer<ComponentMapHolder,List<ProvenanceEventRecord>> consumer) throws ProcessException
      Throws:
      ProcessException
    • updateLastEventId

      private long updateLastEventId(List<ProvenanceEventRecord> events, StateManager stateManager)
    • isFilteringEnabled

      protected boolean isFilteringEnabled()
    • filterEvents

      private List<ProvenanceEventRecord> filterEvents(ComponentMapHolder componentMapHolder, List<ProvenanceEventRecord> provenanceEvents)
    • isNotEmpty

      private boolean isNotEmpty(String string)
    • isEmpty

      private boolean isEmpty(String string)