slightly code refactoring
add postmaster_general, which servers as the master node if there is no zookeeper