@Test(invocationTimeOut = 3000) public void maxLookupRedirectsTest2() throws Exception { Field field = BinaryProtoLookupService.class.getDeclaredField("maxLookupRedirects"); field.setAccessible(true); field.set(lookup, 2); Pair<InetSocketAddress, InetSocketAddress> addressPair = lookup.getBroker(topicName).get(); assertEquals(addressPair.getLeft().toString(), "broker2.pulsar.apache.org:6650"); assertEquals(addressPair.getRight().toString(), "broker2.pulsar.apache.org:6650"); }
public CompletableFuture<Pair<InetSocketAddress, InetSocketAddress>> getBroker(TopicName topicName) { return findBroker(serviceNameResolver.resolveHost(), false, topicName, 0); }
BinaryProtoLookupService implements LookupService { public CompletableFuture<Pair<InetSocketAddress, InetSocketAddress>> getBroker(TopicName topicName) { return findBroker(serviceNameResolver.resolveHost(), false, topicName, 0); } }
BinaryProtoLookupService implements LookupService { public CompletableFuture<Pair<InetSocketAddress, InetSocketAddress>> getBroker(TopicName topicName) { return findBroker(serviceNameResolver.resolveHost(), false, topicName, 0); } BinaryProtoLookupService(PulsarClientImpl client, String serviceUrl, boolean useTls, ExecutorService executor);  BinaryProtoLookupService(PulsarClientImpl client, String serviceUrl, String listenerName, boolean useTls, ExecutorService executor); }
BinaryProtoLookupService implements LookupService { public CompletableFuture<Pair<InetSocketAddress, InetSocketAddress>> getBroker(TopicName topicName) { return findBroker(serviceNameResolver.resolveHost(), false, topicName, 0); } BinaryProtoLookupService(PulsarClientImpl client, String serviceUrl, boolean useTls, ExecutorService executor);  BinaryProtoLookupService(PulsarClientImpl client, String serviceUrl, String listenerName, boolean useTls, ExecutorService executor); @Override void updateServiceUrl(String serviceUrl); CompletableFuture<Pair<InetSocketAddress, InetSocketAddress>> getBroker(TopicName topicName); CompletableFuture<PartitionedTopicMetadata> getPartitionedTopicMetadata(TopicName topicName); @Override CompletableFuture<Optional<SchemaInfo>> getSchema(TopicName topicName); @Override CompletableFuture<Optional<SchemaInfo>> getSchema(TopicName topicName, byte[] version); String getServiceUrl(); @Override CompletableFuture<List<String>> getTopicsUnderNamespace(NamespaceName namespace, Mode mode); @Override void close(); }
BinaryProtoLookupService implements LookupService { public CompletableFuture<Pair<InetSocketAddress, InetSocketAddress>> getBroker(TopicName topicName) { return findBroker(serviceNameResolver.resolveHost(), false, topicName, 0); } BinaryProtoLookupService(PulsarClientImpl client, String serviceUrl, boolean useTls, ExecutorService executor);  BinaryProtoLookupService(PulsarClientImpl client, String serviceUrl, String listenerName, boolean useTls, ExecutorService executor); @Override void updateServiceUrl(String serviceUrl); CompletableFuture<Pair<InetSocketAddress, InetSocketAddress>> getBroker(TopicName topicName); CompletableFuture<PartitionedTopicMetadata> getPartitionedTopicMetadata(TopicName topicName); @Override CompletableFuture<Optional<SchemaInfo>> getSchema(TopicName topicName); @Override CompletableFuture<Optional<SchemaInfo>> getSchema(TopicName topicName, byte[] version); String getServiceUrl(); @Override CompletableFuture<List<String>> getTopicsUnderNamespace(NamespaceName namespace, Mode mode); @Override void close();  }