Hi, we recently got into ZOOKEEPER-3803 FileTxnSnapLog.fastForwardFromEdits() throws NPE if TestingServer is started from another thread (see [1]) and I have similar cases in other non OS products that run ZooKeeper from Java.
The case of ZOOKEEPER-3803 is for Curator TestingServer, and here we are talking about running a ZK server for testing purposes. But I have other usecases in which the ZK server must be launched, for production usage, from a Java based bootstrap launcher. We are now officially supporting our binary package distribution that runs ZooKeeper from a bash script and the bash script is coupled with ZooKeeperMain and QuorumPeerMain. In my opinion we should provide a well known and supported API, better than using directly those two classes, to run ZooKeeper safely in production, but launched from Java. I am not here supporting or suggesting the idea of running ZooKeeper inside the same process of a client application, but only to provide a clear and stable API to start/stop and do minimal health checks to a ZooKeeper peer. I will be happy to work on it Thoughts ? Enrico [1] https://issues.apache.org/jira/browse/ZOOKEEPER-3803