public synchronized void close() throws InterruptedException {
    if (zk != null) {
      zk.close();
    }
  }
Run multiple operations in a transactional manner. Retry before throwing exception
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java