Examples of AssignmentFromZK


Examples of org.apache.s4.comm.topology.AssignmentFromZK

        String clusterName = "test-s4-cluster";
        taskSetup.clean(clusterName);
        taskSetup.setup(clusterName, 10);
        String zookeeperAddress = "localhost:2181";
        for (int i = 0; i < 10; i++) {
            AssignmentFromZK assignmentFromZK = new AssignmentFromZK(
                    clusterName, zookeeperAddress, 30000, 30000);
            ClusterNode assignClusterNode = assignmentFromZK
                    .assignClusterNode();
            System.out.println(i+"-->"+assignClusterNode);
        }
        TopologyFromZK topologyFromZK=new TopologyFromZK(clusterName, zookeeperAddress, 30000, 30000);
        Thread.sleep(3000);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.