Package org.apache.zookeeper.server.quorum

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



      @Test
      public void testLENewEpoch() throws Exception {

          FastLeaderElection le[] = new FastLeaderElection[count];

          LOG.info("TestLE: " + getName()+ ", " + count);
          for(int i = 0; i < count; i++) {
              peers.put(Long.valueOf(i), new QuorumServer(i, new InetSocketAddress(baseport+100+i),
                      new InetSocketAddress(baseLEport+100+i)));
View Full Code Here


    }
   
    @Test
    public void testLE() throws Exception {
      
        FastLeaderElection le[] = new FastLeaderElection[count];
        leaderDies = true;
        boolean allowOneBadLeader = leaderDies;
      
        LOG.info("TestLE: " + getName()+ ", " + count);
        for(int i = 0; i < count; i++) {
View Full Code Here

            LOG.info("Joining");
        }
    }
    @Test
    public void testLostMessage() throws Exception {
        FastLeaderElection le[] = new FastLeaderElection[count];
       
        LOG.info("TestLE: " + getName()+ ", " + count);
        for(int i = 0; i < count; i++) {
            peers.put(Long.valueOf(i),
                    new QuorumServer(i,
View Full Code Here

   
   
    @Test
    public void testLERestart() throws Exception {

        FastLeaderElection le[] = new FastLeaderElection[count];
        leaderDies = true;
        boolean allowOneBadLeader = leaderDies;

        LOG.info("TestLE: " + getName()+ ", " + count);
        for(int i = 0; i < count; i++) {
View Full Code Here


      @Test
      public void testLENewEpoch() throws Exception {

          FastLeaderElection le[] = new FastLeaderElection[count];

          LOG.info("TestLE: " + getName()+ ", " + count);
          for(int i = 0; i < count; i++) {
              peers.put(Long.valueOf(i), new QuorumServer(i, new InetSocketAddress(baseport+100+i),
                      new InetSocketAddress(baseLEport+100+i)));
View Full Code Here

        }
    }

    @Test
    public void testZeroWeightQuorum() throws Exception {
        FastLeaderElection le[] = new FastLeaderElection[count];

        LOG.info("TestZeroWeightQuorum: " + getName()+ ", " + count);
        for(int i = 0; i < count; i++) {
            peers.put(Long.valueOf(i),
                    new QuorumServer(i,
View Full Code Here

    }

    @Test
    public void testLE() throws Exception {

        FastLeaderElection le[] = new FastLeaderElection[count];
        leaderDies = true;
        boolean allowOneBadLeader = leaderDies;

        LOG.info("TestLE: " + getName()+ ", " + count);
        for(int i = 0; i < count; i++) {
View Full Code Here

                     */
                    if (v.getId() == i) {
                        LOG.info("I'm the leader: " + i);
                        if (lc < this.totalRounds) {
                            LOG.info("Leader " + i + " dying");
                            FastLeaderElection election =
                                (FastLeaderElection) peer.getElectionAlg();
                            election.shutdown();
                            // Make sure the vote is reset to -1 after shutdown.
                            Assert.assertEquals(-1, election.getVote().getId());
                            LOG.info("Leader " + i + " dead");
                           
                            break;
                        }
                    }
View Full Code Here

TOP

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

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.