Interface KinesisPartitioner.ExplicitPartitioner<T>
- All Superinterfaces:
KinesisPartitioner<T>
,Serializable
- Enclosing interface:
KinesisPartitioner<T>
An explicit partitioner that always returns a
Nonnull
explicit hash key. The partition
key is irrelevant in this case, though it cannot be null
.-
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
Modifier and TypeMethodDescriptiongetExplicitHashKey
(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 String
getPartitionKey
(T record) Determines which shard in the stream the record is assigned to.
-
Method Details
-
getPartitionKey
Description copied from interface:KinesisPartitioner
Determines 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:
getPartitionKey
in interfaceKinesisPartitioner<T>
-
getExplicitHashKey
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:
getExplicitHashKey
in interfaceKinesisPartitioner<T>
-