接口 LookupService
- 所有超级接口:
AutoCloseable
- 所有已知实现类:
BinaryProtoLookupService,HttpLookupService
Provides lookup service to find broker which serves given topic. It helps to
lookup
- topic-lookup: lookup to find broker-address which serves given topic
- Partitioned-topic-Metadata-lookup: lookup to find PartitionedMetadata for a given topic
-
方法概要
修饰符和类型方法说明Calls broker lookup-api to get brokerInetSocketAddresswhich serves namespace bundle that contains given topic.CompletableFuture<org.apache.pulsar.common.partition.PartitionedTopicMetadata>getPartitionedTopicMetadata(TopicName topicName) ReturnsPartitionedTopicMetadatafor a given topic.Returns current SchemaInfoSchemaInfofor a given topic.Returns specific version SchemaInfoSchemaInfofor a given topic.Returns broker-service lookup api url.getTopicsUnderNamespace(NamespaceName namespace, CommandGetTopicsOfNamespace.Mode mode, String topicPattern, String topicsHash) Returns all the topics name for a given namespace.Resolves pulsar service url.voidupdateServiceUrl(String serviceUrl) Instruct the LookupService to switch to a new service URL for all subsequent requests.从接口继承的方法 java.lang.AutoCloseable
close
-
方法详细资料
-
updateServiceUrl
Instruct the LookupService to switch to a new service URL for all subsequent requests. -
getBroker
Calls broker lookup-api to get brokerInetSocketAddresswhich serves namespace bundle that contains given topic.- 参数:
topicName- topic-name- 返回:
- a
LookupTopicResultrepresenting the logical and physical address of the broker that serves the given topic, as well as proxying information.
-
getPartitionedTopicMetadata
CompletableFuture<org.apache.pulsar.common.partition.PartitionedTopicMetadata> getPartitionedTopicMetadata(TopicName topicName) ReturnsPartitionedTopicMetadatafor a given topic.- 参数:
topicName- topic-name- 返回:
-
getSchema
Returns current SchemaInfoSchemaInfofor a given topic.- 参数:
topicName- topic-name- 返回:
- SchemaInfo
-
getSchema
Returns specific version SchemaInfoSchemaInfofor a given topic.- 参数:
topicName- topic-nameversion- schema info version- 返回:
- SchemaInfo
-
getServiceUrl
String getServiceUrl()Returns broker-service lookup api url.- 返回:
-
resolveHost
InetSocketAddress resolveHost()Resolves pulsar service url.- 返回:
- the service url resolved to a socket address
-
getTopicsUnderNamespace
CompletableFuture<GetTopicsResult> getTopicsUnderNamespace(NamespaceName namespace, CommandGetTopicsOfNamespace.Mode mode, String topicPattern, String topicsHash) Returns all the topics name for a given namespace.- 参数:
namespace- : namespace-name- 返回:
-