lordcheng10 commented on a change in pull request #2947:
URL: https://github.com/apache/bookkeeper/pull/2947#discussion_r771080047



##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
##########
@@ -525,6 +527,15 @@ public void setZkLedgersRootPath(String zkLedgersPath) {
         setProperty(ZK_LEDGERS_ROOT_PATH, zkLedgersPath);
     }
 
+    /**
+     * @return zk enable health path
+     * */
+    public String getEnableHealthPath() {
+        String zkLedgersRootPath = 
ZKMetadataDriverBase.resolveZkLedgersRootPath(this);
+        String ledgerParentPath = zkLedgersRootPath.substring(0, 
zkLedgersRootPath.lastIndexOf("/ledgers"));
+        return String.format("%s/%s", ledgerParentPath, "enableHealthCheck");

Review comment:
       Here, the string is divided according to the configured metadata service 
URI, for example:
   metadataServiceUri=zk+hie rarchical://localhost:2181 ;/ bookie_ ss_ 
share/ledgers
   Then the intercepted string path is: / bookie_ ss_ share,Like this: 
   
![image](https://user-images.githubusercontent.com/19296967/146484044-28a9ebf0-e084-4e56-9319-6fad0a6ca7bf.png)
   @zymap 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to