|Constructor and Description
|Modifier and Type
|Method and Description
Provides whether existing data should be overwritten or not.
Provides the static part of a partition.
Returns a string that summarizes this sink for printing to a console or log.
Creates a copy of this instance during planning.
Returns the set of changes that the sink accepts during runtime.
Returns a provider of runtime implementation for writing the data.
Returns whether data needs to be grouped by partition before it is consumed by the sink.
public DynamicTableSink.SinkRuntimeProvider getSinkRuntimeProvider(DynamicTableSink.Context context)
There might exist different interfaces for runtime implementation which is why
DynamicTableSink.SinkRuntimeProvider serves as the base interface. Concrete
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).
DynamicTableSink.Context offers utilities by the planner for creating runtime
implementation with minimal dependencies to internal data structures.
public boolean requiresPartitionGrouping(boolean supportsGrouping)
If this method returns true, the sink can expect that all records will be grouped by the partition keys before consumed by the sink. In other words: The sink will receive all elements of one partition and then all elements of another partition. Elements of different partitions will not be mixed. For some sinks, this can be used to reduce the number of partition writers and improve writing performance by writing one partition at a time.
The given argument indicates whether the current execution mode supports grouping or not. For example, depending on the execution mode a sorting operation might not be available during runtime.
requiresPartitionGrouping in interface
supportsGrouping - whether the current execution mode supports grouping
supportsGrouping is false, it should never return true, otherwise the planner will fail.
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.
public void applyOverwrite(boolean overwrite)
public ChangelogMode getChangelogMode(ChangelogMode requestedMode)
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
public DynamicTableSink copy()
public String asSummaryString()
@VisibleForTesting public org.apache.hadoop.mapred.JobConf getJobConf()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.