Package com.netflix.curator.framework

Examples of com.netflix.curator.framework.CuratorFramework


        ret.start();
        return ret;
    }

    public static CuratorFramework newCuratorStarted(Map conf, List<String> servers, Object port) {
        CuratorFramework ret = newCurator(conf, servers, port);
        ret.start();
        return ret;
    }   
View Full Code Here


                              .get(Config.TOPOLOGY_KRYO_REGISTER));
            }
            String rootDir = conf.get(Config.TRANSACTIONAL_ZOOKEEPER_ROOT) + "/" + id + "/" + subroot;
            List<String> servers = (List<String>) getWithBackup(conf, Config.TRANSACTIONAL_ZOOKEEPER_SERVERS, Config.STORM_ZOOKEEPER_SERVERS);
            Object port = getWithBackup(conf, Config.TRANSACTIONAL_ZOOKEEPER_PORT, Config.STORM_ZOOKEEPER_PORT);
            CuratorFramework initter = Utils.newCuratorStarted(conf, servers, port);
            try {
                initter.create().creatingParentsIfNeeded().forPath(rootDir);
            } catch(KeeperException.NodeExistsException e)  {
               
            }
           
            initter.close();
                                   
            _curator = Utils.newCuratorStarted(conf, servers, port, rootDir);
            _ser = new KryoValuesSerializer(conf);
            _des = new KryoValuesDeserializer(conf);
        } catch (Exception e) {
View Full Code Here

        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();
            p.setProperty("zookeeper.connect", zookeeperConnectionString);
            p.setProperty("broker.id", "0");
            p.setProperty("port", "" + port);
            kafka.server.KafkaConfig config = new kafka.server.KafkaConfig(p);
View Full Code Here

TOP

Related Classes of com.netflix.curator.framework.CuratorFramework

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.