Examples of ClusterSetup


Examples of org.apache.helix.tools.ClusterSetup

      } else if (command.equalsIgnoreCase(ClusterSetup.addCluster)) {
        jsonParameters.verifyCommand(ClusterSetup.addCluster);

        ZkClient zkClient =
            (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
        ClusterSetup setupTool = new ClusterSetup(zkClient);
        setupTool.addCluster(jsonParameters.getParameter(JsonParameters.CLUSTER_NAME), false);
      } else {
        throw new HelixException("Unsupported command: " + command + ". Should be one of ["
            + ClusterSetup.addCluster + "]");
      }
View Full Code Here

Examples of org.apache.helix.tools.ClusterSetup

  StringRepresentation getStateModelsRepresentation() throws JsonGenerationException,
      JsonMappingException, IOException {
    String clusterName = (String) getRequest().getAttributes().get("clusterName");
    ZkClient zkClient = (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
    ClusterSetup setupTool = new ClusterSetup(zkClient);

    List<String> models = setupTool.getClusterManagementTool().getStateModelDefs(clusterName);

    ZNRecord modelDefinitions = new ZNRecord("modelDefinitions");
    modelDefinitions.setListField("models", models);

    StringRepresentation representation =
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.