Package com.linkedin.helix

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


    {
      manager = HelixManagerFactory.getZKHelixManager(CLUSTER_NAME,
                                                          "localhost_" + (START_PORT + 1),
                                                          InstanceType.PARTICIPANT,
                                                          ZK_ADDR);
      manager.connect();
      Assert.fail("Should fail on connect() since cluster structure is not set up");
    }
    catch(HelixException e)
    {
      // OK
View Full Code Here


    {
      manager = HelixManagerFactory.getZKHelixManager(CLUSTER_NAME,
                                                          "localhost_" + (START_PORT + 3),
                                                          InstanceType.PARTICIPANT,
                                                          ZK_ADDR);
      manager.connect();
      Assert.fail("Should fail on connect() since cluster structure is not set up");
    }
    catch(HelixException e)
    {
      // OK
View Full Code Here

    {
      manager = HelixManagerFactory.getZKHelixManager(CLUSTER_NAME,
                                                          "localhost_" + (START_PORT + 1),
                                                          InstanceType.PARTICIPANT,
                                                          ZK_ADDR);
      manager.connect();
      Assert.fail("Should fail on connect() since cluster structure is not set up");
    }
    catch(HelixException e)
    {
      // OK
View Full Code Here

    {
      manager = HelixManagerFactory.getZKHelixManager(CLUSTER_NAME,
                                                          "localhost_" + (START_PORT + 1),
                                                          InstanceType.PARTICIPANT,
                                                          ZK_ADDR);
      manager.connect();
      Assert.fail("Should fail on connect() since cluster structure is not set up");
    }
    catch(HelixException e)
    {
      // OK
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();
    stateMach.registerStateModelFactory("MasterSlave", stateModelFactory);
    stateMach.registerStateModelFactory("LeaderStandby", stateModelFactory1);
    stateMach.registerStateModelFactory("OnlineOffline", stateModelFactory2);

    manager.connect();
//    manager.getMessagingService().registerMessageHandlerFactory(MessageType.STATE_TRANSITION.toString(), genericStateMachineHandler);
    return manager;
  }

  public static class DummyStateModelFactory extends StateModelFactory<DummyStateModel>
View Full Code Here

                                                                         null,
                                                                         InstanceType.SPECTATOR,
                                                                         zkConnectString);


      manager.connect();
      manager.addExternalViewChangeListener(_routingTableProvider);
    } catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

    HelixManager relayHelixManager = HelixManagerFactory.getZKHelixManager(CLUSTER_NAME,
        null,
        InstanceType.SPECTATOR,
        ZK_ADDR);

    relayHelixManager.connect();
    relayHelixManager.addExternalViewChangeListener(this);
   
    _setupTool.addResourceToCluster(CLUSTER_NAME, "NextDB", 64, STATE_MODEL);
    _setupTool.rebalanceStorageCluster(CLUSTER_NAME, "NextDB", 3);
   
View Full Code Here

    HelixManager adminManager =
        HelixManagerFactory.getZKHelixManager(clusterName,
                                              null,
                                              InstanceType.ADMINISTRATOR,
                                              ZK_ADDR);
    adminManager.connect();
    final BlockingQueue<List<LiveInstance>> changeList =
        new LinkedBlockingQueue<List<LiveInstance>>();

    adminManager.addLiveInstanceChangeListener(new LiveInstanceChangeListener()
    {
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.