Package org.apache.hadoop.hdfs.server.namenode.bookkeeper.zk

Examples of org.apache.hadoop.hdfs.server.namenode.bookkeeper.zk.ConnectionWatcher.await()


    ZooKeeper zooKeeper = new ZooKeeper(zkConnect, zkSessionTimeoutMs,
        connectionWatcher);
    // Use twice session timeout as the connection timeout
    int zkConnectTimeoutMs = zkSessionTimeoutMs * 2;

    if (!connectionWatcher.await(zkConnectTimeoutMs)) {
      throw new IOException("Timed out waiting to connect to " + zkConnect
          + " after " + (zkSessionTimeoutMs * 2) + " ms.");
    }
    prepareBookKeeperEnv(ledgersAvailablePath, zooKeeper);

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.