Package org.apache.helix.mock.participant

Examples of org.apache.helix.mock.participant.MockParticipant$MockBootstrapModelFactory


    // start participants
    for (int i = 0; i < 5; i++)
    {
      String instanceName = "localhost_" + (12918 + i);

      participants[i] = new MockParticipant(clusterName, instanceName, ZK_ADDR);
      participants[i].syncStart();
    }

    boolean result =
        ClusterStateVerifier.verifyByZkCallback(new MasterNbInExtViewVerifier(ZK_ADDR,
View Full Code Here


    TestMockMSModelFactory[] ftys = new TestMockMSModelFactory[n];
   
    for (int i = 0; i < n; i++) {
      String instanceName = "localhost_" + (12918 + i);
      ftys[i] = new TestMockMSModelFactory();
      participants[i] = new MockParticipant(ftys[i], clusterName, instanceName, ZK_ADDR, null);
      participants[i].syncStart();
     
      // wait for each participant to complete state transitions, so we have deterministic results
      boolean result = false;
      do {
View Full Code Here

    // start participants
    for (int i = 0; i < 5; i++)
    {
      String instanceName = "localhost_" + (12918 + i);

      participants[i] = new MockParticipant(clusterName, instanceName, ZK_ADDR, null);
      participants[i].syncStart();
    }

    boolean result =
        ClusterStateVerifier.verifyByZkCallback(new MasterNbInExtViewVerifier(ZK_ADDR,
View Full Code Here

    MockParticipant[] participants = new MockParticipant[5];
    for (int i = 0; i < 5; i++)
    {
      String instanceName = "localhost_" + (12918 + i);

      participants[i] = new MockParticipant(clusterName, instanceName, ZK_ADDR, null);

      // add a state model with non-OFFLINE initial state
      StateMachineEngine stateMach = participants[i].getManager().getStateMachineEngine();
      MockBootstrapModelFactory bootstrapFactory = new MockBootstrapModelFactory();
      stateMach.registerStateModelFactory("Bootstrap", bootstrapFactory);
View Full Code Here

      ZkHelixTestManager manager =
          new ZkHelixTestManager(clusterName,
                                 instanceName,
                                 InstanceType.PARTICIPANT,
                                 ZK_ADDR);
      participants[i] = new MockParticipant(manager, null);
      participants[i].syncStart();
    }

    ZkHelixTestManager controller =
        new ZkHelixTestManager(clusterName,
View Full Code Here

      MockParticipant[] participants = new MockParticipant[n];
      for (int i = 0; i < n; i++)
      {
        String instanceName = "localhost_" + (12918 + i);

        participants[i] = new MockParticipant(clusterName, instanceName, ZK_ADDR, null);
        participants[i].syncStart();
      }

      boolean result =
          ClusterStateVerifier.verifyByZkCallback(new ClusterStateVerifier.BestPossAndExtViewZkVerifier(ZK_ADDR,
View Full Code Here

      MockParticipant[] participants = new MockParticipant[n];
      for (int i = 0; i < n; i++)
      {
        String instanceName = "localhost_" + (12918 + i);

        participants[i] = new MockParticipant(clusterName, instanceName, ZK_ADDR, null);
        participants[i].syncStart();
      }

      boolean result =
          ClusterStateVerifier.verifyByZkCallback(new ClusterStateVerifier.BestPossAndExtViewZkVerifier(ZK_ADDR,
View Full Code Here

        controller.syncStart();

        MockParticipant[] participants = new MockParticipant[n];
        for (int i = 0; i < n; i++) {
            String instanceName = "localhost_" + (12918 + i);
            participants[i] = new MockParticipant(clusterName, instanceName, zkAddr, null);
            participants[i].syncStart();

            // register a controller listener on participant_0
            if (i == 0) {
                ZkHelixTestManager manager = participants[0].getManager();
View Full Code Here

    // start mock nodes
    for (int i = 0; i < n; i++)
    {
      String instanceName = "localhost_123" + i;
      participants[i] = new MockParticipant(clusterName, instanceName, ZK_ADDR);
      participants[i].syncStart();
    }

    // start controller nodes
    for (int i = 0; i < 2; i++)
View Full Code Here

    MockParticipant[] newParticipants = new MockParticipant[4];
    for (int i = 3; i <= 6; i++)
    {
      String instanceName = "localhost_123" + i + "1";
      newParticipants[i - 3] = new MockParticipant(clusterName, instanceName,
          ZK_ADDR);
      newParticipants[i - 3].syncStart();
    }

    boolean verifyResult = ClusterStateVerifier
View Full Code Here

TOP

Related Classes of org.apache.helix.mock.participant.MockParticipant$MockBootstrapModelFactory

Copyright © 2018 www.massapicom. 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.