@Public public class FlinkSinkBuilder extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
compactSink |
protected LogSinkFunction |
logSinkFunction |
protected Map<String,String> |
overwritePartition |
protected Integer |
parallelism |
protected FileStoreTable |
table |
Constructor and Description |
---|
FlinkSinkBuilder(Table table) |
Modifier and Type | Method and Description |
---|---|
org.apache.flink.streaming.api.datastream.DataStreamSink<?> |
build()
Build
DataStreamSink . |
protected org.apache.flink.streaming.api.datastream.DataStreamSink<?> |
buildDynamicBucketSink(org.apache.flink.streaming.api.datastream.DataStream<InternalRow> input,
boolean globalIndex) |
protected org.apache.flink.streaming.api.datastream.DataStreamSink<?> |
buildForFixedBucket(org.apache.flink.streaming.api.datastream.DataStream<InternalRow> input) |
FlinkSinkBuilder |
clusteringIfPossible(String clusteringColumns,
String clusteringStrategy,
boolean sortInCluster,
int sampleFactor)
Clustering the input data if possible.
|
FlinkSinkBuilder |
forRow(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> input,
org.apache.flink.table.types.DataType rowDataType)
From
DataStream with Row , need to provide a DataType for builder to
convert those Row s to a RowData DataStream. |
FlinkSinkBuilder |
forRowData(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.table.data.RowData> input)
From
DataStream with RowData . |
protected org.apache.flink.streaming.api.datastream.DataStream<InternalRow> |
mapToInternalRow(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.table.data.RowData> input,
RowType rowType) |
FlinkSinkBuilder |
overwrite()
INSERT OVERWRITE.
|
FlinkSinkBuilder |
overwrite(Map<String,String> overwritePartition)
INSERT OVERWRITE PARTITION (...).
|
FlinkSinkBuilder |
parallelism(int parallelism)
Set sink parallelism.
|
protected final FileStoreTable table
protected boolean compactSink
@Nullable protected LogSinkFunction logSinkFunction
public FlinkSinkBuilder(Table table)
public FlinkSinkBuilder forRow(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> input, org.apache.flink.table.types.DataType rowDataType)
DataStream
with Row
, need to provide a DataType
for builder to
convert those Row
s to a RowData
DataStream.public FlinkSinkBuilder forRowData(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.table.data.RowData> input)
DataStream
with RowData
.public FlinkSinkBuilder overwrite()
public FlinkSinkBuilder overwrite(Map<String,String> overwritePartition)
public FlinkSinkBuilder parallelism(int parallelism)
public FlinkSinkBuilder clusteringIfPossible(String clusteringColumns, String clusteringStrategy, boolean sortInCluster, int sampleFactor)
public org.apache.flink.streaming.api.datastream.DataStreamSink<?> build()
DataStreamSink
.protected org.apache.flink.streaming.api.datastream.DataStream<InternalRow> mapToInternalRow(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.table.data.RowData> input, RowType rowType)
protected org.apache.flink.streaming.api.datastream.DataStreamSink<?> buildDynamicBucketSink(org.apache.flink.streaming.api.datastream.DataStream<InternalRow> input, boolean globalIndex)
protected org.apache.flink.streaming.api.datastream.DataStreamSink<?> buildForFixedBucket(org.apache.flink.streaming.api.datastream.DataStream<InternalRow> input)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.