@Internal public class KinesisDynamicSink extends AsyncDynamicTableSink<software.amazon.awssdk.services.kinesis.model.PutRecordsRequestEntry> implements SupportsPartitioning
AsyncDynamicTableSink
.Modifier and Type | Class and Description |
---|---|
static class |
KinesisDynamicSink.KinesisDynamicTableSinkBuilder
Builder class for
KinesisDynamicSink . |
DynamicTableSink.Context, DynamicTableSink.DataStructureConverter, DynamicTableSink.SinkRuntimeProvider
maxBatchSize, maxBufferedRequests, maxBufferSizeInBytes, maxInFlightRequests, maxTimeInBufferMS
Constructor and Description |
---|
KinesisDynamicSink(Integer maxBatchSize,
Integer maxInFlightRequests,
Integer maxBufferedRequests,
Long maxBufferSizeInBytes,
Long maxTimeInBufferMS,
Boolean failOnError,
DataType consumedDataType,
String stream,
Properties kinesisClientProperties,
EncodingFormat<SerializationSchema<RowData>> encodingFormat,
PartitionKeyGenerator<RowData> partitioner) |
Modifier and Type | Method and Description |
---|---|
void |
applyStaticPartition(Map<String,String> partition)
Provides the static part of a partition.
|
String |
asSummaryString()
Returns a string that summarizes this sink for printing to a console or log.
|
DynamicTableSink |
copy()
Creates a copy of this instance during planning.
|
boolean |
equals(Object o) |
ChangelogMode |
getChangelogMode(ChangelogMode requestedMode)
Returns the set of changes that the sink accepts during runtime.
|
DynamicTableSink.SinkRuntimeProvider |
getSinkRuntimeProvider(DynamicTableSink.Context context)
Returns a provider of runtime implementation for writing the data.
|
int |
hashCode() |
addAsyncOptionsToSinkBuilder
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
requiresPartitionGrouping
public KinesisDynamicSink(@Nullable Integer maxBatchSize, @Nullable Integer maxInFlightRequests, @Nullable Integer maxBufferedRequests, @Nullable Long maxBufferSizeInBytes, @Nullable Long maxTimeInBufferMS, @Nullable Boolean failOnError, @Nullable DataType consumedDataType, String stream, @Nullable Properties kinesisClientProperties, EncodingFormat<SerializationSchema<RowData>> encodingFormat, PartitionKeyGenerator<RowData> partitioner)
public ChangelogMode getChangelogMode(ChangelogMode requestedMode)
DynamicTableSink
The planner can make suggestions but the sink has the final decision what it requires. If
the planner does not support this mode, it will throw an error. For example, the sink can
return that it only supports ChangelogMode.insertOnly()
.
getChangelogMode
in interface DynamicTableSink
requestedMode
- expected set of changes by the current planpublic DynamicTableSink.SinkRuntimeProvider getSinkRuntimeProvider(DynamicTableSink.Context context)
DynamicTableSink
There might exist different interfaces for runtime implementation which is why DynamicTableSink.SinkRuntimeProvider
serves as the base interface. Concrete DynamicTableSink.SinkRuntimeProvider
interfaces might be located in other Flink modules.
Independent of the provider interface, the table runtime expects that a sink
implementation accepts internal data structures (see RowData
for more information).
The given DynamicTableSink.Context
offers utilities by the planner for creating runtime
implementation with minimal dependencies to internal data structures.
SinkProvider
is the recommended core interface. SinkFunctionProvider
in
flink-table-api-java-bridge
and OutputFormatProvider
are available for
backwards compatibility.
getSinkRuntimeProvider
in interface DynamicTableSink
SinkProvider
public DynamicTableSink copy()
DynamicTableSink
copy
in interface DynamicTableSink
public String asSummaryString()
DynamicTableSink
asSummaryString
in interface DynamicTableSink
public void applyStaticPartition(Map<String,String> partition)
SupportsPartitioning
A single partition maps each partition key to a partition value. Depending on the user-defined statement, the partition might not include all partition keys.
See the documentation of SupportsPartitioning
for more information.
applyStaticPartition
in interface SupportsPartitioning
partition
- user-defined (possibly partial) static partitionpublic boolean equals(Object o)
equals
in class AsyncDynamicTableSink<software.amazon.awssdk.services.kinesis.model.PutRecordsRequestEntry>
public int hashCode()
hashCode
in class AsyncDynamicTableSink<software.amazon.awssdk.services.kinesis.model.PutRecordsRequestEntry>
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.