[GitHub] jai1 opened a new pull request #1246: Separating configuration for client and server trust store

2018-02-17 Thread GitBox
jai1 opened a new pull request #1246:  Separating configuration for client and 
server trust store
URL: https://github.com/apache/incubator-pulsar/pull/1246
 
 
   This PR separates the trust store used for incoming connections (Client 
Side) from the Outgoing (Broker Side)
   
   We have a use case where we want to trust *only* a specific trust store for 
Client Authentication (eg. athens) but our broker certs could be signed by any 
other CA.
   
   Also created new certs with 10years expiry


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] maskit commented on issue #1245: Refactor SecurityUtility class

2018-02-17 Thread GitBox
maskit commented on issue #1245: Refactor SecurityUtility class
URL: https://github.com/apache/incubator-pulsar/pull/1245#issuecomment-366489488
 
 
   retest this please


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-pulsar] branch master updated: PIP-12 Introduce builder for creating Producer Consumer Reader (#1089)

2018-02-17 Thread mmerli
This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new cb5eb5b  PIP-12 Introduce builder for creating Producer Consumer 
Reader (#1089)
cb5eb5b is described below

commit cb5eb5b671316bf200202b5b410b1438f2cde98b
Author: Matteo Merli 
AuthorDate: Sat Feb 17 12:22:47 2018 -0800

PIP-12 Introduce builder for creating Producer Consumer Reader (#1089)

* PIP-12: Introduce builders for creating Producer Consumer Reader

* Fixed Javadocs

* Addressed comments
---
 .../pulsar/broker/service/AbstractReplicator.java  |  21 +-
 .../nonpersistent/NonPersistentReplicator.java |   2 +-
 .../pulsar/broker/service/PersistentTopicTest.java |   6 +-
 .../apache/pulsar/client/api/ClientBuilder.java| 265 
 .../pulsar/client/api/ClientConfiguration.java |  10 +-
 .../apache/pulsar/client/api/ConsumerBuilder.java  | 245 +++
 .../pulsar/client/api/ConsumerConfiguration.java   |   3 +-
 .../apache/pulsar/client/api/CryptoKeyReader.java  |  39 ++-
 .../apache/pulsar/client/api/MessageRouter.java|   3 +-
 .../pulsar/client/api/MessageRoutingMode.java} |  22 +-
 .../apache/pulsar/client/api/ProducerBuilder.java  | 272 +
 .../pulsar/client/api/ProducerConfiguration.java   |  23 +-
 .../org/apache/pulsar/client/api/PulsarClient.java |  81 +-
 .../apache/pulsar/client/api/ReaderBuilder.java| 140 +++
 .../pulsar/client/api/ReaderConfiguration.java |  10 +-
 .../pulsar/client/impl/ClientBuilderImpl.java  | 154 
 .../pulsar/client/impl/ConsumerBuilderImpl.java| 176 +
 .../pulsar/client/impl/ProducerBuilderImpl.java| 194 +++
 .../pulsar/client/impl/PulsarClientImpl.java   |  23 +-
 .../pulsar/client/impl/ReaderBuilderImpl.java  | 132 ++
 .../apache/pulsar/client/api/MessageIdTest.java|  16 +-
 .../MessageIdTest.java => impl/BuildersTest.java}  |  44 ++--
 .../pulsar/client/tutorial/SampleProducer.java |   6 +-
 23 files changed, 1769 insertions(+), 118 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractReplicator.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractReplicator.java
index 1913dd5..49213c9 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractReplicator.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractReplicator.java
@@ -22,10 +22,10 @@ import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
 
-import org.apache.bookkeeper.mledger.ManagedCursor;
 import org.apache.bookkeeper.mledger.Position;
+import org.apache.pulsar.broker.service.AbstractReplicator.State;
 import 
org.apache.pulsar.broker.service.BrokerServiceException.TopicBusyException;
-import org.apache.pulsar.client.api.ProducerConfiguration;
+import org.apache.pulsar.client.api.ProducerBuilder;
 import org.apache.pulsar.client.impl.Backoff;
 import org.apache.pulsar.client.impl.ProducerImpl;
 import org.apache.pulsar.client.impl.PulsarClientImpl;
@@ -43,7 +43,7 @@ public abstract class AbstractReplicator {
 protected volatile ProducerImpl producer;
 
 protected final int producerQueueSize;
-protected final ProducerConfiguration producerConfiguration;
+protected final ProducerBuilder producerBuilder;
 
 protected final Backoff backOff = new Backoff(100, TimeUnit.MILLISECONDS, 
1, TimeUnit.MINUTES, 0 ,TimeUnit.MILLISECONDS);
 
@@ -68,10 +68,11 @@ public abstract class AbstractReplicator {
 this.producer = null;
 this.producerQueueSize = 
brokerService.pulsar().getConfiguration().getReplicationProducerQueueSize();
 
-this.producerConfiguration = new ProducerConfiguration();
-this.producerConfiguration.setSendTimeout(0, TimeUnit.SECONDS);
-this.producerConfiguration.setMaxPendingMessages(producerQueueSize);
-
this.producerConfiguration.setProducerName(getReplicatorName(replicatorPrefix, 
localCluster));
+this.producerBuilder = client.newProducer() //
+.topic(topicName)
+.sendTimeout(0, TimeUnit.SECONDS) //
+.maxPendingMessages(producerQueueSize) //
+.producerName(getReplicatorName(replicatorPrefix, 
localCluster));
 STATE_UPDATER.set(this, State.Stopped);
 }
 
@@ -83,10 +84,6 @@ public abstract class AbstractReplicator {
 
 protected abstract void disableReplicatorRead();
 
-public ProducerConfiguration getProducerConfiguration() {
-return producerConfiguration;
-}
-
 public String getRemoteCluster() {
 return remoteCluster;
 }
@@ -121,7 +118,7 @@ 

[GitHub] merlimat commented on a change in pull request #1089: PIP-12 Introduce builder for creating Producer Consumer Reader

2018-02-17 Thread GitBox
merlimat commented on a change in pull request #1089: PIP-12 Introduce builder 
for creating Producer Consumer Reader
URL: https://github.com/apache/incubator-pulsar/pull/1089#discussion_r168927012
 
 

 ##
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/api/ConsumerBuilder.java
 ##
 @@ -0,0 +1,245 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pulsar.client.api;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * {@link ConsumerBuilder} is used to configure and create instances of {@link 
Consumer}.
+ *
+ * @see PulsarClient#newConsumer()
+ *
+ * @since 2.0.0
+ */
+public interface ConsumerBuilder extends Serializable, Cloneable {
+
+/**
+ * Create a copy of the current consumer builder.
+ * 
+ * Cloning the builder can be used to share an incomplete configuration 
and specialize it multiple times. For
+ * example:
+ *
+ * 
+ * ConsumerBuilder builder = client.newConsumer() //
+ * .subscriptionName("my-subscription-name") //
+ * .subscriptionType(SubscriptionType.Shared) //
+ * .receiverQueueSize(10);
+ *
+ * Consumer consumer1 = builder.clone().topic(TOPIC_1).subscribe();
+ * Consumer consumer2 = builder.clone().topic(TOPIC_2).subscribe();
+ * 
+ */
+ConsumerBuilder clone();
+
+/**
+ * Finalize the {@link Consumer} creation by subscribing to the topic.
+ *
+ * 
+ * If the subscription does not exist, a new subscription will be created 
and all messages published after the
+ * creation will be retained until acknowledged, even if the consumer is 
not connected.
+ *
+ * @return the {@link Consumer} instance
+ * @throws PulsarClientException
+ * if the the subscribe operation fails
+ */
+Consumer subscribe() throws PulsarClientException;
+
+/**
+ * Finalize the {@link Consumer} creation by subscribing to the topic in 
asynchronous mode.
+ *
+ * 
+ * If the subscription does not exist, a new subscription will be created 
and all messages published after the
+ * creation will be retained until acknowledged, even if the consumer is 
not connected.
+ *
+ * @return a future that will yield a {@link Consumer} instance
+ * @throws PulsarClientException
+ * if the the subscribe operation fails
+ */
+CompletableFuture subscribeAsync();
+
+/**
+ * Specify the topic this consumer will subscribe on.
+ * 
+ * This argument is required when constructing the consumer.
+ *
+ * @param topicName
+ */
+ConsumerBuilder topic(String topicName);
 
 Review comment:
   For parsing, it's already all concentrated in the `DestinationName` class, 
which I plan to rename into `TopicName`. It is not exposed to users though.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] merlimat commented on issue #1089: PIP-12 Introduce builder for creating Producer Consumer Reader

2018-02-17 Thread GitBox
merlimat commented on issue #1089: PIP-12 Introduce builder for creating 
Producer Consumer Reader
URL: https://github.com/apache/incubator-pulsar/pull/1089#issuecomment-366455235
 
 
   Rebased to fix tls test certificates issue


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] merlimat commented on issue #1245: Refactor SecurityUtility class

2018-02-17 Thread GitBox
merlimat commented on issue #1245: Refactor SecurityUtility class
URL: https://github.com/apache/incubator-pulsar/pull/1245#issuecomment-366455104
 
 
   retest this please


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] merlimat commented on issue #1245: Refactor SecurityUtility class

2018-02-17 Thread GitBox
merlimat commented on issue #1245: Refactor SecurityUtility class
URL: https://github.com/apache/incubator-pulsar/pull/1245#issuecomment-366455104
 
 
   retest this please


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zhaijack commented on issue #1236: Make TopicsConsumerImpl extends PartitionedConsumerImpl

2018-02-17 Thread GitBox
zhaijack commented on issue #1236: Make TopicsConsumerImpl extends 
PartitionedConsumerImpl
URL: 
https://github.com/apache/incubator-pulsar/issues/1236#issuecomment-366440758
 
 
   In the code review, @merlimat mentioned this:
   
   ```
   I would suggest to just rename PartitionedConsumerImpl, change the 
constructor to accept a list of topics (rather than the number of partitions) 
and switch to use TopicMessageIdImpl. I don't think that UnAckedMessageTracker 
usage would need to be changed.
   
   That would avoid to add a lot of new code and having to merge it later.
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] bruth commented on issue #451: Introduce non-persistent topic

2018-02-17 Thread GitBox
bruth commented on issue #451: Introduce non-persistent topic
URL: 
https://github.com/apache/incubator-pulsar/issues/451#issuecomment-366437640
 
 
   Sorry to be commenting on a closed issue, but I wanted to ask how *cheap* is 
it to create a non-persistent topic? Would it be able to handle the use case of 
a one off request/reply? The client subscribes to a randomly named 
non-persistent topic, it publishes a request to a topic and includes the 
*reply* topic name expecting the consumer to send back a message on that topic 
at some point.
   
   I am currently using [NATS](https://github.com/nats-io/gnatsd) for this use 
case, but Pulsar would be very attractive if it can handle both cheap 
non-persistent topics and fully durable ones.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] bruth commented on issue #451: Introduce non-persistent topic

2018-02-17 Thread GitBox
bruth commented on issue #451: Introduce non-persistent topic
URL: 
https://github.com/apache/incubator-pulsar/issues/451#issuecomment-366437640
 
 
   Sorry to be commenting on a closed issue, but I wanted to ask how *cheap* it 
is to create a non-persistent topic? Would it be able to handle the use case of 
a one off request/reply? The client subscribes to a randomly named 
non-persistent topic, it publishes a request to a topic and includes the 
*reply* topic name expecting the consumer to send back a message on that topic 
at some point.
   
   I am currently using [NATS](https://github.com/nats-io/gnatsd) for this use 
case, but Pulsar would be very attractive if it can handle both cheap 
non-persistent topics and fully durable ones.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] maskit commented on a change in pull request #1241: Add REST api to check host-status for adding/removing from vip

2018-02-17 Thread GitBox
maskit commented on a change in pull request #1241: Add REST api to check 
host-status for adding/removing from vip
URL: https://github.com/apache/incubator-pulsar/pull/1241#discussion_r168917531
 
 

 ##
 File path: 
pulsar-websocket/src/main/java/org/apache/pulsar/websocket/admin/VipStatus.java
 ##
 @@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pulsar.websocket.admin;
+
+import java.io.File;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response.Status;
+
+/**
+ * Web resource used by the VIP service to check to availability of the 
web-socket proxy instance.
+ */
+@Path("/status.html")
+public class VipStatus extends WebSocketWebResource {
 
 Review comment:
   Thank you so much!


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] maskit commented on a change in pull request #1241: Add REST api to check host-status for adding/removing from vip

2018-02-17 Thread GitBox
maskit commented on a change in pull request #1241: Add REST api to check 
host-status for adding/removing from vip
URL: https://github.com/apache/incubator-pulsar/pull/1241#discussion_r168917480
 
 

 ##
 File path: 
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/admin/VipStatus.java
 ##
 @@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pulsar.proxy.server.admin;
+
+import java.io.File;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response.Status;
+
+/**
+ * Web resource used by the VIP service to check to availability of the proxy 
instance.
+ */
+@Path("/status.html")
+public class VipStatus extends ProxyWebResource {
+
+@GET
+@Context
+public String checkStatus() {
+String statusFilePath = 
service().getConfiguration().getStatusFilePath();
+
+File statusFile = new File(statusFilePath);
+if (statusFile.exists()) {
+return "OK";
+} else {
+throw new WebApplicationException(Status.NOT_FOUND);
 
 Review comment:
   OK, we shouldn't "break" the pattern. Let's keep it for now.
   It seems that there is a mechanism called `ExceptionMapper` and it sets 
status code during exception handling, it sounds like too costly for 
status.html though.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] maskit commented on a change in pull request #1241: Add REST api to check host-status for adding/removing from vip

2018-02-17 Thread GitBox
maskit commented on a change in pull request #1241: Add REST api to check 
host-status for adding/removing from vip
URL: https://github.com/apache/incubator-pulsar/pull/1241#discussion_r168917344
 
 

 ##
 File path: 
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java
 ##
 @@ -96,28 +97,30 @@ public ProxyServiceStarter(String[] args) throws Exception 
{
 
 java.security.Security.addProvider(new 
org.bouncycastle.jce.provider.BouncyCastleProvider());
 
-// create broker service
-ProxyService discoveryService = new ProxyService(config);
+// create proxy service
+ProxyService proxyService = new ProxyService(config);
 // create a web-service
 final WebServer server = new WebServer(config);
 
 Runtime.getRuntime().addShutdownHook(new Thread() {
 @Override
 public void run() {
 try {
-discoveryService.close();
+proxyService.close();
 server.stop();
 } catch (Exception e) {
 log.warn("server couldn't stop gracefully {}", 
e.getMessage(), e);
 }
 }
 });
 
-discoveryService.start();
+proxyService.start();
 
 // Setup metrics
 DefaultExports.initialize();
 server.addServlet("/metrics", new ServletHolder(MetricsServlet.class));
+server.addRestResources("/admin", 
VipStatus.class.getPackage().getName(),
 
 Review comment:
   `addRestResources("/", ` ?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jai1 commented on issue #1243: Fix redirect url on proxy to honor TLS

2018-02-17 Thread GitBox
jai1 commented on issue #1243: Fix redirect url on proxy to honor TLS
URL: https://github.com/apache/incubator-pulsar/pull/1243#issuecomment-366428033
 
 
   retest this please


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


svn commit: r25112 - /dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/

2018-02-17 Thread jai1
Author: jai1
Date: Sat Feb 17 08:49:58 2018
New Revision: 25112

Log:
Staging artifacts and signature for Pulsar release 1.22.0-incubating

Added:
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/

dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz
   (with props)

dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.asc

dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.md5

dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.sha512

dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-src.tar.gz
   (with props)

dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-src.tar.gz.asc

dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-src.tar.gz.md5

dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-src.tar.gz.sha512

Added: 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.asc
==
--- 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.asc
 (added)
+++ 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.asc
 Sat Feb 17 08:49:58 2018
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCAAdFiEEDQCP4t9TLRC/fG0se6GmTLvBFOwFAlqH7EUACgkQe6GmTLvB
+FOzEiBAA0HxoTR1GoD/gSsYOwYqKxegMX/SkgKn2A3HdalnY/lyJMN/XRz3ZT/LF
+oCCea2snl1qQuakNVp/uoIGB2d4eAUi4++iEiVSQZZl5rlCTyQJrn6Dda7PebS0u
+G86VdZVbKs6uXpcFNY/t/5aS5gYQzOl2pMc2TkSQxgma/6s1Gcq/F7viRxz2Tqcj
+Z1MDTvYDuyN4VpXTj885QWkYAGo62+wkigqcjo9/IldRZMS5reMkSAs9LwqwW6WK
+zzSqIUWgYNqU0i9tK2TIo4VzNci5+2JWeLsd1WKiSvVEInTyBELMI0PNXs1ggwP2
+CKFMBe9RwCLb01WL5TUeZMf6v9Pjx8pkVfuNpUarcl/Bcq90QMI4LQpvzP9t9ypR
+7LHnIalqfMgkIpr+fS2q2h9l7tGTnvTiu5zVgR6GZi+emDhR6coyesfEGEXzgbtJ
+tW8btoiCWi3jDHLpgQY1lSSVwmeeLWxh0rEhj+cJnh5VBgRveGtWZwQctCFeMnfO
+gdaHBDS2j542sGxedOsQkXGZAmpfaKS9oDg2K/d+SCVJhgM0ZW+jnBeiiRoc7f0V
+w16Fqy3q0RjwzpdL9yfQ12pnjGEvQ0a02zGOpxzuP/ZTZhQYRrDnJBSTZ1Bz3EIc
+e9GmhHX8k816Idof6p7KTGCHkLMcnogYXrB7bpqjpHKP/LUw3os=
+=oyiU
+-END PGP SIGNATURE-

Added: 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.md5
==
--- 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.md5
 (added)
+++ 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.md5
 Sat Feb 17 08:49:58 2018
@@ -0,0 +1,2 @@
+apache-pulsar-1.22.0-incubating-bin.tar.gz: 
+4B 19 6F A1 E7 73 87 A6  E0 BF 84 53 E0 49 08 AD

Added: 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.sha512
==
--- 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.sha512
 (added)
+++ 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-bin.tar.gz.sha512
 Sat Feb 17 08:49:58 2018
@@ -0,0 +1,3 @@
+apache-pulsar-1.22.0-incubating-bin.tar.gz: 
+91453ECF C864A6DB 209224FE 8DF49220 59CD876E 1A9355F6 09C92086 AAE0E3F1 
C9E861A5
+ CE435963 9B2A81FB 6FCAF6AB 08279E40 564F6ECA 61F5C645 5673EA9E

Added: 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-src.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-src.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-src.tar.gz.asc
==
--- 
dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/apache-pulsar-1.22.0-incubating-src.tar.gz.asc
 (added)
+++ 

[GitHub] rdhabalia commented on a change in pull request #1241: Add REST api to check host-status for adding/removing from vip

2018-02-17 Thread GitBox
rdhabalia commented on a change in pull request #1241: Add REST api to check 
host-status for adding/removing from vip
URL: https://github.com/apache/incubator-pulsar/pull/1241#discussion_r168916336
 
 

 ##
 File path: 
pulsar-websocket/src/main/java/org/apache/pulsar/websocket/admin/VipStatus.java
 ##
 @@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pulsar.websocket.admin;
+
+import java.io.File;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response.Status;
+
+/**
+ * Web resource used by the VIP service to check to availability of the 
web-socket proxy instance.
+ */
+@Path("/status.html")
+public class VipStatus extends WebSocketWebResource {
 
 Review comment:
   :-).. I will move it to `pulsar-broker-commons` so other components can 
share it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rdhabalia commented on a change in pull request #1241: Add REST api to check host-status for adding/removing from vip

2018-02-17 Thread GitBox
rdhabalia commented on a change in pull request #1241: Add REST api to check 
host-status for adding/removing from vip
URL: https://github.com/apache/incubator-pulsar/pull/1241#discussion_r168843415
 
 

 ##
 File path: 
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/admin/VipStatus.java
 ##
 @@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pulsar.proxy.server.admin;
+
+import java.io.File;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response.Status;
+
+/**
+ * Web resource used by the VIP service to check to availability of the proxy 
instance.
+ */
+@Path("/status.html")
+public class VipStatus extends ProxyWebResource {
+
+@GET
+@Context
+public String checkStatus() {
+String statusFilePath = 
service().getConfiguration().getStatusFilePath();
+
+File statusFile = new File(statusFilePath);
+if (statusFile.exists()) {
 
 Review comment:
   sure, I will add directory check.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rdhabalia commented on a change in pull request #1241: Add REST api to check host-status for adding/removing from vip

2018-02-17 Thread GitBox
rdhabalia commented on a change in pull request #1241: Add REST api to check 
host-status for adding/removing from vip
URL: https://github.com/apache/incubator-pulsar/pull/1241#discussion_r168842431
 
 

 ##
 File path: 
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/admin/VipStatus.java
 ##
 @@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pulsar.proxy.server.admin;
+
+import java.io.File;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response.Status;
+
+/**
+ * Web resource used by the VIP service to check to availability of the proxy 
instance.
+ */
+@Path("/status.html")
+public class VipStatus extends ProxyWebResource {
+
+@GET
+@Context
+public String checkStatus() {
+String statusFilePath = 
service().getConfiguration().getStatusFilePath();
+
+File statusFile = new File(statusFilePath);
+if (statusFile.exists()) {
+return "OK";
+} else {
+throw new WebApplicationException(Status.NOT_FOUND);
 
 Review comment:
   umm.. I am following same pattern which we are doing in other REST-api 
including existing 
[Broker-VipStatus](https://github.com/apache/incubator-pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/VipStatus.java)
 where we throw WebApplicationException so, jetty-server can return appropriate 
response code.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-pulsar] branch asf-site updated: Updated site at revision d5a4bb0

2018-02-17 Thread mmerli
This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 5ad1ce9  Updated site at revision d5a4bb0
5ad1ce9 is described below

commit 5ad1ce9d3e246e8f4b2aac31436c12558909cd2a
Author: jenkins 
AuthorDate: Sat Feb 17 08:13:21 2018 +

Updated site at revision d5a4bb0
---
 content/api/admin/index-all.html   |  4 +++
 .../org/apache/pulsar/client/admin/Brokers.html| 29 +++---
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/content/api/admin/index-all.html b/content/api/admin/index-all.html
index f2401b1..b1c94b9 100644
--- a/content/api/admin/index-all.html
+++ b/content/api/admin/index-all.html
@@ -666,6 +666,10 @@
 
 getHttpError()
 - Method in exception org.apache.pulsar.client.admin.PulsarAdminException
 
+getInternalConfigurationData()
 - Method in interface org.apache.pulsar.client.admin.Brokers
+
+Get the internal configuration data.
+
 getInternalInfo(String)
 - Method in interface org.apache.pulsar.client.admin.PersistentTopics
 
 Get a JSON representation of the topic metadata stored in 
ZooKeeper
diff --git a/content/api/admin/org/apache/pulsar/client/admin/Brokers.html 
b/content/api/admin/org/apache/pulsar/client/admin/Brokers.html
index 019d329..29de04e 100644
--- a/content/api/admin/org/apache/pulsar/client/admin/Brokers.html
+++ b/content/api/admin/org/apache/pulsar/client/admin/Brokers.html
@@ -17,7 +17,7 @@
 catch(err) {
 }
 //-->
-var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6};
+var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6};
 var tabs = {65535:["t0","All Methods"],2:["t2","Instance 
Methods"],4:["t3","Abstract Methods"]};
 var altColor = "altColor";
 var rowColor = "rowColor";
@@ -138,13 +138,19 @@ var activeTableTab = "activeTableTab";
 
 
 
+InternalConfigurationData
+getInternalConfigurationData()
+Get the internal configuration data.
+
+
+
 MapString,NamespaceOwnershipStatus
 getOwnedNamespaces(Stringcluster,
   StringbrokerUrl)
 Get the map of owned namespaces and their status from a 
single broker in the cluster
 
 
-
+
 void
 updateDynamicConfiguration(StringconfigName,
   StringconfigValue)
@@ -265,7 +271,7 @@ var activeTableTab = "activeTableTab";
 
 
 
-
+
 
 getAllDynamicConfigurations
 MapString,StringgetAllDynamicConfigurations()
@@ -278,6 +284,23 @@ var activeTableTab = "activeTableTab";
 
 
 
+
+
+
+
+
+getInternalConfigurationData
+InternalConfigurationDatagetInternalConfigurationData()
+throws PulsarAdminException
+Get the internal configuration data.
+
+Returns:
+internal configuration data.
+Throws:
+PulsarAdminException
+
+
+
 
 
 

-- 
To stop receiving notification emails like this one, please contact
mme...@apache.org.


[GitHub] sijie closed pull request #1223: Add a `internalConfiguration` admin restful endpoint for query internal configuration

2018-02-17 Thread GitBox
sijie closed pull request #1223: Add a `internalConfiguration` admin restful 
endpoint for query internal configuration
URL: https://github.com/apache/incubator-pulsar/pull/1223
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
index 8098f97f8..60329d767 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
@@ -30,12 +30,14 @@
 import javax.ws.rs.PathParam;
 import javax.ws.rs.core.Response.Status;
 
+import org.apache.bookkeeper.conf.ClientConfiguration;
 import org.apache.bookkeeper.util.ZkUtils;
 import org.apache.pulsar.broker.ServiceConfiguration;
 import org.apache.pulsar.broker.admin.AdminResource;
 import org.apache.pulsar.broker.loadbalance.LoadManager;
 import org.apache.pulsar.broker.service.BrokerService;
 import org.apache.pulsar.broker.web.RestException;
+import org.apache.pulsar.common.conf.InternalConfigurationData;
 import org.apache.pulsar.common.policies.data.NamespaceOwnershipStatus;
 import org.apache.pulsar.common.util.ObjectMapperFactory;
 import org.apache.pulsar.zookeeper.ZooKeeperDataCache;
@@ -183,4 +185,15 @@ private synchronized void 
updateDynamicConfigurationOnZk(String configName, Stri
 }
 }
 
+@GET
+@Path("/internal-configuration")
+@ApiOperation(value = "Get the internal configuration data", response = 
InternalConfigurationData.class)
+public InternalConfigurationData getInternalConfigurationData() {
+ClientConfiguration conf = new ClientConfiguration();
+return new InternalConfigurationData(
+pulsar().getConfiguration().getZookeeperServers(),
+pulsar().getConfiguration().getGlobalZookeeperServers(),
+conf.getZkLedgersRootPath());
+}
+
 }
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
index 52d118647..dec776849 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
@@ -46,6 +46,7 @@
 import javax.ws.rs.core.StreamingOutput;
 import javax.ws.rs.core.UriInfo;
 
+import org.apache.bookkeeper.conf.ClientConfiguration;
 import org.apache.bookkeeper.mledger.proto.PendingBookieOpsStats;
 import org.apache.bookkeeper.util.ZkUtils;
 import org.apache.pulsar.broker.admin.v1.BrokerStats;
@@ -59,6 +60,7 @@
 import org.apache.pulsar.broker.cache.ConfigurationCacheService;
 import org.apache.pulsar.broker.web.PulsarWebResource;
 import org.apache.pulsar.broker.web.RestException;
+import org.apache.pulsar.common.conf.InternalConfigurationData;
 import org.apache.pulsar.common.naming.NamespaceName;
 import org.apache.pulsar.common.policies.data.AuthAction;
 import org.apache.pulsar.common.policies.data.AutoFailoverPolicyData;
@@ -190,6 +192,16 @@ public void cleanup() throws Exception {
 super.internalCleanup();
 }
 
+@Test
+void internalConfiguration() throws Exception {
+InternalConfigurationData expectedData = new InternalConfigurationData(
+pulsar.getConfiguration().getZookeeperServers(),
+pulsar.getConfiguration().getGlobalZookeeperServers(),
+new ClientConfiguration().getZkLedgersRootPath());
+
+assertEquals(brokers.getInternalConfigurationData(), expectedData);
+}
+
 @Test
 void clusters() throws Exception {
 assertEquals(clusters.getClusters(), 
Lists.newArrayList(configClusterName));
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
index 51a4c0349..a185a7e79 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
@@ -98,6 +98,7 @@ protected void resetConfig() {
 this.conf.setActiveConsumerFailoverDelayTimeMillis(0);
 this.conf.setDefaultNumberOfNamespaceBundles(1);
 this.conf.setZookeeperServers("localhost:2181");
+this.conf.setGlobalZookeeperServers("localhost:3181");
 }
 
 protected final void internalSetup() throws Exception {
diff --git 
a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Brokers.java 
b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Brokers.java
index 

[incubator-pulsar] branch master updated: Add a `internalConfiguration` admin restful endpoint for query internal configuration (#1223)

2018-02-17 Thread sijie
This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new d5a4bb0  Add a `internalConfiguration` admin restful endpoint for 
query internal configuration (#1223)
d5a4bb0 is described below

commit d5a4bb0e44632707a96b2260e2ecddb24c1b8d9d
Author: Sijie Guo 
AuthorDate: Sat Feb 17 16:00:42 2018 +0800

Add a `internalConfiguration` admin restful endpoint for query internal 
configuration (#1223)
---
 .../pulsar/broker/admin/impl/BrokersBase.java  | 13 
 .../org/apache/pulsar/broker/admin/AdminTest.java  | 12 
 .../broker/auth/MockedPulsarServiceBaseTest.java   |  1 +
 .../org/apache/pulsar/client/admin/Brokers.java|  7 ++
 .../pulsar/client/admin/internal/BrokersImpl.java  | 10 +++
 .../org/apache/pulsar/admin/cli/CmdBrokers.java| 11 +++
 .../pulsar/admin/cli/PulsarAdminToolTest.java  |  5 +-
 .../common/conf/InternalConfigurationData.java | 78 ++
 8 files changed, 136 insertions(+), 1 deletion(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
index 8098f97..60329d7 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
@@ -30,12 +30,14 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.core.Response.Status;
 
+import org.apache.bookkeeper.conf.ClientConfiguration;
 import org.apache.bookkeeper.util.ZkUtils;
 import org.apache.pulsar.broker.ServiceConfiguration;
 import org.apache.pulsar.broker.admin.AdminResource;
 import org.apache.pulsar.broker.loadbalance.LoadManager;
 import org.apache.pulsar.broker.service.BrokerService;
 import org.apache.pulsar.broker.web.RestException;
+import org.apache.pulsar.common.conf.InternalConfigurationData;
 import org.apache.pulsar.common.policies.data.NamespaceOwnershipStatus;
 import org.apache.pulsar.common.util.ObjectMapperFactory;
 import org.apache.pulsar.zookeeper.ZooKeeperDataCache;
@@ -183,4 +185,15 @@ public class BrokersBase extends AdminResource {
 }
 }
 
+@GET
+@Path("/internal-configuration")
+@ApiOperation(value = "Get the internal configuration data", response = 
InternalConfigurationData.class)
+public InternalConfigurationData getInternalConfigurationData() {
+ClientConfiguration conf = new ClientConfiguration();
+return new InternalConfigurationData(
+pulsar().getConfiguration().getZookeeperServers(),
+pulsar().getConfiguration().getGlobalZookeeperServers(),
+conf.getZkLedgersRootPath());
+}
+
 }
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
index 52d1186..dec7768 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
@@ -46,6 +46,7 @@ import javax.ws.rs.core.Response.Status;
 import javax.ws.rs.core.StreamingOutput;
 import javax.ws.rs.core.UriInfo;
 
+import org.apache.bookkeeper.conf.ClientConfiguration;
 import org.apache.bookkeeper.mledger.proto.PendingBookieOpsStats;
 import org.apache.bookkeeper.util.ZkUtils;
 import org.apache.pulsar.broker.admin.v1.BrokerStats;
@@ -59,6 +60,7 @@ import 
org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest;
 import org.apache.pulsar.broker.cache.ConfigurationCacheService;
 import org.apache.pulsar.broker.web.PulsarWebResource;
 import org.apache.pulsar.broker.web.RestException;
+import org.apache.pulsar.common.conf.InternalConfigurationData;
 import org.apache.pulsar.common.naming.NamespaceName;
 import org.apache.pulsar.common.policies.data.AuthAction;
 import org.apache.pulsar.common.policies.data.AutoFailoverPolicyData;
@@ -191,6 +193,16 @@ public class AdminTest extends MockedPulsarServiceBaseTest 
{
 }
 
 @Test
+void internalConfiguration() throws Exception {
+InternalConfigurationData expectedData = new InternalConfigurationData(
+pulsar.getConfiguration().getZookeeperServers(),
+pulsar.getConfiguration().getGlobalZookeeperServers(),
+new ClientConfiguration().getZkLedgersRootPath());
+
+assertEquals(brokers.getInternalConfigurationData(), expectedData);
+}
+
+@Test
 void clusters() throws Exception {
 assertEquals(clusters.getClusters(), 
Lists.newArrayList(configClusterName));
 verify(clusters, never()).validateSuperUserAccess();
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java