diff options
Diffstat (limited to 'zookeeper-server/zookeeper-server-common')
-rw-r--r-- | zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/ZooKeeperRunner.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/ZooKeeperRunner.java b/zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/ZooKeeperRunner.java index b30607299ad..9ada45204e8 100644 --- a/zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/ZooKeeperRunner.java +++ b/zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/ZooKeeperRunner.java @@ -68,10 +68,7 @@ public class ZooKeeperRunner implements Runnable { Instant end = now.plus(START_TIMEOUT); for (int attempt = 1; now.isBefore(end) && !executorService.isShutdown(); attempt++) { try { - log.log(Level.INFO, "Starting ZooKeeper server with " + path.toFile().getAbsolutePath() + - ". Trying to establish ZooKeeper quorum (members: " + - zookeeperServerHostnames(zookeeperServerConfig) + ", attempt " + attempt + ")"); - startServer(path); // Will block in a real implementation of VespaZooKeeperServer + startServer(path, attempt); // Will block in a real implementation of VespaZooKeeperServer return; } catch (RuntimeException e) { String messagePart = "Starting " + serverDescription() + " failed on attempt " + attempt; @@ -96,7 +93,12 @@ public class ZooKeeperRunner implements Runnable { return (server.reconfigurable() ? "" : "non-") + "reconfigurable ZooKeeper server"; } - private void startServer(Path path) { + private void startServer(Path path, int attempt) { + if (attempt > 1) + log.log(Level.INFO, "Starting ZooKeeper server with " + path.toFile().getAbsolutePath() + + ". Trying to establish ZooKeeper quorum (members: " + + zookeeperServerHostnames(zookeeperServerConfig) + ", attempt " + attempt + ")"); + // Note: Hack to make this work in ZooKeeper 3.6, where metrics provider class is // loaded by using Thread.currentThread().getContextClassLoader() which does not work // well in the container |