public class TierTopic extends java.lang.Object implements InitializedTierTopic
Constructor and Description |
---|
TierTopic(java.lang.String tierNamespace) |
Modifier and Type | Method and Description |
---|---|
void |
initialize(kafka.zk.AdminZkClient adminZkClient,
int configuredNumPartitions,
short configuredReplicationFactor)
Initializes the TierTopic by first checking if the tier topic exists.
|
void |
initialize(int numPartitions) |
java.util.OptionalInt |
numPartitions() |
java.lang.String |
topicName() |
static java.lang.String |
topicName(java.lang.String tierNamespace) |
org.apache.kafka.common.TopicPartition |
toTierTopicPartition(TopicIdPartition tieredPartition) |
static org.apache.kafka.common.TopicPartition |
toTierTopicPartition(TopicIdPartition tieredPartition,
java.lang.String topicName,
TierTopicPartitioner partitioner) |
java.util.Set<org.apache.kafka.common.TopicPartition> |
toTierTopicPartitions(java.util.Collection<TopicIdPartition> tieredPartitions)
Generate the tier topic partitions containing data for tiered partitions.
|
static java.util.Set<org.apache.kafka.common.TopicPartition> |
toTierTopicPartitions(java.util.Collection<TopicIdPartition> tieredPartitions,
java.lang.String topicName,
TierTopicPartitioner partitioner) |
public void initialize(kafka.zk.AdminZkClient adminZkClient, int configuredNumPartitions, short configuredReplicationFactor)
configuredNumPartitions
- Configured number of partitionsconfiguredReplicationFactor
- Configured replication factorjava.lang.Exception
- Caller is expected to handle any exceptions from the underlying zk clientpublic void initialize(int numPartitions)
public java.util.Set<org.apache.kafka.common.TopicPartition> toTierTopicPartitions(java.util.Collection<TopicIdPartition> tieredPartitions)
toTierTopicPartitions
in interface InitializedTierTopic
tieredPartitions
- partitions that have been tieredpublic org.apache.kafka.common.TopicPartition toTierTopicPartition(TopicIdPartition tieredPartition)
toTierTopicPartition
in interface InitializedTierTopic
public java.lang.String topicName()
topicName
in interface InitializedTierTopic
public java.util.OptionalInt numPartitions()
numPartitions
in interface InitializedTierTopic
public static java.lang.String topicName(java.lang.String tierNamespace)
public static java.util.Set<org.apache.kafka.common.TopicPartition> toTierTopicPartitions(java.util.Collection<TopicIdPartition> tieredPartitions, java.lang.String topicName, TierTopicPartitioner partitioner)
public static org.apache.kafka.common.TopicPartition toTierTopicPartition(TopicIdPartition tieredPartition, java.lang.String topicName, TierTopicPartitioner partitioner)