You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/12/16 16:52:33 UTC

[GitHub] [bookkeeper] lordcheng10 commented on a change in pull request #2947: suport dynamic enable/disable health check

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



##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java
##########
@@ -260,6 +261,30 @@ public synchronized LedgerManagerFactory getLedgerManagerFactory()
         return lmFactory;
     }
 
+    public boolean isEnableHealthCheck() {
+        try {
+            return null == zk.exists(conf.getEnableHealthPath(), false);
+        } catch (Exception e) {
+            return true;
+        }
+    }
+
+    public void disableHealthCheck(String enableHealthPath) throws Exception{
+        zk.create(enableHealthPath, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);

Review comment:
       Do you mean to add an ACL parameter?like:
   public void disableHealthCheck(String enableHealthPath, List<ACL> acl) 




-- 
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: issues-unsubscribe@bookkeeper.apache.org

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