Package org.apache.zookeeper.server.quorum

Examples of org.apache.zookeeper.server.quorum.Vote


        }

        public void run(){
            try{
                Vote v = null;
                peer.setPeerState(ServerState.LOOKING);
                LOG.info("Going to call leader election: " + i);
                v = peer.getElectionAlg().lookForLeader();

                if (v == null){
                    Assert.fail("Thread " + i + " got a null vote");
                }

                /*
                 * A real zookeeper would take care of setting the current vote. Here
                 * we do it manually.
                 */
                peer.setCurrentVote(v);

                LOG.info("Finished election: " + i + ", " + v.getId());
            } catch (Exception e) {
                e.printStackTrace();
            }
            LOG.info("Joining");
        }
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.server.quorum.Vote

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.