@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.| Modifier and Type | Field and Description |
|---|---|
static int |
NON_PARTITION_ID
If
getPartitionId() is equal to this. |
| Constructor and Description |
|---|
TopicPartition(String topic)
Create a top level topic without partition information.
|
TopicPartition(String topic,
int partitionId)
Create a topic partition without key hash range.
|
TopicPartition(String topic,
int partitionId,
TopicRange range) |
| 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.
|
int |
getPartitionId() |
org.apache.pulsar.client.api.Range |
getPulsarRange() |
TopicRange |
getRange() |
String |
getTopic() |
int |
hashCode() |
boolean |
isPartition() |
String |
toString() |
public static final int NON_PARTITION_ID
getPartitionId() is equal to this. This topic partition wouldn't be
a partition instance. It would be a top topic name.public TopicPartition(String topic)
public TopicPartition(String topic, int partitionId)
public TopicPartition(String topic, int partitionId, TopicRange range)
public String getTopic()
public int getPartitionId()
public boolean isPartition()
public String getFullTopicName()
public TopicRange getRange()
public org.apache.pulsar.client.api.Range getPulsarRange()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.