@PublicEvolving public class FixedKeysRangeGenerator extends Object implements RangeGenerator
Since the key's hash isn't specified to only one key. The consuming results may contain the
messages with different keys comparing the keys you have defined in this range generator.
Remember to use flink's DataStream.filter()
method.
Usage:
FixedKeysRangeGenerator.builder()
.supportNullKey()
.key("someKey")
.keys(Arrays.asList("key1", "key2"))
.build()
Modifier and Type | Class and Description |
---|---|
static class |
FixedKeysRangeGenerator.FixedKeysRangeGeneratorBuilder
The builder for
FixedKeysRangeGenerator . |
RangeGenerator.KeySharedMode
Modifier and Type | Method and Description |
---|---|
static FixedKeysRangeGenerator.FixedKeysRangeGeneratorBuilder |
builder() |
RangeGenerator.KeySharedMode |
keyShareMode(TopicMetadata metadata,
int parallelism)
Defines the default behavior for Key_Shared subscription in Flink.
|
List<TopicRange> |
range(TopicMetadata metadata,
int parallelism)
Generate range for the given topic.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
open, open
public List<TopicRange> range(TopicMetadata metadata, int parallelism)
RangeGenerator
range
in interface RangeGenerator
metadata
- The metadata of the topic.parallelism
- The reader size for this topic.public RangeGenerator.KeySharedMode keyShareMode(TopicMetadata metadata, int parallelism)
RangeGenerator
RangeGenerator.KeySharedMode
for the detailed usage of the key share mode.keyShareMode
in interface RangeGenerator
metadata
- The metadata of the topic.parallelism
- The reader size for this topic.public static FixedKeysRangeGenerator.FixedKeysRangeGeneratorBuilder builder()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.