Examples of StartCMResult


Examples of org.apache.helix.TestHelper.StartCMResult

      if (testInfo._startCMResultMap.containsKey(controllerName))
      {
        LOG.warn("Controller:" + controllerName + " has already started; skip starting it");
      } else
      {
        StartCMResult result = TestHelper.startController(clusterName, controllerName, ZK_ADDR,
            HelixControllerMain.STANDALONE);
        testInfo._startCMResultMap.put(controllerName, result);
      }
    }
  }
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

    TestInfo testInfo = _testInfoMap.get(uniqClusterName);
    // String clusterName = testInfo._clusterName;

    String failHost = PARTICIPANT_PREFIX + "_" + (START_PORT + instanceId);
    StartCMResult result = testInfo._startCMResultMap.remove(failHost);

    // TODO need sync
    if (result == null || result._manager == null || result._thread == null)
    {
      String errMsg = "Dummy participant:" + failHost + " seems not running";
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

     
      participants[i] = new MockParticipant(factory, CLUSTER_NAME, instanceName, ZK_ADDR, null);
      participants[i].syncStart();
    }
    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

    paraMap.put(JsonParameters.MANAGEMENT_COMMAND, ClusterSetup.expandCluster);
    response = assertSuccessPostOperation(clusterUrl, paraMap, false);

    for (int i = 3; i <= 6; i++)
    {
      StartCMResult result =
          TestHelper.startDummyProcess(ZK_ADDR, "clusterTest1", "localhost_123" + i + "1");
      _startCMResultMap.put("localhost_123" + i + "1", result);
    }

    verifyResult =
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

      InterruptedException
  {
    // start mock nodes
    for (int i = 0; i < 6; i++)
    {
      StartCMResult result =
          TestHelper.startDummyProcess(ZK_ADDR, "clusterTest1", "localhost_123" + i);
      _startCMResultMap.put("localhost_123" + i, result);
    }

    // start controller nodes
    for (int i = 0; i < 2; i++)
    {
      StartCMResult result =
          TestHelper.startController("Klazt3rz",
                                     "controller_900" + i,
                                     ZK_ADDR,
                                     HelixControllerMain.DISTRIBUTED);
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

    }
    _setupTool.rebalanceStorageCluster(CLUSTER_NAME, TEST_DB, 1);
   
    // 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

    for (int i = 0; i < 2; i++)
    {
      String storageNodeName = PARTICIPANT_PREFIX + "_" + (1000 + i);
      _setupTool.addInstanceToCluster(CLUSTER_NAME, storageNodeName);
     
      StartCMResult resultx =
          TestHelper.startDummyProcess(ZK_ADDR, CLUSTER_NAME, storageNodeName.replace(':', '_'));
      _startCMResultMap.put(storageNodeName, resultx);
    }
    Thread.sleep(1000);
    result =
View Full Code Here

Examples of org.apache.helix.TestHelper.StartCMResult

    _setupTool.addResourceToCluster(CLUSTER_NAME, db2, 60, "OnlineOffline", IdealStateModeProperty.AUTO_REBALANCE+"");
   

    _setupTool.rebalanceStorageCluster(CLUSTER_NAME, db2, 1);
    String instance2 = "localhost_279699";
    StartCMResult result = TestHelper.startDummyProcess(ZK_ADDR, CLUSTER_NAME, instance2);
   
   
    Thread.sleep(500);
    Assert.assertFalse(result._thread.isAlive());
    Assert.assertTrue(null == manager.getHelixDataAccessor().getProperty(accessor.keyBuilder().liveInstance(instance2)));

    ConfigScope scope =
        new ConfigScopeBuilder().forCluster(CLUSTER_NAME)
                                .build();
   
    manager.getConfigAccessor().set(scope, ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN, "true");
   
    result =
        TestHelper.startDummyProcess(ZK_ADDR, CLUSTER_NAME, instance2);
   
    StartCMResult result2 =
        TestHelper.startDummyProcess(ZK_ADDR, CLUSTER_NAME, instance2);
   
    Thread.sleep(500);
    Assert.assertTrue(result._thread.isAlive() || result2._thread.isAlive());
    for(int i = 0; i< 20; i++)
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
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.