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



##########
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:
       add a new method :
       public static String 
resolveMetadataServiceRootPath(AbstractConfiguration<?> conf) {
           String metadataServiceUriStr = conf.getMetadataServiceUriUnchecked();
           URI metadataServiceUri = URI.create(metadataServiceUriStr);
           return metadataServiceUri.getPath();
       }




-- 
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