Interface KinesisPartitioner.ExplicitPartitioner<T>
-
- All Superinterfaces:
KinesisPartitioner<T>,java.io.Serializable
- Enclosing interface:
- KinesisPartitioner<T>
public static interface KinesisPartitioner.ExplicitPartitioner<T> extends KinesisPartitioner<T>
An explicit partitioner that always returns aNonnullexplicit hash key. The partition key is irrelevant in this case, though it cannot benull.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.beam.sdk.io.aws2.kinesis.KinesisPartitioner
KinesisPartitioner.ExplicitPartitioner<T>
-
-
Field Summary
-
Fields inherited from interface org.apache.beam.sdk.io.aws2.kinesis.KinesisPartitioner
MAX_HASH_KEY, MIN_HASH_KEY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.StringgetExplicitHashKey(T record)Required hash value (128-bit integer) to determine explicitly the shard a record is assigned to based on the hash key range of each shard.default java.lang.StringgetPartitionKey(T record)Determines which shard in the stream the record is assigned to.
-
-
-
Method Detail
-
getPartitionKey
@Nonnull default java.lang.String getPartitionKey(T record)
Description copied from interface:KinesisPartitionerDetermines which shard in the stream the record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis Data Streams uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard.- Specified by:
getPartitionKeyin interfaceKinesisPartitioner<T>
-
getExplicitHashKey
@Nonnull java.lang.String getExplicitHashKey(T record)
Required hash value (128-bit integer) to determine explicitly the shard a record is assigned to based on the hash key range of each shard. The explicit hash key overrides the partition key hash.- Specified by:
getExplicitHashKeyin interfaceKinesisPartitioner<T>
-
-