Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. package org.apache.helix;
  2.  
  3. import org.apache.helix.api.id.ClusterId;
  4. import org.apache.helix.api.id.ControllerId;
  5. import org.apache.helix.manager.zk.ZkHelixConnection;
  6.  
  7. public class AppTest {
  8.  
  9. public static void main(String[] args) throws Exception {
  10. HelixConnection connection = new ZkHelixConnection("localhost:2181");
  11. connection.connect();
  12.  
  13. // start multi-cluster-controller
  14. ClusterId clusterId = ClusterId.from("test-cluster");
  15. ControllerId controllerId = ControllerId.from("localhost_9001");
  16. HelixMultiClusterController controller
  17. = connection.createMultiClusterController(clusterId, controllerId);
  18. controller.start();
  19. System.out.println("connection connected: " + connection.isConnected());
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement