This is an automated email from the ASF dual-hosted git repository.

yong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new e50cf06ce2 Add example for multiple server list in metadataServiceUri 
configuration (#3580)
e50cf06ce2 is described below

commit e50cf06ce208989c3c295a518f3e0a2da8e5abc9
Author: Hang Chen <[email protected]>
AuthorDate: Thu Oct 27 09:33:59 2022 +0800

    Add example for multiple server list in metadataServiceUri configuration 
(#3580)
    
    ### Motivation
    When users configure multiple servers for `metadataServiceUri`, they will 
be confused about how to separate the server list.
    
    ### Changes
    Add an example to explain how to configure multiple servers for 
`metadataServiceUri`
---
 .../src/main/java/org/apache/bookkeeper/http/HttpRouter.java        | 6 ++++--
 conf/bk_server.conf                                                 | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/bookkeeper-http/http-server/src/main/java/org/apache/bookkeeper/http/HttpRouter.java
 
b/bookkeeper-http/http-server/src/main/java/org/apache/bookkeeper/http/HttpRouter.java
index 1d1d562ff7..ed460b73c9 100644
--- 
a/bookkeeper-http/http-server/src/main/java/org/apache/bookkeeper/http/HttpRouter.java
+++ 
b/bookkeeper-http/http-server/src/main/java/org/apache/bookkeeper/http/HttpRouter.java
@@ -89,8 +89,10 @@ public abstract class HttpRouter<Handler> {
                 
handlerFactory.newHandler(HttpServer.ApiType.BOOKIE_STATE_READONLY));
         this.endpointHandlers.put(BOOKIE_IS_READY, 
handlerFactory.newHandler(HttpServer.ApiType.BOOKIE_IS_READY));
         this.endpointHandlers.put(BOOKIE_INFO, 
handlerFactory.newHandler(HttpServer.ApiType.BOOKIE_INFO));
-        this.endpointHandlers.put(SUSPEND_GC_COMPACTION, 
handlerFactory.newHandler(HttpServer.ApiType.SUSPEND_GC_COMPACTION));
-        this.endpointHandlers.put(RESUME_GC_COMPACTION, 
handlerFactory.newHandler(HttpServer.ApiType.RESUME_GC_COMPACTION));
+        this.endpointHandlers.put(SUSPEND_GC_COMPACTION,
+            
handlerFactory.newHandler(HttpServer.ApiType.SUSPEND_GC_COMPACTION));
+        this.endpointHandlers.put(RESUME_GC_COMPACTION,
+            
handlerFactory.newHandler(HttpServer.ApiType.RESUME_GC_COMPACTION));
 
         // autorecovery
         this.endpointHandlers.put(AUTORECOVERY_STATUS, handlerFactory
diff --git a/conf/bk_server.conf b/conf/bk_server.conf
index d6faf9c398..6158396577 100755
--- a/conf/bk_server.conf
+++ b/conf/bk_server.conf
@@ -775,6 +775,8 @@ gcEntryLogMetadataCacheEnabled=false
 #############################################################################
 
 # metadata service uri that bookkeeper is used for loading corresponding 
metadata driver and resolving its metadata service location
+# The server list can be semicolon separated values, for example:
+# metadataServiceUri=zk+hierarchical://zk1:2181;zk2:2181;zk3:2181/ledgers
 metadataServiceUri=zk+hierarchical://localhost:2181/ledgers
 
 # @Deprecated - `ledgerManagerFactoryClass` is deprecated in favor of using 
`metadataServiceUri`

Reply via email to