You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/12/02 02:37:27 UTC

[GitHub] [pulsar] merlimat opened a new pull request #13077: PIP-45: Allow to configure metadata store URL in broker.conf

merlimat opened a new pull request #13077:
URL: https://github.com/apache/pulsar/pull/13077


   ### Motivation
   
   Allow to configure the metadata store endpoint in `broker.conf`.
   
   ### Modifications
   
   Deprecated few config options:
    * `zookeeperServers` --> `metadataStoreUrl`
    * `configurationStoreServers` --> `configurationMetadataStoreUrl`
   
   Moved all deprecated settings at the end of `broker.conf`.
   
   Added `EndToEndMetadataTest` which spin up a cluster with brokers, bookies against all the supported metadata stores (ZK, local memory and RocksDB) and does basic produce/consume.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on a change in pull request #13077: PIP-45: Allow to configure metadata store URL in broker.conf

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on a change in pull request #13077:
URL: https://github.com/apache/pulsar/pull/13077#discussion_r760723501



##########
File path: conf/broker.conf
##########
@@ -19,11 +19,15 @@
 
 ### --- General broker settings --- ###
 
-# Zookeeper quorum connection string
-zookeeperServers=
+# The metadata store URL
+# Examples:
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
+# * my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 (will default to ZooKeeper when the schema is not specified)
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181/my-chroot-path (to add a ZK chroot path)
+metadataStoreUrl=
 
-# Configuration Store connection string
-configurationStoreServers=
+# The metadata store URL for the configuration data. If empty, we fall back to use metadataStoreUrl
+configurationMetadataStoreUrl=

Review comment:
       It's will be a breaking change when we use the docker image? If we don't have this configuration in the broker.conf, we need to add PULSAR_PREFIX I think.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on a change in pull request #13077: PIP-45: Allow to configure metadata store URL in broker.conf

Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #13077:
URL: https://github.com/apache/pulsar/pull/13077#discussion_r760724212



##########
File path: conf/broker.conf
##########
@@ -19,11 +19,15 @@
 
 ### --- General broker settings --- ###
 
-# Zookeeper quorum connection string
-zookeeperServers=
+# The metadata store URL
+# Examples:
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
+# * my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 (will default to ZooKeeper when the schema is not specified)
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181/my-chroot-path (to add a ZK chroot path)
+metadataStoreUrl=
 
-# Configuration Store connection string
-configurationStoreServers=
+# The metadata store URL for the configuration data. If empty, we fall back to use metadataStoreUrl
+configurationMetadataStoreUrl=

Review comment:
       I have moved all the deprecated configs in a section at the end of the file, to be less visible (and less confusing) but without breaking the compatibility.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat merged pull request #13077: PIP-45: Allow to configure metadata store URL in broker.conf

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #13077:
URL: https://github.com/apache/pulsar/pull/13077


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Anonymitaet edited a comment on pull request #13077: PIP-45: Allow to configure metadata store URL in broker.conf

Posted by GitBox <gi...@apache.org>.
Anonymitaet edited a comment on pull request #13077:
URL: https://github.com/apache/pulsar/pull/13077#issuecomment-990679671


   For the doc side, I've discussed with @codelipenghui, the following changes will be made after 2.9.0 is released:
   
   1. Change `zookeeperServers` to `metadataStoreUrl` and `configurationStoreServers` to `configurationMetadataStoreUrl` 
   for all occurrences in .md files on `master` except `puslar-perf managed-ledger zookeeperServers` (https://github.com/apache/pulsar/issues/13229)
   
   ![image](https://user-images.githubusercontent.com/50226895/145533390-04474e57-c2b4-4558-9661-9a840b75ab4c.png)
   
   ![image](https://user-images.githubusercontent.com/50226895/145533717-9da56f6f-3d70-41ab-8820-dd1aaa5f94cc.png)
   
   2. Check and add notes for deprecated parameters in [Pulsar configuration page](https://pulsar.apache.org/docs/en/next/reference-configuration/#broker) (get deprecated parameters out of the exiting configuration table and add a note for it).
   
   Hi @merlimat any thoughts? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #13077: PIP-45: Allow to configure metadata store URL in broker.conf

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #13077:
URL: https://github.com/apache/pulsar/pull/13077#discussion_r760870103



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/EmbeddedPulsarCluster.java
##########
@@ -0,0 +1,143 @@
+/**
+ * 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.broker;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+import lombok.Builder;
+import org.apache.pulsar.client.admin.PulsarAdmin;
+import org.apache.pulsar.common.policies.data.ClusterData;
+import org.apache.pulsar.common.policies.data.TenantInfo;
+import org.apache.pulsar.metadata.api.MetadataStoreException;
+import org.apache.pulsar.metadata.api.extended.MetadataStoreExtended;
+import org.apache.pulsar.metadata.bookkeeper.BKCluster;
+
+
+public class EmbeddedPulsarCluster implements AutoCloseable {

Review comment:
       Notes for the future:
   It will be great to expose an official API for this.
   It will help a lot downstream users.
   PulsarStandalone Builder doesn't work well.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #13077: PIP-45: Allow to configure metadata store URL in broker.conf

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #13077:
URL: https://github.com/apache/pulsar/pull/13077#issuecomment-1014108480


   @merlimat  Should proxy also change zookeeperServers to metadataStoreUrl?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on a change in pull request #13077: PIP-45: Allow to configure metadata store URL in broker.conf

Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #13077:
URL: https://github.com/apache/pulsar/pull/13077#discussion_r761249880



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/EmbeddedPulsarCluster.java
##########
@@ -0,0 +1,143 @@
+/**
+ * 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.broker;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+import lombok.Builder;
+import org.apache.pulsar.client.admin.PulsarAdmin;
+import org.apache.pulsar.common.policies.data.ClusterData;
+import org.apache.pulsar.common.policies.data.TenantInfo;
+import org.apache.pulsar.metadata.api.MetadataStoreException;
+import org.apache.pulsar.metadata.api.extended.MetadataStoreExtended;
+import org.apache.pulsar.metadata.bookkeeper.BKCluster;
+
+
+public class EmbeddedPulsarCluster implements AutoCloseable {

Review comment:
       Yes, I just started very simple as a way to use it as the base for unit tests, but with the idea of expanding it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org