Package com.linkedin.helix

Examples of com.linkedin.helix.HelixManager.connect()


    HelixManager manager =
        HelixManagerFactory.getZKHelixManager(clusterName,
                                              "localhost_54321",
                                              InstanceType.PARTICIPANT,
                                              ZK_ADDR);
    manager.connect();
    instances = changeList.poll(1, TimeUnit.SECONDS);
    Assert.assertNotNull(instances, "Expecting a list of live instance");
    Assert.assertEquals(instances.size(), 1, "Expecting one live instance");
    Assert.assertEquals(instances.get(0).getInstanceName(), manager.getInstanceName());
    // Update data in the live instance node, should trigger another live instance change
View Full Code Here


    {
      if (controllerMode.equalsIgnoreCase(STANDALONE))
      {
        manager = HelixManagerFactory.getZKHelixManager(clusterName, controllerName,
            InstanceType.CONTROLLER, zkConnectString);
        manager.connect();
      } else if (controllerMode.equalsIgnoreCase(DISTRIBUTED))
      {
        manager = HelixManagerFactory.getZKHelixManager(clusterName, controllerName,
            InstanceType.CONTROLLER_PARTICIPANT, zkConnectString);
View Full Code Here

        // StateMachineEngine();
        StateMachineEngine stateMach = manager.getStateMachineEngine();
        stateMach.registerStateModelFactory("LeaderStandby", stateModelFactory);
        // manager.getMessagingService().registerMessageHandlerFactory(MessageType.STATE_TRANSITION.toString(),
        // genericStateMachineHandler);
        manager.connect();
      } else
      {
        logger.error("cluster controller mode:" + controllerMode + " NOT supported");
        // throw new
        // IllegalArgumentException("Unsupported cluster controller mode:" +
View Full Code Here

      StateMachineEngine stateMach = manager.getStateMachineEngine();
      DummyMSModelFactory msModelFactory = new DummyMSModelFactory();
      stateMach.registerStateModelFactory("MasterSlave", msModelFactory);

      manager.connect();

      Thread.currentThread().join();
    } catch (Exception e)
    {
      // TODO Auto-generated catch block
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.