I am new to zookeeper. I have written simple program to create Persistent Node. Its working but giving exception once execution is completed.I tried to search on google but there is no satisfactory answer. Can any one advice me anything.
public class ZkProg {
public static void main(String[] args) throws IOException, KeeperException, InterruptedException
{
ZooKeeper zk=new ZooKeeper("localhost",1281, null);
zk.create("/zookeeper/Names",new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
//zk.delete("/zookeeper/Names",-1);
zk.close();
}
}