@Override
    public void run() {
        Path path = Paths.get(getDefaults().underVespaHome(zookeeperServerConfig.zooKeeperConfigFile()));

        // Retry start of server. An already running server might take some time to shut down, starting a new
        // one will fail in that case, so retry
        Instant now = Instant.now();
        Instant end = now.plus(START_TIMEOUT);
        for (int attempt = 1; now.isBefore(end) && !executorService.isShutdown(); attempt++) {
            try {
                startServer(path, attempt); // Will block in a real implementation of VespaZooKeeperServer
                return;
            } catch (RuntimeException e) {
                String messagePart = "Starting " + serverDescription() + " failed on attempt " + attempt;
                if (server.reconfigurable()) {
                    Duration delay = backoff.delay(attempt);
                    log.log(Level.WARNING, messagePart + ". Retrying in " + delay + ", time left " +
                                           Duration.between(now, end), e);
                    sleeper.sleep(delay);
                } else {
                    Process.logAndDie(messagePart + ". Forcing shutdown", e);
                }
            } finally {
                now = Instant.now();
            }
        }
        // Failed, log config
        log.log(Level.INFO, "Current content of zookeeper config file at '" + path + "':\n" +
                Exceptions.uncheck(() -> Files.readString(path)));
    }
Writes zookeeper config and starts zookeeper server.

@author Harald Musum
zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/ZooKeeperRunner.java