Examples of rebalanceStorageCluster()


Examples of com.linkedin.helix.tools.ClusterSetup.rebalanceStorageCluster()

    {
      String dbName = resourceNamePrefix + i;
      setupTool.addResourceToCluster(clusterName, dbName, partitionNb, stateModelDef);
      if (doRebalance)
      {
        setupTool.rebalanceStorageCluster(clusterName, dbName, replica);
      }
    }
    zkClient.close();
  }
View Full Code Here

Examples of com.linkedin.helix.tools.ClusterSetup.rebalanceStorageCluster()

    ZKHelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName, baseAccessor);
    Builder keyBuilder = accessor.keyBuilder();
    IdealState idealState = accessor.getProperty(keyBuilder.idealStates("TestDB1"));
    idealState.setStateModelFactoryName("TestDB1_Factory");
    accessor.setProperty(keyBuilder.idealStates("TestDB1"), idealState);
    setupTool.rebalanceStorageCluster(clusterName, "TestDB1", 3);

    // external view for TestDB1 should be empty
    ExternalView extView = null;
    long start = System.currentTimeMillis();
    while (extView == null)
View Full Code Here

Examples of com.linkedin.helix.tools.ClusterSetup.rebalanceStorageCluster()

    System.out.println("oldSessionId: " + oldSessionId + ", newSessionId: " + newSessionId);
    Assert.assertTrue(newSessionId.compareTo(oldSessionId) > 0, "Session id should be increased after expiry");

    ClusterSetup setupTool = new ClusterSetup(ZK_ADDR);
    setupTool.addResourceToCluster(clusterName, "TestDB1", 10, "MasterSlave");
    setupTool.rebalanceStorageCluster(clusterName, "TestDB1", 3);

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

Examples of com.linkedin.helix.tools.ClusterSetup.rebalanceStorageCluster()

    newSessionId = controller.getSessionId();
    System.out.println("oldSessionId: " + oldSessionId + ", newSessionId: " + newSessionId);
    Assert.assertTrue(newSessionId.compareTo(oldSessionId) > 0, "Session id should be increased after expiry");

    setupTool.addResourceToCluster(clusterName, "TestDB2", 8, "MasterSlave");
    setupTool.rebalanceStorageCluster(clusterName, "TestDB2", 3);

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

Examples of com.linkedin.helix.tools.ClusterSetup.rebalanceStorageCluster()

    for (int i = 0; i < n; i++)
    {
      String controller = "controller:" + (n + i);
      setupTool.addInstanceToCluster(controllerClusterName, controller);
    }
    setupTool.rebalanceStorageCluster(controllerClusterName, clusterNamePrefix + "0", 6);
    for (int i = n; i < 2 * n; i++)
    {
      controllers[i] =
          new ClusterController(controllerClusterName,
                                "controller_" + i,
View Full Code Here

Examples of com.linkedin.helix.tools.ClusterSetup.rebalanceStorageCluster()

      {
        int replicas =
            Integer.parseInt(jsonParameters.getParameter(JsonParameters.REPLICAS));
        if (jsonParameters.getParameter(JsonParameters.RESOURCE_KEY_PREFIX) != null)
        {
          setupTool.rebalanceStorageCluster(clusterName,
                                            resourceName,
                                            replicas,
                                            jsonParameters.getParameter(JsonParameters.RESOURCE_KEY_PREFIX));
        }
        else
View Full Code Here

Examples of com.linkedin.helix.tools.ClusterSetup.rebalanceStorageCluster()

                                            replicas,
                                            jsonParameters.getParameter(JsonParameters.RESOURCE_KEY_PREFIX));
        }
        else
        {
          setupTool.rebalanceStorageCluster(clusterName, resourceName, replicas);
        }
      }
      else if (command.equalsIgnoreCase(ClusterSetup.expandResource))
      {
        setupTool.expandResource(clusterName, resourceName);
View Full Code Here

Examples of com.linkedin.helix.tools.ClusterSetup.rebalanceStorageCluster()

    Thread.sleep(1000);

    // add a new resource group
    ClusterSetup setupTool = new ClusterSetup(ZK_ADDR);
    setupTool.addResourceToCluster(clusterName, "TestDB1", 10, "MasterSlave");
    setupTool.rebalanceStorageCluster(clusterName, "TestDB1", 3);

    // make sure TestDB1 external view is empty
    TestHelper.verifyWithTimeout("verifyEmptyCurStateAndExtView",
                                 1000,
                                 clusterName,
View Full Code Here

Examples of com.linkedin.helix.tools.ClusterSetup.rebalanceStorageCluster()

      String dbName = TEST_DB_PREFIX + i;
      setupTool.addResourceToCluster(clusterName, dbName, numPartitionsPerResource,
          STATE_MODEL);
      if (doRebalance)
      {
        setupTool.rebalanceStorageCluster(clusterName, dbName, replica);

        // String idealStatePath = "/" + clusterName + "/" +
        // PropertyType.IDEALSTATES.toString() + "/"
        // + dbName;
        // ZNRecord idealState = zkClient.<ZNRecord> readData(idealStatePath);
View Full Code Here

Examples of com.linkedin.helix.tools.ClusterSetup.rebalanceStorageCluster()

    {
      String dbName = resourceNamePrefix + i;
      setupTool.addResourceToCluster(clusterName, dbName, partitionNb, stateModelDef, mode.toString());
      if (doRebalance)
      {
        setupTool.rebalanceStorageCluster(clusterName, dbName, replica);
      }
    }
    zkClient.close();
  }
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.