Examples of ZkSerializer


Examples of org.I0Itec.zkclient.serialize.ZkSerializer

  }

  public ZKDumper(String zkAddress)
  {
    client = new ZkClient(zkAddress, ZkClient.DEFAULT_CONNECTION_TIMEOUT);
    ZkSerializer zkSerializer = new ZkSerializer()
    {

      @Override
      public byte[] serialize(Object arg0) throws ZkMarshallingError
      {
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.ZkSerializer

  }

  public ZKDumper(String zkAddress) {
    client = new ZkClient(zkAddress, ZkClient.DEFAULT_CONNECTION_TIMEOUT);

    ZkSerializer zkSerializer = new ByteArraySerializer();
    client.setZkSerializer(zkSerializer);
    filter = new FilenameFilter() {

      @Override
      public boolean accept(File dir, String name) {
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.ZkSerializer

            @Named("s4.cluster.zk_session_timeout") int sessionTimeout,
            @Named("s4.cluster.zk_connection_timeout") int connectionTimeout) throws Exception {

        lock = new ReentrantLock();
        zkClient = new ZkClient(zookeeperAddress, sessionTimeout, connectionTimeout);
        ZkSerializer serializer = new ZNRecordSerializer();
        zkClient.setZkSerializer(serializer);
        zkClient.subscribeStateChanges(this);
        zkClient.waitUntilConnected(connectionTimeout, TimeUnit.MILLISECONDS);
        // bug in zkClient, it does not invoke handleNewSession the first time
        // it connects
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.ZkSerializer

            @Named("s4.cluster.zk_connection_timeout") int connectionTimeout) throws Exception {
        this.clusterName = clusterName;
        this.connectionTimeout = connectionTimeout;
        lock = new ReentrantLock();
        zkClient = new ZkClient(zookeeperAddress, sessionTimeout, connectionTimeout);
        ZkSerializer serializer = new ZNRecordSerializer();
        zkClient.setZkSerializer(serializer);
        zkClient.subscribeStateChanges(this);
        zkClient.waitUntilConnected(connectionTimeout, TimeUnit.MILLISECONDS);
        try {
            machineId = InetAddress.getLocalHost().getCanonicalHostName();
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.ZkSerializer

            logger.warn("Unable to get hostname", e);
            machineId = "UNKNOWN";
        }

        zkClient = new ZkClient(zookeeperAddress, sessionTimeout, connectionTimeout);
        ZkSerializer serializer = new ZNRecordSerializer();
        zkClient.setZkSerializer(serializer);
    }
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.ZkSerializer

        this.clusterName = clusterName;
        this.taskPath = "/s4/clusters/" + clusterName + "/tasks";
        this.processPath = "/s4/clusters/" + clusterName + "/process";
        lock = new ReentrantLock();
        zkClient = new ZkClient(zookeeperAddress, sessionTimeout, connectionTimeout);
        ZkSerializer serializer = new ZNRecordSerializer();
        zkClient.setZkSerializer(serializer);
        zkClient.subscribeStateChanges(this);
        if (!zkClient.waitUntilConnected(connectionTimeout, TimeUnit.MILLISECONDS)) {
            throw new Exception("cannot connect to zookeeper");
        }
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.ZkSerializer

  }

  public ZKDumper(String zkAddress)
  {
    client = new ZkClient(zkAddress, ZkClient.DEFAULT_CONNECTION_TIMEOUT);
    ZkSerializer zkSerializer = new ZkSerializer()
    {

      @Override
      public byte[] serialize(Object arg0) throws ZkMarshallingError
      {
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.ZkSerializer

  }

  public ZKDumper(String zkAddress)
  {
    client = new ZkClient(zkAddress, ZkClient.DEFAULT_CONNECTION_TIMEOUT);
    ZkSerializer zkSerializer = new ZkSerializer()
    {

      @Override
      public byte[] serialize(Object arg0) throws ZkMarshallingError
      {
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.ZkSerializer

        taskPath = "/" + clusterName + "/" + "tasks";
        processPath = "/" + clusterName + "/" + "process";
        lock = new ReentrantLock();
        clusterRef = new AtomicReference<Cluster>();
        zkClient = new ZkClient(zookeeperAddress, sessionTimeout, connectionTimeout);
        ZkSerializer serializer = new ZNRecordSerializer();
        zkClient.setZkSerializer(serializer);
        listeners = new ArrayList<TopologyChangeListener>();
        zkClient.subscribeStateChanges(this);
        zkClient.waitUntilConnected(connectionTimeout, TimeUnit.MILLISECONDS);
        try {
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.ZkSerializer

            logger.warn("Unable to get hostname", e);
            machineId = "UNKNOWN";
        }

        zkClient = new ZkClient(zookeeperAddress, sessionTimeout, connectionTimeout);
        ZkSerializer serializer = new ZNRecordSerializer();
        zkClient.setZkSerializer(serializer);
        zkClient.subscribeStateChanges(this);
        zkClient.waitUntilConnected(connectionTimeout, TimeUnit.MILLISECONDS);
        // bug in zkClient, it does not invoke handleNewSession the first time
        // it connects
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.