- ·上一篇文章:Zookeeper CLI
- ·下一篇文章:Zookeeper 应用程序
Zookeeper API
ublic static void main(String[] args) throws InterruptedException,KeeperException { String path = "/MyFirstZnode"; //Assign path to the znode try { conn = new ZooKeeperConnection(); zk = conn.connect("localhost"); delete(path); //delete the node with the specified path } catch(Exception e) { System.out.println(e.getMessage()); // catches error messages } }}
Zookeeper API