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

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


        this.syncLimit = syncLimit;
        this.quorumListenOnAllIPs = quorumListenOnAllIPs;
        this.logFactory = new FileTxnSnapLog(dataLogDir, dataDir);
        this.zkDb = new ZKDatabase(this.logFactory);
        this.dynamicConfigFilename = (memFilename != null) ? memFilename : "zoo_replicated" + myid + ".dynamic";
        if(quorumConfig == null) quorumConfig = new QuorumMaj(quorumPeers);
        setQuorumVerifier(quorumConfig, false);
        adminServer = AdminServerFactory.createAdminServer();
    }
View Full Code Here


        throws IOException
    {
        this(quorumPeers, snapDir, logDir, electionAlg,
                myid,tickTime, initLimit,syncLimit, false,
                ServerCnxnFactory.createFactory(new InetSocketAddress(clientPort), -1),
                new QuorumMaj(quorumPeers), null);
    }
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

    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

        peer.initLimit = 2;
        peer.tickTime = 2000;
        peer.quorumPeers = new HashMap<Long, QuorumServer>();
        peer.quorumPeers.put(1L, new QuorumServer(0, new InetSocketAddress(33221)));
        peer.quorumPeers.put(1L, new QuorumServer(1, new InetSocketAddress(33223)));
        peer.setQuorumVerifier(new QuorumMaj(3));
        peer.setCnxnFactory(new NullServerCnxnFactory());
        File version2 = new File(tmpDir, "version-2");
        version2.mkdir();
        new FileOutputStream(new File(version2, "currentEpoch")).write("0\n".getBytes());
        new FileOutputStream(new File(version2, "acceptedEpoch")).write("0\n".getBytes());
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

    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

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.