This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Cookie to LocalBookie (apache#4052)
### Motivation I tried to use command `bin/bookkeeper shell listbookies -a` to get all bookies from localbookie, it raised error ``` ERROR Fail to process command 'list' org.apache.bookkeeper.client.BKException$ZKException: Error while using ZooKeeper at org.apache.bookkeeper.discover.ZKRegistrationClient.lambda$getChildren$4(ZKRegistrationClient.java:352) ~[bookkeeper-server-4.17.0-SNAPSHOT.jar:4.17.0-SNAPSHOT] at org.apache.bookkeeper.zookeeper.ZooKeeperClient$25$1.processResult(ZooKeeperClient.java:1177) ~[bookkeeper-server-4.17.0-SNAPSHOT.jar:4.17.0-SNAPSHOT] at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:668) ~[zookeeper-3.8.1.jar:3.8.1] at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:553) ~[zookeeper-3.8.1.jar:3.8.1] Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /ledgers/cookies at org.apache.zookeeper.KeeperException.create(KeeperException.java:118) ~[zookeeper-3.8.1.jar:3.8.1] at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) ~[zookeeper-3.8.1.jar:3.8.1] at org.apache.bookkeeper.discover.ZKRegistrationClient.lambda$getChildren$4(ZKRegistrationClient.java:351) ~[bookkeeper-server-4.17.0-SNAPSHOT.jar:4.17.0-SNAPSHOT] ... 3 more ``` The reason is that no /ledgers/cookies are created in ZK when starting the local bk server. After applying this change, the command works.
- Loading branch information