public class PulsarMetadataReader extends Object implements AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
PulsarMetadataReader.ClosedException
Designate the close of the metadata reader.
|
| Constructor and Description |
|---|
PulsarMetadataReader(String adminUrl,
org.apache.pulsar.client.impl.conf.ClientConfigurationData clientConf,
String subscriptionName,
Map<String,String> caseInsensitiveParams,
int indexOfThisSubtask,
int numParallelSubtasks) |
PulsarMetadataReader(String adminUrl,
org.apache.pulsar.client.impl.conf.ClientConfigurationData clientConf,
String subscriptionName,
Map<String,String> caseInsensitiveParams,
int indexOfThisSubtask,
int numParallelSubtasks,
boolean useExternalSubscription) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkCursorAvailable(String topic,
org.apache.pulsar.client.impl.MessageIdImpl startMessageId) |
void |
close() |
void |
commitOffsetToCursor(Map<TopicRange,org.apache.pulsar.client.api.MessageId> offset) |
void |
createNamespace(String ns) |
void |
createTopic(String topicName,
int defaultPartitionNum) |
void |
deleteNamespace(String ns) |
void |
deleteTopic(String topicName) |
Set<TopicRange> |
discoverTopicChanges() |
org.apache.pulsar.client.api.MessageId |
getLastMessageId(String topic) |
org.apache.pulsar.client.api.MessageId |
getPositionFromSubscription(TopicRange topic,
org.apache.pulsar.client.api.MessageId defaultPosition) |
org.apache.pulsar.common.schema.SchemaInfo |
getPulsarSchema(List<String> topics) |
org.apache.pulsar.common.schema.SchemaInfo |
getPulsarSchema(String topic) |
Set<TopicRange> |
getTopicPartitions() |
Set<TopicRange> |
getTopicPartitionsAll()
Get topic partitions all, If the topic does not exist, it is created automatically ont partition to topic.
|
List<TopicRange> |
getTopics() |
List<String> |
getTopics(String ns) |
List<String> |
listNamespaces() |
boolean |
namespaceExists(String ns) |
void |
putSchema(String topicName,
org.apache.pulsar.common.schema.SchemaInfo schemaInfo) |
void |
removeCursor(Set<TopicRange> topics) |
void |
resetCursor(TopicRange topicRange,
org.apache.pulsar.client.api.MessageId messageId) |
void |
setupCursor(Map<TopicRange,org.apache.pulsar.client.api.MessageId> offset) |
void |
setupCursor(Map<TopicRange,org.apache.pulsar.client.api.MessageId> offset,
boolean failOnDataLoss) |
boolean |
topicExists(String topicName) |
public PulsarMetadataReader(String adminUrl, org.apache.pulsar.client.impl.conf.ClientConfigurationData clientConf, String subscriptionName, Map<String,String> caseInsensitiveParams, int indexOfThisSubtask, int numParallelSubtasks, boolean useExternalSubscription) throws org.apache.pulsar.client.api.PulsarClientException
org.apache.pulsar.client.api.PulsarClientExceptionpublic PulsarMetadataReader(String adminUrl, org.apache.pulsar.client.impl.conf.ClientConfigurationData clientConf, String subscriptionName, Map<String,String> caseInsensitiveParams, int indexOfThisSubtask, int numParallelSubtasks) throws org.apache.pulsar.client.api.PulsarClientException
org.apache.pulsar.client.api.PulsarClientExceptionpublic void close()
close in interface AutoCloseablepublic Set<TopicRange> discoverTopicChanges() throws org.apache.pulsar.client.admin.PulsarAdminException, PulsarMetadataReader.ClosedException
org.apache.pulsar.client.admin.PulsarAdminExceptionPulsarMetadataReader.ClosedExceptionpublic List<String> listNamespaces() throws org.apache.pulsar.client.admin.PulsarAdminException
org.apache.pulsar.client.admin.PulsarAdminExceptionpublic boolean namespaceExists(String ns) throws org.apache.pulsar.client.admin.PulsarAdminException
org.apache.pulsar.client.admin.PulsarAdminExceptionpublic void createNamespace(String ns) throws org.apache.pulsar.client.admin.PulsarAdminException
org.apache.pulsar.client.admin.PulsarAdminExceptionpublic void deleteNamespace(String ns) throws org.apache.pulsar.client.admin.PulsarAdminException
org.apache.pulsar.client.admin.PulsarAdminExceptionpublic List<String> getTopics(String ns) throws org.apache.pulsar.client.admin.PulsarAdminException
org.apache.pulsar.client.admin.PulsarAdminExceptionpublic boolean topicExists(String topicName) throws org.apache.pulsar.client.admin.PulsarAdminException
org.apache.pulsar.client.admin.PulsarAdminExceptionpublic void deleteTopic(String topicName) throws org.apache.pulsar.client.admin.PulsarAdminException
org.apache.pulsar.client.admin.PulsarAdminExceptionpublic void createTopic(String topicName, int defaultPartitionNum) throws org.apache.pulsar.client.admin.PulsarAdminException, IncompatibleSchemaException
org.apache.pulsar.client.admin.PulsarAdminExceptionIncompatibleSchemaExceptionpublic void putSchema(String topicName, org.apache.pulsar.common.schema.SchemaInfo schemaInfo) throws IncompatibleSchemaException
IncompatibleSchemaExceptionpublic void setupCursor(Map<TopicRange,org.apache.pulsar.client.api.MessageId> offset, boolean failOnDataLoss)
public void setupCursor(Map<TopicRange,org.apache.pulsar.client.api.MessageId> offset)
public void commitOffsetToCursor(Map<TopicRange,org.apache.pulsar.client.api.MessageId> offset)
public void removeCursor(Set<TopicRange> topics) throws PulsarMetadataReader.ClosedException
public org.apache.pulsar.client.api.MessageId getPositionFromSubscription(TopicRange topic, org.apache.pulsar.client.api.MessageId defaultPosition)
public org.apache.pulsar.common.schema.SchemaInfo getPulsarSchema(List<String> topics) throws IncompatibleSchemaException
IncompatibleSchemaExceptionpublic org.apache.pulsar.common.schema.SchemaInfo getPulsarSchema(String topic)
public Set<TopicRange> getTopicPartitions() throws org.apache.pulsar.client.admin.PulsarAdminException
org.apache.pulsar.client.admin.PulsarAdminExceptionpublic Set<TopicRange> getTopicPartitionsAll() throws org.apache.pulsar.client.admin.PulsarAdminException
org.apache.pulsar.client.admin.PulsarAdminException - pulsarAdminExceptionpublic List<TopicRange> getTopics() throws org.apache.pulsar.client.admin.PulsarAdminException
org.apache.pulsar.client.admin.PulsarAdminExceptionpublic org.apache.pulsar.client.api.MessageId getLastMessageId(String topic)
public boolean checkCursorAvailable(String topic, org.apache.pulsar.client.impl.MessageIdImpl startMessageId)
public void resetCursor(TopicRange topicRange, org.apache.pulsar.client.api.MessageId messageId)
Copyright © 2019–2021 The Apache Software Foundation. All rights reserved.