Class OpenLineageLogStoreConnectorBase

All Implemented Interfaces:
OpenLineageLogStore, AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension, IntegrationConnector, LineageIntegratorOMISConnector, OpenLineageEventListener
Direct Known Subclasses:
APIBasedOpenLineageLogStoreConnector, FileBasedOpenLineageLogStoreConnector

public abstract class OpenLineageLogStoreConnectorBase extends LineageIntegratorConnector implements OpenLineageLogStore, OpenLineageEventListener
OpenLineageLogStoreConnectorBase is the base class for connectors that support the OMRSAuditLog. It has implementations of the query methods that throw "function not supported". This means that log destinations that do not support queries can ignore these methods. It also supports the start and stop method for the connector which only need to be overridden if the connector has work to do at these times
  • Field Details

  • Constructor Details

    • OpenLineageLogStoreConnectorBase

      public OpenLineageLogStoreConnectorBase()
      Default constructor
  • Method Details

    • storeEvent

      public abstract void storeEvent(OpenLineageRunEvent openLineageEvent, String rawEvent, String logDestinationAddress) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Store the open lineage event in the open lineage log store. If the raw event is null, a json version of the open lineage event is generated using the Egeria beans.
      Specified by:
      storeEvent in interface OpenLineageLogStore
      Parameters:
      openLineageEvent - event formatted using Egeria beans
      rawEvent - event in Json form from the originator - may have facets that are not known to Egeria
      logDestinationAddress - address to send the event to
      Throws:
      InvalidParameterException - indicates that the openLineageEvent parameter is invalid.
      UserNotAuthorizedException - indicates that the caller is not authorized to access the log store.
      PropertyServerException - indicates that the log store is not available or has an error.
    • newDestinationIdentified

      protected abstract void newDestinationIdentified(String destinationAddress) throws ConnectorCheckedException
      Informs the subclasses that there is a new destination - in case they need to do special setup.
      Parameters:
      destinationAddress - new destination
      Throws:
      ConnectorCheckedException - new destination not valid
    • initialize

      public void initialize(String connectorInstanceId, ConnectionProperties connectionProperties)
      Call made by the ConnectorProvider to initialize the Connector with the base services.
      Overrides:
      initialize in class ConnectorBase
      Parameters:
      connectorInstanceId - unique id for the connector instance useful for messages etc
      connectionProperties - POJO for the configuration used to create the connector.
    • start

      public void start() throws ConnectorCheckedException
      Indicates that the connector is completely configured and can begin processing.
      Specified by:
      start in interface IntegrationConnector
      Overrides:
      start in class IntegrationConnectorBase
      Throws:
      ConnectorCheckedException - there is a problem within the connector.
    • refresh

      public void refresh() throws ConnectorCheckedException
      Maintains the list of catalog targets.
      Specified by:
      refresh in interface IntegrationConnector
      Throws:
      ConnectorCheckedException - there is a problem with the connector. It is not able to refresh the catalog targets.
    • processOpenLineageRunEvent

      public void processOpenLineageRunEvent(OpenLineageRunEvent event, String rawEvent)
      Called each time an open lineage run event is published to the Lineage Integrator OMIS. The integration connector is able to work with the formatted event using the Egeria beans or reformat the open lineage run event using the supplied open lineage backend beans or another set of beans.
      Specified by:
      processOpenLineageRunEvent in interface OpenLineageEventListener
      Parameters:
      event - run event formatted using Egeria supplied beans (null if egeria can not format the event)
      rawEvent - json payload received for the event
    • logNoRawEvent

      protected void logNoRawEvent(OpenLineageRunEvent openLineageEvent) throws InvalidParameterException
      Throws an invalid parameter exception. Used by the subclasses when this class has failed to pass a raw event.
      Parameters:
      openLineageEvent - supplied open lineage event - may also be null
      Throws:
      InvalidParameterException - resulting exception