Examples of ZKClient


Examples of com.linkedin.helix.manager.zk.ZkClient

    if (_gZkClient.exists(propertyStoreRoot))
    {
      _gZkClient.deleteRecursive(propertyStoreRoot);
    }

    ZkClient zkclient = new ZkClient(ZK_ADDR);
    zkclient.setZkSerializer(new ByteArraySerializer());
    ZKPropertyStore<ZNRecord> store =
        new ZKPropertyStore<ZNRecord>(zkclient,
                                      new PropertyJsonSerializer<ZNRecord>(ZNRecord.class),
                                      propertyStoreRoot);
View Full Code Here

Examples of org.I0Itec.zkclient.ZkClient

  public static void createTopic(String topicName) {
    int numPartitions = 5;
    int sessionTimeoutMs = 10000;
    int connectionTimeoutMs = 10000;
    ZkClient zkClient = new ZkClient(testUtil.getZkUrl(),
      sessionTimeoutMs, connectionTimeoutMs,
      ZKStringSerializer$.MODULE$);

    int replicationFactor = 1;
    Properties topicConfig = new Properties();
View Full Code Here

Examples of org.I0Itec.zkclient.ZkClient

  }

  public static void deleteTopic(String topicName) {
    int sessionTimeoutMs = 10000;
    int connectionTimeoutMs = 10000;
    ZkClient zkClient = new ZkClient(testUtil.getZkUrl(),
      sessionTimeoutMs, connectionTimeoutMs,
      ZKStringSerializer$.MODULE$);
    AdminUtils.deleteTopic(zkClient, topicName);
  }
View Full Code Here

Examples of org.I0Itec.zkclient.ZkClient

  public void createTopic(String topicName) {
    // Create a ZooKeeper client
    int sessionTimeoutMs = 10000;
    int connectionTimeoutMs = 10000;
    ZkClient zkClient = new ZkClient(zookeeper.getConnectString(),
            sessionTimeoutMs, connectionTimeoutMs,
            ZKStringSerializer$.MODULE$);

    int numPartitions = 1;
    int replicationFactor = 1;
View Full Code Here

Examples of org.apache.activemq.leveldb.replicated.groups.ZKClient

    protected ZooKeeperPartitionBrokerPlugin plugin() {
        return (ZooKeeperPartitionBrokerPlugin)plugin;
    }

    protected void zkConnect() throws Exception {
        zk_client = new ZKClient(plugin().getZkAddress(), Timespan.parse(plugin().getZkSessionTmeout()), null);
        if( plugin().getZkPassword()!=null ) {
            zk_client.setPassword(plugin().getZkPassword());
        }
        zk_client.start();
        zk_client.waitForConnected(Timespan.parse("30s"));
View Full Code Here

Examples of org.apache.hadoop.yarn.lib.ZKClient

  public void testzkClient() throws Exception {
    test("/some/test");
  }

  private void test(String testClient) throws Exception {
    ZKClient client = new ZKClient(hostPort);
    client.registerService("/nodemanager", "hostPort");
    client.unregisterService("/nodemanager");
  }
View Full Code Here

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

                100);

        public DatabusClusterUtilHelper(String zkAddr, String clusterName)
        {
            _clusterName = clusterName;
            _zkClient = new ZkClient(zkAddr, ZkClient.DEFAULT_SESSION_TIMEOUT,
                    ZkClient.DEFAULT_CONNECTION_TIMEOUT,
                    new ZNRecordSerializer());
            _admin = new ZKHelixAdmin(_zkClient);
        }
View Full Code Here

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

    return presentation;
  }

  StringRepresentation getInstanceCurrentStatesRepresentation(String clusterName, String instanceName) throws JsonGenerationException, JsonMappingException, IOException
  {
    ZkClient zkClient = (ZkClient)getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);;
    String instanceSessionId = ClusterRepresentationUtil.getInstanceSessionId(zkClient, clusterName, instanceName);
   
    String message = ClusterRepresentationUtil.getInstancePropertyNameListAsString(zkClient, clusterName, instanceName, PropertyType.CURRENTSTATES, instanceSessionId, MediaType.APPLICATION_JSON);

    StringRepresentation representation = new StringRepresentation(message, MediaType.APPLICATION_JSON);
View Full Code Here

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

                                                     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,
                                                             keyBuilder.externalView(resourceName),
View Full Code Here

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

                                                             CountDownLatch countDown)
  {

    final Map<TestCommand, Boolean> testResults =
        new ConcurrentHashMap<TestCommand, Boolean>();
    ZkClient zkClient = null;

    zkClient = new ZkClient(zkAddr, ZkClient.DEFAULT_CONNECTION_TIMEOUT);
    zkClient.setZkSerializer(new ZNRecordSerializer());

    // sort on trigger's start time, stable sort
    Collections.sort(commandList, new Comparator<TestCommand>()
    {
      @Override
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.