Package org.apache.zookeeper.server.quorum.flexible

Examples of org.apache.zookeeper.server.quorum.flexible.QuorumMaj


    public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
            File dataLogDir, int electionType,
            long myid, int tickTime, int initLimit, int syncLimit,
            NIOServerCnxn.Factory cnxnFactory) throws IOException {
        this(quorumPeers, dataDir, dataLogDir, electionType, myid, tickTime,
            initLimit, syncLimit, cnxnFactory, new QuorumMaj(quorumPeers.size()));
    }
View Full Code Here


        this.tickTime = tickTime;
        this.initLimit = initLimit;
        this.syncLimit = syncLimit;       
        this.logFactory = new FileTxnSnapLog(dataLogDir, dataDir);
        if(quorumConfig == null)
            this.quorumConfig = new QuorumMaj(quorumPeers.size());
        else this.quorumConfig = quorumConfig;
    }
View Full Code Here

        throws IOException
    {
        this(quorumPeers, snapDir, logDir, electionAlg,
                myid,tickTime, initLimit,syncLimit,
                new NIOServerCnxn.Factory(clientPort),
                new QuorumMaj(quorumPeers.size()));
    }
View Full Code Here

              /*
               * The default QuorumVerifier is QuorumMaj
               */
             
                LOG.info("Defaulting to majority quorums");
                quorumVerifier = new QuorumMaj(servers.size());
            }
           
            File myIdFile = new File(dataDir, "myid");
            if (!myIdFile.exists()) {
                throw new IllegalArgumentException(myIdFile.toString()
View Full Code Here

        } else {
           /*
             * The default QuorumVerifier is QuorumMaj
             */       
            //LOG.info("Defaulting to majority quorums");
            return new QuorumMaj(dynamicConfigProp);           
        }         
    }
View Full Code Here

        throws IOException
        {
            super(quorumPeers, snapDir, logDir, electionAlg,
                    myid,tickTime, initLimit,syncLimit, false,
                    ServerCnxnFactory.createFactory(clientPort, -1),
                    new QuorumMaj(quorumPeers), null);
        }
View Full Code Here

                          
                       }
                   } catch (ConfigException e){
                       throw new KeeperException.BadArgumentsException("Reconfiguration failed");
                   }
                   request.qv = new QuorumMaj(nextServers);
                   request.qv.setVersion(request.getHdr().getZxid());
                }
                if (QuorumPeerConfig.isStandaloneEnabled() && request.qv.getVotingMembers().size() < 2) {
                   String msg = "Reconfig failed - new configuration must include at least 2 followers";
                   LOG.warn(msg);
View Full Code Here

                /*
                 * The default QuorumVerifier is QuorumMaj
                 */

                LOG.info("Defaulting to majority quorums");
                quorumVerifier = new QuorumMaj(servers.size());
            }

            // Now add observers to servers, once the quorums have been
            // figured out
            servers.putAll(observers);
View Full Code Here

            File dataLogDir, int electionType,
            long myid, int tickTime, int initLimit, int syncLimit,
            NIOServerCnxn.Factory cnxnFactory) throws IOException {
        this(quorumPeers, dataDir, dataLogDir, electionType, myid, tickTime,
            initLimit, syncLimit, cnxnFactory,
            new QuorumMaj(countParticipants(quorumPeers)));
    }
View Full Code Here

        this.initLimit = initLimit;
        this.syncLimit = syncLimit;       
        this.logFactory = new FileTxnSnapLog(dataLogDir, dataDir);
        this.zkDb = new ZKDatabase(this.logFactory);
        if(quorumConfig == null)
            this.quorumConfig = new QuorumMaj(countParticipants(quorumPeers));
        else this.quorumConfig = quorumConfig;
    }
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.server.quorum.flexible.QuorumMaj

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.