Class OpenLineageLogStoreReader
java.lang.Object
org.odpi.openmetadata.adapters.connectors.lineageinsight.openlineage.OpenLineageLogStoreReader
OpenLineageLogStoreReader walks the directory tree written by the file-based OpenLineage log store integration
connector ({directory}/{namespace}/{job}/{runId}-{timestamp}-{eventType}.openlineageevent), parses each run event
and accumulates it into an OpenLineageRunHistory. Events outside the requested time window are skipped.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEvent(OpenLineageRunEvent event, Date windowStart, Date windowEnd, OpenLineageRunHistory history) Add a run event to the history.static DateparseTimestamp(String timestamp) Parse an ISO-8601 timestamp from an OpenLineage event.Read every event file below a directory into a history.
-
Constructor Details
-
OpenLineageLogStoreReader
public OpenLineageLogStoreReader()
-
-
Method Details
-
read
Read every event file below a directory into a history.- Parameters:
logStoreDirectory- root of the log storewindowStart- earliest event time to include (null for no limit)windowEnd- latest event time to include (null for no limit)- Returns:
- history
-
addEvent
public void addEvent(OpenLineageRunEvent event, Date windowStart, Date windowEnd, OpenLineageRunHistory history) Add a run event to the history.- Parameters:
event- eventwindowStart- earliest event time to include (null for no limit)windowEnd- latest event time to include (null for no limit)history- history to add to
-
parseTimestamp
Parse an ISO-8601 timestamp from an OpenLineage event. Timestamps without a zone are treated as UTC.- Parameters:
timestamp- string timestamp- Returns:
- date or null if the timestamp is missing or unparsable
-