SollmoStudio/beyond — pull request #56 by sgkim126 (2014-06-05 03:55:00+00:00)
Title: Make ZooKeeperLauncher fork ZooKeeperServer.

Current implementation of curator doesn't consider ZooKeeperServer is
shutdown before curator connection is closed. In this case curator
retries to connect to server for every operation.
This causes a timing issue in test, because ZooKeeper Server restarts
whenever Beyond Server restarts.

We had considered to ensure order between closing curator and
shutdown server, but we concluded it is hard to ensure order in the
clustered environment. So we made a decision to seperate life cycle of
sub process from BeyondServer.

This patch makes ZooKeeperLauncher fork ZooKeeper server.

ZooKeeperServerMainWithPIDFile is main class to execute ZooKeeper
Server. It writes a PID to configured path and execute ZooKeeper server.
The next patch will makes ZooKeeperLauncher kill the process if it is
not responding.