Package org.apache.helix.manager.zk

Examples of org.apache.helix.manager.zk.MockParticipant.syncStart()


    _setupTool.rebalanceStorageCluster(CLUSTER_NAME, db2, 1);
    String instance2 = "localhost_279699";
    // StartCMResult result = TestHelper.startDummyProcess(zkaddr, CLUSTER_NAME, instance2);
    MockParticipant newParticipant = new MockParticipant(_zkaddr, CLUSTER_NAME, instance2);
    newParticipant.syncStart();

    Thread.sleep(500);
    // Assert.assertFalse(result._thread.isAlive());
    Assert.assertTrue(null == manager.getHelixDataAccessor().getProperty(
        accessor.keyBuilder().liveInstance(instance2)));
View Full Code Here


        new HelixConfigScopeBuilder(ConfigScopeProperty.CLUSTER).forCluster(CLUSTER_NAME).build();

    manager.getConfigAccessor().set(scope, ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN, "true");

    newParticipant = new MockParticipant(_zkaddr, CLUSTER_NAME, instance2);
    newParticipant.syncStart();

    Thread.sleep(500);
    // Assert.assertTrue(result._thread.isAlive() || result2._thread.isAlive());
    for (int i = 0; i < 20; i++) {
      if (null == manager.getHelixDataAccessor().getProperty(
View Full Code Here

      String instanceName = "localhost_" + (START_PORT + i);
      try {
        // the call fails on getClusterManagerForParticipant()
        // no threads start
        newParticipant = new MockParticipant(_zkaddr, CLUSTER_NAME, instanceName);
        newParticipant.syncStart();
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
View Full Code Here

      exception = true;
    }
    Assert.assertFalse(exception);
    MockParticipant newParticipant =
        new MockParticipant(_zkaddr, CLUSTER_NAME, instanceName2);
    newParticipant.syncStart();

    result =
        ClusterStateVerifier.verifyByPolling(new ClusterStateVerifier.BestPossAndExtViewZkVerifier(
            _zkaddr, CLUSTER_NAME));
    Assert.assertTrue(result);
View Full Code Here

      _setupTool.addInstanceToCluster(CLUSTER_NAME, storageNodeName);

      String newInstanceName = storageNodeName.replace(':', '_');
      MockParticipant participant =
          new MockParticipant(_zkaddr, CLUSTER_NAME, newInstanceName);
      participant.syncStart();
    }

    // Thread.sleep(1000);
    result =
        ClusterStateVerifier.verifyByZkCallback(new ExternalViewBalancedVerifier(_zkclient,
View Full Code Here

    Thread.sleep(500);
    MockParticipant participant =
        new MockParticipant(_zkaddr, participants[0].getClusterName(),
            participants[0].getInstanceName());
    System.err.println("Restart " + participant.getInstanceName());
    participant.syncStart();
    result =
        ClusterStateVerifier.verifyByZkCallback(new BestPossAndExtViewZkVerifier(_zkaddr,
            clusterName));
    Assert.assertTrue(result);
View Full Code Here

        LOG.warn("Dummy participant:" + instanceName + " has already started; skip starting it");
      } else {
        // StartCMResult result = TestHelper.startDummyProcess(ZK_ADDR, clusterName, instanceName);
        MockParticipant participant =
            new MockParticipant(zkAddr, clusterName, instanceName);
        participant.syncStart();
        testInfo._managers.put(instanceName, participant);
        // testInfo._instanceStarted.countDown();
      }
    }
  }
View Full Code Here

    // start dummy participants
    for (int i = 0; i < NODE_NR; i++) {
      String instanceName = "localhost_" + (START_PORT + i);
      MockParticipant participant =
          new MockParticipant(_zkaddr, CLUSTER_NAME, instanceName);
      participant.syncStart();
      _participants[i] = participant;

    }

    // start controller
View Full Code Here

      String storageNodeName = "localhost_" + (1000 + i);
      _setupTool.addInstanceToCluster(CLUSTER_NAME, storageNodeName);

      MockParticipant participant =
          new MockParticipant(_zkaddr, CLUSTER_NAME, storageNodeName.replace(':', '_'));
      participant.syncStart();
    }
    Thread.sleep(5000);
    result =
        ClusterStateVerifier.verifyByZkCallback(new ExternalViewBalancedVerifier(_zkclient,
            CLUSTER_NAME, TEST_DB));
View Full Code Here

    // start mock nodes
    for (int i = 0; i < 6; i++) {
      String instanceName = "localhost_123" + i;
      MockParticipant participant =
          new MockParticipant(_zkaddr, clusterName, instanceName);
      participant.syncStart();
      participants.put(instanceName, participant);
    }

    // start controller nodes
    for (int i = 0; i < 2; i++) {
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.