Examples of StartCMResult


Examples of org.apache.helix.TestHelper.StartCMResult

                                                           "localhost_12919",
                                                           /* "localhost_12920", */"localhost_12921",
                                                           "localhost_12922"),
                                 ZK_ADDR);

    StartCMResult result =
        TestHelper.startDummyProcess(ZK_ADDR, CLUSTER_NAME, hostToKill);
    _startCMResultMap.put(hostToKill, result);

    TestHelper.verifyWithTimeout("verifyEmptyCurStateAndExtView",
                                 30 * 1000,
 
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

    {
      e.printStackTrace();
      exception = true;
    }
    Assert.assertFalse(exception);
    StartCMResult result2 =
        TestHelper.startDummyProcess(ZK_ADDR, CLUSTER_NAME, instanceName2);
    _startCMResultMap.put(instanceName2, result2);
   
    result = ClusterStateVerifier.verifyByPolling(
        new ClusterStateVerifier.BestPossAndExtViewZkVerifier(ZK_ADDR, CLUSTER_NAME));
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

        LOG.error("fail to start participant:" + instanceName
                     + "(participant with the same name already running");
      }
      else
      {
        StartCMResult result = TestHelper.startDummyProcess(ZK_ADDR, firstCluster,
                                                            instanceName);
        _startCMResultMap.put(instanceName, result);
      }
    }

    // start distributed cluster controllers
    for (int i = 0; i < 5; i++)
    {
      String controllerName = CONTROLLER_PREFIX + "_" + i;
      if (_startCMResultMap.get(controllerName) != null)
      {
        LOG.error("fail to start controller:" + controllerName
                     + "(controller with the same name already running");
      }
      else
      {
        StartCMResult result = TestHelper.startController(CONTROLLER_CLUSTER,
                                                                 controllerName,
                                                                 ZK_ADDR,
                                                                 HelixControllerMain.DISTRIBUTED);
        _startCMResultMap.put(controllerName, result);
      }
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

     *   3) disconnect leader/disconnect participant
     */
    String leader = getCurrentLeader(_gZkClient, CONTROLLER_CLUSTER);
    // pauseController(_startCMResultMap.get(leader)._manager.getDataAccessor());

    StartCMResult result;

    Iterator<Entry<String, StartCMResult>> it = _startCMResultMap.entrySet().iterator();

    while (it.hasNext())
    {
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

    String leader = getCurrentLeader(zkClient, clusterName);
    Assert.assertTrue(leader != null);
    System.out.println("stop leader: " + leader + " in " + clusterName);
    Assert.assertTrue(leader != null);

    StartCMResult result = startCMResultMap.remove(leader);
    Assert.assertTrue(result._manager != null);
    result._manager.disconnect();

    Assert.assertTrue(result._thread != null);
    result._thread.interrupt();
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

  @Test()
  public void testParticiptantNameCollision() throws Exception
  {
    logger.info("RUN TestParticipantNameCollision() at " + new Date(System.currentTimeMillis()));

    StartCMResult result = null;
    for (int i = 0; i < 1; i++)
    {
      String instanceName = "localhost_" + (START_PORT + i);
      try
      {
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

    logger.info("RUN testStandAloneCMMain() at " + new Date(System.currentTimeMillis()));

    for (int i = 1; i <= 2; i++)
    {
      String controllerName = "controller_" + i;
      StartCMResult startResult =
          TestHelper.startController(CLUSTER_NAME,
                                            controllerName,
                                            ZK_ADDR,
                                            HelixControllerMain.STANDALONE);
      _startCMResultMap.put(controllerName, startResult);
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

        LOG.error("fail to start particpant:" + instanceName
            + "(participant with same name already exists)");
      }
      else
      {
        StartCMResult result =
            TestHelper.startDummyProcess(ZK_ADDR, CLUSTER_NAME, instanceName);
        _startCMResultMap.put(instanceName, result);
      }
    }

    // start controller
    String controllerName = CONTROLLER_PREFIX + "_0";
    StartCMResult startResult =
        TestHelper.startController(CLUSTER_NAME,
                                   controllerName,
                                   ZK_ADDR,
                                   HelixControllerMain.STANDALONE);
    _startCMResultMap.put(controllerName, startResult);
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

  {
    /**
     * shutdown order: 1) disconnect the controller 2) disconnect participants
     */
  
    StartCMResult result;
    Iterator<Entry<String, StartCMResult>> it = _startCMResultMap.entrySet().iterator();
    while (it.hasNext())
    {
      String instanceName = it.next().getKey();
      if (instanceName.startsWith(CONTROLLER_PREFIX))
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

      if (testInfo._startCMResultMap.containsKey(instanceName))
      {
        LOG.warn("Dummy participant:" + instanceName + " has already started; skip starting it");
      } else
      {
        StartCMResult result = TestHelper.startDummyProcess(ZK_ADDR, clusterName, instanceName);
        testInfo._startCMResultMap.put(instanceName, result);
        // testInfo._instanceStarted.countDown();
      }
    }
  }
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.