Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.apache.helix;
- import org.apache.helix.api.id.ClusterId;
- import org.apache.helix.api.id.ControllerId;
- import org.apache.helix.manager.zk.ZkHelixConnection;
- public class AppTest {
- public static void main(String[] args) throws Exception {
- HelixConnection connection = new ZkHelixConnection("localhost:2181");
- connection.connect();
- // start multi-cluster-controller
- ClusterId clusterId = ClusterId.from("test-cluster");
- ControllerId controllerId = ControllerId.from("localhost_9001");
- HelixMultiClusterController controller
- = connection.createMultiClusterController(clusterId, controllerId);
- controller.start();
- System.out.println("connection connected: " + connection.isConnected());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement