@PublicEvolving public class TopicPartition extends Object implements Serializable
SplitReader
, we create this topic
metas for a specified topic by subscription type and convert it into a partition split.Constructor and Description |
---|
TopicPartition(String topic,
int partitionId) |
TopicPartition(String topic,
int partitionId,
List<TopicRange> ranges) |
TopicPartition(String topic,
int partitionId,
List<TopicRange> ranges,
RangeGenerator.KeySharedMode mode) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getFullTopicName()
Pulsar split the topic partition into a bunch of small topics, we would get the real topic
name by using this method.
|
RangeGenerator.KeySharedMode |
getMode()
This method is internal used for key shared mode.
|
int |
getPartitionId() |
List<org.apache.pulsar.client.api.Range> |
getPulsarRanges()
This method is internal used for define key shared subscription.
|
List<TopicRange> |
getRanges()
This method is internal used for serialization.
|
String |
getTopic() |
int |
hashCode() |
String |
toString() |
public TopicPartition(String topic, int partitionId)
public TopicPartition(String topic, int partitionId, List<TopicRange> ranges)
public TopicPartition(String topic, int partitionId, List<TopicRange> ranges, RangeGenerator.KeySharedMode mode)
public String getTopic()
public int getPartitionId()
public String getFullTopicName()
@Internal public List<TopicRange> getRanges()
@Internal public List<org.apache.pulsar.client.api.Range> getPulsarRanges()
@Internal public RangeGenerator.KeySharedMode getMode()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.