Class KinesisPartitionKeyGeneratorFactory
- java.lang.Object
-
- org.apache.flink.connector.kinesis.table.KinesisPartitionKeyGeneratorFactory
-
@Internal public class KinesisPartitionKeyGeneratorFactory extends Object
Factory Class forPartitionKeyGenerator.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSINK_PARTITIONER_VALUE_FIXEDstatic StringSINK_PARTITIONER_VALUE_RANDOM
-
Constructor Summary
Constructors Constructor Description KinesisPartitionKeyGeneratorFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PartitionKeyGenerator<org.apache.flink.table.data.RowData>getKinesisPartitioner(org.apache.flink.configuration.ReadableConfig tableOptions, org.apache.flink.table.types.logical.RowType physicalType, List<String> partitionKeys, ClassLoader classLoader)Constructs the kinesis partitioner for atargetTablebased on the currently settableOptions.
-
-
-
Field Detail
-
SINK_PARTITIONER_VALUE_FIXED
public static final String SINK_PARTITIONER_VALUE_FIXED
- See Also:
- Constant Field Values
-
SINK_PARTITIONER_VALUE_RANDOM
public static final String SINK_PARTITIONER_VALUE_RANDOM
- See Also:
- Constant Field Values
-
-
Method Detail
-
getKinesisPartitioner
public static PartitionKeyGenerator<org.apache.flink.table.data.RowData> getKinesisPartitioner(org.apache.flink.configuration.ReadableConfig tableOptions, org.apache.flink.table.types.logical.RowType physicalType, List<String> partitionKeys, ClassLoader classLoader)
Constructs the kinesis partitioner for atargetTablebased on the currently settableOptions.The following rules are applied with decreasing precedence order.
- If
targetTableis partitioned, return aRowDataKinesisPartitioner. - If the partitioner type is not set, return a
RandomKinesisPartitionKeyGenerator. - If a specific partitioner type alias is used, instantiate the corresponding type
- Interpret the partitioner type as a classname of a user-defined partitioner.
- Parameters:
tableOptions- A read-only set of config options that determines the partitioner type.physicalType- Physical type for partitioning.partitionKeys- Partitioning keys in physical type.classLoader- AClassLoaderto use for loading user-defined partitioner classes.
- If
-
-