Class RowDataFieldsKinesisPartitionKeyGenerator
- java.lang.Object
-
- org.apache.flink.connector.kinesis.table.RowDataFieldsKinesisPartitionKeyGenerator
-
- All Implemented Interfaces:
Serializable,java.util.function.Function<org.apache.flink.table.data.RowData,String>,PartitionKeyGenerator<org.apache.flink.table.data.RowData>
@Internal public final class RowDataFieldsKinesisPartitionKeyGenerator extends Object implements PartitionKeyGenerator<org.apache.flink.table.data.RowData>
APartitionKeyGeneratorofRowDataelements that constructs the partition key from a list of field names.The key is constructed by concatenating the string representations of a list of fields projected from an input element. A fixed prefix can be optionally configured in order to speed up the key construction process.
Resulting partition key values are trimmed to the maximum length allowed by Kinesis.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_DELIMITERDefault delimiter fordelimiter.static intMAX_PARTITION_KEY_LENGTHAllowed maximum length limit of a partition key.
-
Constructor Summary
Constructors Constructor Description RowDataFieldsKinesisPartitionKeyGenerator(org.apache.flink.table.types.logical.RowType physicalType, List<String> partitionKeys)RowDataFieldsKinesisPartitionKeyGenerator(org.apache.flink.table.types.logical.RowType physicalType, List<String> partitionKeys, String delimiter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringapply(org.apache.flink.table.data.RowData element)booleanequals(Object o)inthashCode()voidsetStaticFields(Map<String,String> staticFields)Update the fixed partition key prefix.
-
-
-
Field Detail
-
MAX_PARTITION_KEY_LENGTH
public static final int MAX_PARTITION_KEY_LENGTH
Allowed maximum length limit of a partition key.- See Also:
- Constant Field Values
-
-
Method Detail
-
apply
public String apply(org.apache.flink.table.data.RowData element)
- Specified by:
applyin interfacejava.util.function.Function<org.apache.flink.table.data.RowData,String>
-
setStaticFields
public void setStaticFields(Map<String,String> staticFields)
Update the fixed partition key prefix.- Parameters:
staticFields- An association of (field name, field value) pairs to be used as static partition key prefix.
-
-