You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2018/03/01 06:10:32 UTC

[incubator-pulsar] branch master updated: Precreate readonly path and increase disk usage thresholds for pulsar standalone (#1309)

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

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new d0f8a40  Precreate readonly path and increase disk usage thresholds for pulsar standalone (#1309)
d0f8a40 is described below

commit d0f8a40d0834525ac1679cc7a28621ddc23f899e
Author: Sijie Guo <gu...@gmail.com>
AuthorDate: Wed Feb 28 22:10:30 2018 -0800

    Precreate readonly path and increase disk usage thresholds for pulsar standalone (#1309)
---
 .../org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/pulsar-zookeeper-utils/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java b/pulsar-zookeeper-utils/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java
index 016e2ad..09a75d0 100644
--- a/pulsar-zookeeper-utils/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java
+++ b/pulsar-zookeeper-utils/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java
@@ -145,13 +145,15 @@ public class LocalBookkeeperEnsemble {
             if (zkc.exists("/ledgers/available", false) == null) {
                 zkc.create("/ledgers/available", new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
             }
+            if (zkc.exists("/ledgers/available/readonly", false) == null) {
+                zkc.create("/ledgers/available/readonly", new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
+            }
             // No need to create an entry for each requested bookie anymore as the
             // BookieServers will register themselves with ZooKeeper on startup.
         } catch (KeeperException e) {
-            // TODO Auto-generated catch block
             LOG.error("Exception while creating znodes", e);
         } catch (InterruptedException e) {
-            // TODO Auto-generated catch block
+            Thread.currentThread().interrupt();
             LOG.error("Interrupted while creating znodes", e);
         }
     }
@@ -232,6 +234,9 @@ public class LocalBookkeeperEnsemble {
         conf.setFlushInterval(60000);
         conf.setProperty("journalMaxGroupWaitMSec", 1L);
         conf.setAdvertisedAddress(advertisedAddress);
+        // use high disk usage thresholds for standalone
+        conf.setDiskUsageWarnThreshold(0.9999f);
+        conf.setDiskUsageThreshold(0.99999f);
 
         runZookeeper(1000);
         initializeZookeper();

-- 
To stop receiving notification emails like this one, please contact
sijie@apache.org.