Package org.apache.flink.table.connector
Interface ParallelismProvider
-
- All Known Subinterfaces:
OutputFormatProvider,SinkProvider,SinkV2Provider
@PublicEvolving public interface ParallelismProviderParallelism provider for other connector providers. It allows to express a custom parallelism for the connector runtime implementation. Otherwise the parallelism is determined by the planner.Note: Currently, this interface only works with
DynamicTableSink.SinkRuntimeProvider.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Optional<Integer>getParallelism()Returns the parallelism for this instance.
-
-
-
Method Detail
-
getParallelism
default Optional<Integer> getParallelism()
Returns the parallelism for this instance.The parallelism denotes how many parallel instances of a source or sink will be spawned during the execution.
Enforcing a different parallelism for sinks might mess up the changelog if the input is not
ChangelogMode.insertOnly(). Therefore, a primary key is required by which the input will be shuffled before records enter theDynamicTableSink.SinkRuntimeProviderimplementation.- Returns:
- empty if the connector does not provide a custom parallelism, then the planner will decide the number of parallel instances by itself.
-
-