Package org.apache.iceberg.flink.source
Class IcebergSource.Builder<T>
- java.lang.Object
-
- org.apache.iceberg.flink.source.IcebergSource.Builder<T>
-
- Enclosing class:
- IcebergSource<T>
public static class IcebergSource.Builder<T> extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IcebergSource.Builder<T>
asOfTimestamp(java.lang.Long newAsOfTimestamp)
IcebergSource.Builder<T>
assignerFactory(SplitAssignerFactory assignerFactory)
IcebergSource.Builder<T>
branch(java.lang.String branch)
IcebergSource<T>
build()
org.apache.flink.streaming.api.datastream.DataStream<T>
buildStream(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env)
Build theIcebergSource
and create aDataStream
from the source.IcebergSource.Builder<T>
caseSensitive(boolean newCaseSensitive)
IcebergSource.Builder<T>
endSnapshotId(java.lang.Long newEndSnapshotId)
IcebergSource.Builder<T>
endTag(java.lang.String endTag)
IcebergSource.Builder<T>
exposeLocality(boolean newExposeLocality)
IcebergSource.Builder<T>
filters(java.util.List<Expression> newFilters)
IcebergSource.Builder<T>
flinkConfig(org.apache.flink.configuration.ReadableConfig config)
IcebergSource.Builder<T>
includeColumnStats(boolean newIncludeColumnStats)
IcebergSource.Builder<T>
limit(java.lang.Long newLimit)
IcebergSource.Builder<T>
maxAllowedPlanningFailures(int maxAllowedPlanningFailures)
IcebergSource.Builder<T>
monitorInterval(java.time.Duration newMonitorInterval)
IcebergSource.Builder<T>
nameMapping(java.lang.String newNameMapping)
IcebergSource.Builder<T>
planParallelism(int planParallelism)
IcebergSource.Builder<T>
project(org.apache.flink.table.api.TableSchema newProjectedFlinkSchema)
IcebergSource.Builder<T>
project(Schema newProjectedSchema)
IcebergSource.Builder<T>
properties(java.util.Map<java.lang.String,java.lang.String> properties)
Deprecated.IcebergSource.Builder<T>
readerFunction(ReaderFunction<T> newReaderFunction)
Deprecated.since 1.7.0.IcebergSource.Builder<T>
set(java.lang.String property, java.lang.String value)
Set the read properties for Flink source.IcebergSource.Builder<T>
setAll(java.util.Map<java.lang.String,java.lang.String> properties)
Set the read properties for Flink source.IcebergSource.Builder<T>
splitComparator(SerializableComparator<IcebergSourceSplit> newSplitComparator)
IcebergSource.Builder<T>
splitLookback(java.lang.Integer newSplitLookback)
IcebergSource.Builder<T>
splitOpenFileCost(java.lang.Long newSplitOpenFileCost)
IcebergSource.Builder<T>
splitSize(java.lang.Long newSplitSize)
IcebergSource.Builder<T>
startSnapshotId(java.lang.Long newStartSnapshotId)
IcebergSource.Builder<T>
startSnapshotTimestamp(java.lang.Long newStartSnapshotTimestamp)
IcebergSource.Builder<T>
startTag(java.lang.String startTag)
IcebergSource.Builder<T>
streaming(boolean streaming)
IcebergSource.Builder<T>
streamingStartingStrategy(StreamingStartingStrategy newStartingStrategy)
IcebergSource.Builder<T>
table(Table newTable)
IcebergSource.Builder<T>
tableLoader(TableLoader loader)
IcebergSource.Builder<T>
tag(java.lang.String tag)
IcebergSource.Builder<T>
useSnapshotId(java.lang.Long newSnapshotId)
IcebergSource.Builder<T>
watermarkColumn(java.lang.String columnName)
Emits watermarks once per split based on the min value of column statistics from files metadata in the given split.IcebergSource.Builder<T>
watermarkColumnTimeUnit(java.util.concurrent.TimeUnit timeUnit)
When the type of thewatermarkColumn(java.lang.String)
isTypes.LongType
, then sets theTimeUnit
to convert the value.
-
-
-
Method Detail
-
tableLoader
public IcebergSource.Builder<T> tableLoader(TableLoader loader)
-
table
public IcebergSource.Builder<T> table(Table newTable)
-
assignerFactory
public IcebergSource.Builder<T> assignerFactory(SplitAssignerFactory assignerFactory)
-
splitComparator
public IcebergSource.Builder<T> splitComparator(SerializableComparator<IcebergSourceSplit> newSplitComparator)
-
readerFunction
@Deprecated public IcebergSource.Builder<T> readerFunction(ReaderFunction<T> newReaderFunction)
Deprecated.since 1.7.0. Will be removed in 2.0.0; useIcebergSource.forOutputType(RowDataConverter)
instead to produce output type other thanRowData
.
-
flinkConfig
public IcebergSource.Builder<T> flinkConfig(org.apache.flink.configuration.ReadableConfig config)
-
caseSensitive
public IcebergSource.Builder<T> caseSensitive(boolean newCaseSensitive)
-
useSnapshotId
public IcebergSource.Builder<T> useSnapshotId(java.lang.Long newSnapshotId)
-
streamingStartingStrategy
public IcebergSource.Builder<T> streamingStartingStrategy(StreamingStartingStrategy newStartingStrategy)
-
startSnapshotTimestamp
public IcebergSource.Builder<T> startSnapshotTimestamp(java.lang.Long newStartSnapshotTimestamp)
-
startSnapshotId
public IcebergSource.Builder<T> startSnapshotId(java.lang.Long newStartSnapshotId)
-
tag
public IcebergSource.Builder<T> tag(java.lang.String tag)
-
branch
public IcebergSource.Builder<T> branch(java.lang.String branch)
-
startTag
public IcebergSource.Builder<T> startTag(java.lang.String startTag)
-
endTag
public IcebergSource.Builder<T> endTag(java.lang.String endTag)
-
endSnapshotId
public IcebergSource.Builder<T> endSnapshotId(java.lang.Long newEndSnapshotId)
-
asOfTimestamp
public IcebergSource.Builder<T> asOfTimestamp(java.lang.Long newAsOfTimestamp)
-
splitSize
public IcebergSource.Builder<T> splitSize(java.lang.Long newSplitSize)
-
splitLookback
public IcebergSource.Builder<T> splitLookback(java.lang.Integer newSplitLookback)
-
splitOpenFileCost
public IcebergSource.Builder<T> splitOpenFileCost(java.lang.Long newSplitOpenFileCost)
-
streaming
public IcebergSource.Builder<T> streaming(boolean streaming)
-
monitorInterval
public IcebergSource.Builder<T> monitorInterval(java.time.Duration newMonitorInterval)
-
nameMapping
public IcebergSource.Builder<T> nameMapping(java.lang.String newNameMapping)
-
project
public IcebergSource.Builder<T> project(Schema newProjectedSchema)
-
project
public IcebergSource.Builder<T> project(org.apache.flink.table.api.TableSchema newProjectedFlinkSchema)
-
filters
public IcebergSource.Builder<T> filters(java.util.List<Expression> newFilters)
-
limit
public IcebergSource.Builder<T> limit(java.lang.Long newLimit)
-
includeColumnStats
public IcebergSource.Builder<T> includeColumnStats(boolean newIncludeColumnStats)
-
planParallelism
public IcebergSource.Builder<T> planParallelism(int planParallelism)
-
exposeLocality
public IcebergSource.Builder<T> exposeLocality(boolean newExposeLocality)
-
maxAllowedPlanningFailures
public IcebergSource.Builder<T> maxAllowedPlanningFailures(int maxAllowedPlanningFailures)
-
set
public IcebergSource.Builder<T> set(java.lang.String property, java.lang.String value)
Set the read properties for Flink source. View the supported properties inFlinkReadOptions
-
setAll
public IcebergSource.Builder<T> setAll(java.util.Map<java.lang.String,java.lang.String> properties)
Set the read properties for Flink source. View the supported properties inFlinkReadOptions
-
watermarkColumn
public IcebergSource.Builder<T> watermarkColumn(java.lang.String columnName)
Emits watermarks once per split based on the min value of column statistics from files metadata in the given split. The generated watermarks are also used for ordering the splits for read. Accepted column types are timestamp/timestamptz/long. For long columns consider settingwatermarkColumnTimeUnit(TimeUnit)
.Consider setting `read.split.open-file-cost` to prevent combining small files to a single split when the watermark is used for watermark alignment.
-
watermarkColumnTimeUnit
public IcebergSource.Builder<T> watermarkColumnTimeUnit(java.util.concurrent.TimeUnit timeUnit)
When the type of thewatermarkColumn(java.lang.String)
isTypes.LongType
, then sets theTimeUnit
to convert the value. The default value isTimeUnit.MICROSECONDS
.
-
properties
@Deprecated public IcebergSource.Builder<T> properties(java.util.Map<java.lang.String,java.lang.String> properties)
Deprecated.
-
build
public IcebergSource<T> build()
-
buildStream
public org.apache.flink.streaming.api.datastream.DataStream<T> buildStream(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env)
Build theIcebergSource
and create aDataStream
from the source. Watermark strategy is set toWatermarkStrategy.noWatermarks()
.- Returns:
- data stream from the Iceberg source
-
-