@Internal public class ColumnStatsWatermarkExtractor extends java.lang.Object implements SplitWatermarkExtractor, java.io.Serializable
SplitWatermarkExtractor
implementation which uses an Iceberg timestamp column statistics
to get the watermarks for the IcebergSourceSplit
. This watermark is emitted by the WatermarkExtractorRecordEmitter
along with the actual records.Constructor and Description |
---|
ColumnStatsWatermarkExtractor(Schema schema,
java.lang.String eventTimeFieldName,
java.util.concurrent.TimeUnit timeUnit)
Creates the extractor.
|
Modifier and Type | Method and Description |
---|---|
long |
extractWatermark(IcebergSourceSplit split)
Get the watermark for a split using column statistics.
|
public ColumnStatsWatermarkExtractor(Schema schema, java.lang.String eventTimeFieldName, java.util.concurrent.TimeUnit timeUnit)
schema
- The schema of the TableeventTimeFieldName
- The column which should be used as an event timetimeUnit
- Used for converting the long value to epoch millisecondspublic long extractWatermark(IcebergSourceSplit split)
extractWatermark
in interface SplitWatermarkExtractor
split
- The splitjava.lang.IllegalArgumentException
- if there is no statistics for the column