Package com.linkedin.helix.tools

Examples of com.linkedin.helix.tools.ClusterSetup


  StringRepresentation getSchedulerTasksRepresentation() throws JsonGenerationException, JsonMappingException, IOException
  {
    String clusterName = (String)getRequest().getAttributes().get("clusterName");
    String instanceName = (String)getRequest().getAttributes().get("instanceName");
    ZkClient zkClient = (ZkClient)getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
    ClusterSetup setupTool = new ClusterSetup(zkClient);
    List<String> instances = setupTool.getClusterManagementTool().getInstancesInCluster(clusterName);
   
    HelixDataAccessor accessor = ClusterRepresentationUtil.getClusterDataAccessor(zkClient, clusterName);
    LiveInstance liveInstance = accessor.getProperty(accessor.keyBuilder().liveInstance(instanceName));
    String sessionId = liveInstance.getSessionId();
   
View Full Code Here


      IOException
  {
    ZkClient zkClient =
        (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
    ;
    ClusterSetup setupTool = new ClusterSetup(zkClient);
    List<String> hostedEntities =
        setupTool.getClusterManagementTool().getResourcesInCluster(clusterName);

    ZNRecord hostedEntitiesRecord = new ZNRecord("ResourceGroups");
    hostedEntitiesRecord.setListField("ResourceGroups", hostedEntities);

    StringRepresentation representation =
View Full Code Here

        }

        ZkClient zkClient =
            (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
        ;
        ClusterSetup setupTool = new ClusterSetup(zkClient);
        setupTool.addResourceToCluster(clusterName,
                                       entityName,
                                       partitions,
                                       stateModelDefRef,
                                       mode);
      }
View Full Code Here

      JsonMappingException,
      IOException
  {
    ZkClient zkClient =
        (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
    ClusterSetup setupTool = new ClusterSetup(zkClient);
    List<String> clusters = setupTool.getClusterManagementTool().getClusters();

    ZNRecord clustersRecord = new ZNRecord("Clusters Summary");
    clustersRecord.setListField("clusters", clusters);
    StringRepresentation representation =
        new StringRepresentation(ClusterRepresentationUtil.ZNRecordToJson(clustersRecord),
View Full Code Here

      {
        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
View Full Code Here

TOP

Related Classes of com.linkedin.helix.tools.ClusterSetup

Copyright © 2018 www.massapicom. 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.