Class ZooKeeperMasterInterceptor<MASTER_RESULT extends ml.shifu.guagua.io.Bytable,​WORKER_RESULT extends ml.shifu.guagua.io.Bytable>

  • All Implemented Interfaces:
    ml.shifu.guagua.master.MasterInterceptor<MASTER_RESULT,​WORKER_RESULT>

    public class ZooKeeperMasterInterceptor<MASTER_RESULT extends ml.shifu.guagua.io.Bytable,​WORKER_RESULT extends ml.shifu.guagua.io.Bytable>
    extends ml.shifu.guagua.master.BasicMasterInterceptor<MASTER_RESULT,​WORKER_RESULT>
    To start zookeeper instance in cluster environment.

    Compare with start zookeeper instance in client process, ZooKeeperMasterInterceptor can be used in cluster and even to start zookeeper ensemble in cluster to void single point failure issue.

    • Constructor Detail

      • ZooKeeperMasterInterceptor

        public ZooKeeperMasterInterceptor()
    • Method Detail

      • preApplication

        public void preApplication​(ml.shifu.guagua.master.MasterContext<MASTER_RESULT,​WORKER_RESULT> context)
        Specified by:
        preApplication in interface ml.shifu.guagua.master.MasterInterceptor<MASTER_RESULT extends ml.shifu.guagua.io.Bytable,​WORKER_RESULT extends ml.shifu.guagua.io.Bytable>
        Overrides:
        preApplication in class ml.shifu.guagua.master.BasicMasterInterceptor<MASTER_RESULT extends ml.shifu.guagua.io.Bytable,​WORKER_RESULT extends ml.shifu.guagua.io.Bytable>
      • postApplication

        public void postApplication​(ml.shifu.guagua.master.MasterContext<MASTER_RESULT,​WORKER_RESULT> context)
        Specified by:
        postApplication in interface ml.shifu.guagua.master.MasterInterceptor<MASTER_RESULT extends ml.shifu.guagua.io.Bytable,​WORKER_RESULT extends ml.shifu.guagua.io.Bytable>
        Overrides:
        postApplication in class ml.shifu.guagua.master.BasicMasterInterceptor<MASTER_RESULT extends ml.shifu.guagua.io.Bytable,​WORKER_RESULT extends ml.shifu.guagua.io.Bytable>