Examples of ZkClient


Examples of org.apache.helix.manager.zk.ZkClient

  StringRepresentation getInstancesRepresentation(String clusterName) throws JsonGenerationException,
      JsonMappingException,
      IOException
  {
    ZkClient zkClient =
        (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);

    HelixDataAccessor accessor =
        ClusterRepresentationUtil.getClusterDataAccessor(zkClient, clusterName);
    Map<String, LiveInstance> liveInstancesMap =
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient

    {
      String clusterName = (String) getRequest().getAttributes().get("clusterName");
      JsonParameters jsonParameters = new JsonParameters(entity);
      String command = jsonParameters.getCommand();

      ZkClient zkClient =
          (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
      ClusterSetup setupTool = new ClusterSetup(zkClient);

      if (command.equalsIgnoreCase(ClusterSetup.addInstance)
          || JsonParameters.CLUSTERSETUP_COMMAND_ALIASES.get(ClusterSetup.addInstance)
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient

  StringRepresentation getIdealStateRepresentation(String clusterName, String resourceName) throws JsonGenerationException,
      JsonMappingException,
      IOException
  {
    Builder keyBuilder = new PropertyKey.Builder(clusterName);
    ZkClient zkClient =
        (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);

    String message =
        ClusterRepresentationUtil.getClusterPropertyAsString(zkClient,
                                                             clusterName,
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient

    try
    {
      String clusterName = (String) getRequest().getAttributes().get("clusterName");
      String resourceGroupName =
          (String) getRequest().getAttributes().get("resourceName");
      ZkClient zkClient =
          (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
     
      ClusterSetup setupTool = new ClusterSetup(zkClient);
      setupTool.dropResourceFromCluster(clusterName, resourceGroupName);
      getResponse().setStatus(Status.SUCCESS_OK);
View Full Code Here

Examples of org.apache.s4.comm.topology.ZkClient

    }

    @Override
    protected void onCreate() {
        if (zk == null) {
            zk = new ZkClient("localhost:" + 2181);
        }

    }
View Full Code Here

Examples of org.apache.twill.zookeeper.ZKClient

    return new YarnTwillPreparer(yarnConfig, twillSpec, yarnAppClient, zkClientService, locationFactory, jvmOptions,
                                 new YarnTwillControllerFactory() {
      @Override
      public YarnTwillController create(RunId runId, Iterable<LogHandler> logHandlers,
                                        Callable<ProcessController<YarnApplicationReport>> startUp) {
        ZKClient zkClient = ZKClients.namespace(zkClientService, "/" + appName);
        YarnTwillController controller = listenController(new YarnTwillController(appName, runId, zkClient,
                                                                                  logHandlers, startUp));
        synchronized (YarnTwillRunnerService.this) {
          Preconditions.checkArgument(!controllers.contains(appName, runId),
                                      "Application %s with runId %s is already running.", appName, runId);
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.