Package com.netflix.curator.retry

Examples of com.netflix.curator.retry.ExponentialBackoffRetry


        String connectionString = server.getConnectString();
        Map conf = new HashMap();
        conf.put(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT, 1000);
        conf.put(Config.STORM_ZOOKEEPER_RETRY_TIMES, 4);
        conf.put(Config.STORM_ZOOKEEPER_RETRY_INTERVAL, 5);
        ExponentialBackoffRetry retryPolicy = new ExponentialBackoffRetry(1000, 3);
        zookeeper = CuratorFrameworkFactory.newClient(connectionString, retryPolicy);
        dynamicBrokersReader = new DynamicBrokersReader(conf, connectionString, masterPath, topic);
        zookeeper.start();
    }
View Full Code Here


    public KafkaTestBroker() {
        try {
            server = new TestingServer();
            String zookeeperConnectionString = server.getConnectString();
            ExponentialBackoffRetry retryPolicy = new ExponentialBackoffRetry(1000, 3);
            zookeeper = CuratorFrameworkFactory.newClient(zookeeperConnectionString, retryPolicy);
            zookeeper.start();
            port = InstanceSpec.getRandomPort();
            kafka.server.KafkaConfig config = buildKafkaConfig(zookeeperConnectionString);
            kafka = new KafkaServerStartable(config);
View Full Code Here

        }

        CuratorFramework client = CuratorFrameworkFactory.newClient(ensemble,
                DynamicPropertyFactory.getInstance().getIntProperty("zookeeper.session.timeout", Integer.MIN_VALUE).get(),
                DynamicPropertyFactory.getInstance().getIntProperty("zookeeper.connection.timeout", Integer.MIN_VALUE).get(),
                new ExponentialBackoffRetry(1000, 3));
      
        client.start();

        cache.put(ensemble, new ZooKeeperClientCacheItem(ensemble, client));
View Full Code Here

    /**
     * @see #retryPolicy
     */
    public RetryPolicy getRetryPolicy() {
        return new ExponentialBackoffRetry((int) backOffBaseTime.toMilliseconds(), maxRetries);
    }
View Full Code Here

   
    public void run() {
        try {
            server = new TestingServer();
            zookeeperConnectionString = server.getConnectString();
            ExponentialBackoffRetry retryPolicy = new ExponentialBackoffRetry(
                    1000, 3);
            CuratorFramework zookeeper = CuratorFrameworkFactory.newClient(
                    zookeeperConnectionString, retryPolicy);
            zookeeper.start();
            Properties p = new Properties();
View Full Code Here

TOP

Related Classes of com.netflix.curator.retry.ExponentialBackoffRetry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.