amplab/tachyon — pull request #139 by GraceH (2014-03-05 14:10:57+00:00)
Title: Fix master cleanup for zookeeper mode

The value of "mIsStarted" only controls the leader master's major services' status (e.g., webservice, masterInfo, and etc.). For those standby nodes, two threads are always starting no matter "mIsStarted" is true or false. One is the leaderSelectorClient and the other is EditLogProcessor.
Currently, the leaderSelectorClient is cleaned up only when mIsStarted == true. And EditLogProcessor won't be cleaned up. This works for leader node. However for those standby nodes, it will leave some residual threads after the master is closed.

This issue won't affect the real-world deployment, and it only blocks other test cases which are running after the MasterFaultTolerantTest. This PR aims to close those 2 threads in zookeeper mode.