@Internal public final class RowDataFieldsKinesisPartitionKeyGenerator extends Object implements PartitionKeyGenerator<org.apache.flink.table.data.RowData>
PartitionKeyGenerator of RowData elements 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.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_DELIMITER
Default delimiter for
delimiter. |
static int |
MAX_PARTITION_KEY_LENGTH
Allowed maximum length limit of a partition key.
|
| Constructor and 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) |
| Modifier and Type | Method and Description |
|---|---|
String |
apply(org.apache.flink.table.data.RowData element) |
boolean |
equals(Object o) |
int |
hashCode() |
void |
setStaticFields(Map<String,String> staticFields)
Update the fixed partition key prefix.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitandThen, compose, identitypublic static final int MAX_PARTITION_KEY_LENGTH
public RowDataFieldsKinesisPartitionKeyGenerator(org.apache.flink.table.types.logical.RowType physicalType,
List<String> partitionKeys)
public String apply(org.apache.flink.table.data.RowData element)
apply in interface java.util.function.Function<org.apache.flink.table.data.RowData,String>public void setStaticFields(Map<String,String> staticFields)
staticFields - An association of (field name, field value) pairs to be used as static
partition key prefix.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.