Java 类org.apache.zookeeper.server.quorum.flexible.QuorumMaj 实例源码

项目:fuck_zookeeper    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        boolean quorumListenOnAllIPs,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    this.initLimit = initLimit;
    this.syncLimit = syncLimit;        
    this.quorumListenOnAllIPs = quorumListenOnAllIPs;
    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;
}
项目:ZooKeeper    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        boolean quorumListenOnAllIPs,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    this.initLimit = initLimit;
    this.syncLimit = syncLimit;        
    this.quorumListenOnAllIPs = quorumListenOnAllIPs;
    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;
}
项目:StreamProcessingInfrastructure    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        boolean quorumListenOnAllIPs,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    this.initLimit = initLimit;
    this.syncLimit = syncLimit;        
    this.quorumListenOnAllIPs = quorumListenOnAllIPs;
    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;
}
项目:StreamProcessingInfrastructure    文件:Zab1_0Test.java   
private QuorumPeer createQuorumPeer(File tmpDir) throws IOException,
        FileNotFoundException {
    QuorumPeer peer = new QuorumPeer();
    peer.syncLimit = SYNC_LIMIT;
    peer.initLimit = 2;
    peer.tickTime = 2000;
    peer.quorumPeers = new HashMap<Long, QuorumServer>();
    peer.quorumPeers.put(1L, new QuorumServer(0, "0.0.0.0", 33221, 0, null));
    peer.quorumPeers.put(1L, new QuorumServer(1, "0.0.0.0", 33223, 0, null));
    peer.setQuorumVerifier(new QuorumMaj(3));
    peer.setCnxnFactory(new NullServerCnxnFactory());
    File version2 = new File(tmpDir, "version-2");
    version2.mkdir();
    FileOutputStream fos;
    fos = new FileOutputStream(new File(version2, "currentEpoch"));
    fos.write("0\n".getBytes());
    fos.close();
    fos = new FileOutputStream(new File(version2, "acceptedEpoch"));
    fos.write("0\n".getBytes());
    fos.close();
    return peer;
}
项目:bigstreams    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    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;
}
项目:bigstreams    文件:Zab1_0Test.java   
private QuorumPeer createQuorumPeer(File tmpDir) throws IOException,
        FileNotFoundException {
    QuorumPeer peer = new QuorumPeer();
    peer.syncLimit = 2;
    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());
    return peer;
}
项目:bigstreams    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    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;
}
项目:zookeeper-src-learning    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    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;
}
项目:zookeeper    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        boolean quorumListenOnAllIPs,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    this.initLimit = initLimit;
    this.syncLimit = syncLimit;        
    this.quorumListenOnAllIPs = quorumListenOnAllIPs;
    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;
}
项目:zookeeper    文件:Zab1_0Test.java   
private QuorumPeer createQuorumPeer(File tmpDir) throws IOException,
        FileNotFoundException {
    QuorumPeer peer = new QuorumPeer();
    peer.syncLimit = SYNC_LIMIT;
    peer.initLimit = 2;
    peer.tickTime = 2000;
    peer.quorumPeers = new HashMap<Long, QuorumServer>();
    peer.quorumPeers.put(1L, new QuorumServer(0, "0.0.0.0", 33221, 0, null));
    peer.quorumPeers.put(1L, new QuorumServer(1, "0.0.0.0", 33223, 0, null));
    peer.setQuorumVerifier(new QuorumMaj(3));
    peer.setCnxnFactory(new NullServerCnxnFactory());
    File version2 = new File(tmpDir, "version-2");
    version2.mkdir();
    FileOutputStream fos;
    fos = new FileOutputStream(new File(version2, "currentEpoch"));
    fos.write("0\n".getBytes());
    fos.close();
    fos = new FileOutputStream(new File(version2, "acceptedEpoch"));
    fos.write("0\n".getBytes());
    fos.close();
    return peer;
}
项目:StreamBench    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        boolean quorumListenOnAllIPs,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    this.initLimit = initLimit;
    this.syncLimit = syncLimit;        
    this.quorumListenOnAllIPs = quorumListenOnAllIPs;
    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;
}
项目:StreamBench    文件:Zab1_0Test.java   
private QuorumPeer createQuorumPeer(File tmpDir) throws IOException,
        FileNotFoundException {
    QuorumPeer peer = new QuorumPeer();
    peer.syncLimit = SYNC_LIMIT;
    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();
    FileOutputStream fos;
    fos = new FileOutputStream(new File(version2, "currentEpoch"));
    fos.write("0\n".getBytes());
    fos.close();
    fos = new FileOutputStream(new File(version2, "acceptedEpoch"));
    fos.write("0\n".getBytes());
    fos.close();
    return peer;
}
项目:ACaZoo    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    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;
}
项目:curator    文件:EnsembleTracker.java   
private void processConfigData(byte[] data) throws Exception
{
    Properties properties = new Properties();
    properties.load(new ByteArrayInputStream(data));
    log.info("New config event received: {}", properties);

    if (!properties.isEmpty())
    {
        QuorumMaj newConfig = new QuorumMaj(properties);
        String connectionString = configToConnectionString(newConfig);
        if (connectionString.trim().length() > 0)
        {
            currentConfig.set(newConfig);
            ensembleProvider.setConnectionString(connectionString);
        }
        else
        {
            log.error("Invalid config event received: {}", properties);
        }
    }
    else
    {
        log.debug("Ignoring new config as it is empty");
    }
}
项目:LoadBalanced_zk    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    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;
}
项目:LoadBalanced_zk    文件:Zab1_0Test.java   
private QuorumPeer createQuorumPeer(File tmpDir) throws IOException,
        FileNotFoundException {
    QuorumPeer peer = new QuorumPeer();
    peer.syncLimit = 2;
    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());
    return peer;
}
项目:LoadBalanced_zk    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    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;
}
项目:LoadBalanced_zk    文件:Zab1_0Test.java   
private QuorumPeer createQuorumPeer(File tmpDir) throws IOException,
        FileNotFoundException {
    QuorumPeer peer = new QuorumPeer();
    peer.syncLimit = 2;
    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());
    return peer;
}
项目:zookeeper.dsc    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        NIOServerCnxn.Factory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    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;
}
项目:zookeeper-pkg    文件:QuorumPeer.java   
public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory, 
        QuorumVerifier quorumConfig) throws IOException {
    this();
    this.cnxnFactory = cnxnFactory;
    this.quorumPeers = quorumPeers;
    this.electionType = electionType;
    this.myid = myid;
    this.tickTime = tickTime;
    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;
}
项目:zookeeper-pkg    文件:Zab1_0Test.java   
private QuorumPeer createQuorumPeer(File tmpDir) throws IOException,
        FileNotFoundException {
    QuorumPeer peer = new QuorumPeer();
    peer.syncLimit = 2;
    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());
    return peer;
}
项目:fuck_zookeeper    文件:QuorumPeer.java   
/**
 * For backward compatibility purposes, we instantiate QuorumMaj by default.
 */

public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory) throws IOException {
    this(quorumPeers, dataDir, dataLogDir, electionType, myid, tickTime, 
            initLimit, syncLimit, false, cnxnFactory, 
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:fuck_zookeeper    文件:QuorumPeer.java   
/**
 * This constructor is only used by the existing unit test code.
 * It defaults to FileLogProvider persistence provider.
 */
public QuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
        File logDir, int clientPort, int electionAlg,
        long myid, int tickTime, int initLimit, int syncLimit)
    throws IOException
{
    this(quorumPeers, snapDir, logDir, electionAlg,
            myid,tickTime, initLimit,syncLimit, false,
            ServerCnxnFactory.createFactory(new InetSocketAddress(clientPort), -1),
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:fuck_zookeeper    文件:LENonTerminateTest.java   
public MockQuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
        File logDir, int clientPort, int electionAlg,
        long myid, int tickTime, int initLimit, int syncLimit)
throws IOException
{
    super(quorumPeers, snapDir, logDir, electionAlg,
            myid,tickTime, initLimit,syncLimit, false,
            ServerCnxnFactory.createFactory(clientPort, -1),
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:https-github.com-apache-zookeeper    文件:QuorumPeer.java   
/**
 * For backward compatibility purposes, we instantiate QuorumMaj by default.
 */

public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory) throws IOException {
    this(quorumPeers, dataDir, dataLogDir, electionType, myid, tickTime,
            initLimit, syncLimit, false, cnxnFactory,
            new QuorumMaj(quorumPeers));
}
项目:https-github.com-apache-zookeeper    文件:QuorumPeer.java   
/**

     * This constructor is only used by the existing unit test code.
     * It defaults to FileLogProvider persistence provider.
     */
    public QuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
            File logDir, int clientPort, int electionAlg,
            long myid, int tickTime, int initLimit, int syncLimit)
        throws IOException
    {
        this(quorumPeers, snapDir, logDir, electionAlg, myid, tickTime, initLimit, syncLimit, false,
                ServerCnxnFactory.createFactory(getClientAddress(quorumPeers, myid, clientPort), -1),
                new QuorumMaj(quorumPeers));
    }
项目:https-github.com-apache-zookeeper    文件:QuorumPeerConfig.java   
private static QuorumVerifier createQuorumVerifier(Properties dynamicConfigProp, boolean isHierarchical) throws ConfigException{
   if(isHierarchical){
        return new QuorumHierarchical(dynamicConfigProp);
    } else {
       /*
         * The default QuorumVerifier is QuorumMaj
         */        
        //LOG.info("Defaulting to majority quorums");
        return new QuorumMaj(dynamicConfigProp);            
    }          
}
项目:ZooKeeper    文件:QuorumPeer.java   
/**
 * For backward compatibility purposes, we instantiate QuorumMaj by default.
 */

public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory) throws IOException {
    this(quorumPeers, dataDir, dataLogDir, electionType, myid, tickTime, 
            initLimit, syncLimit, false, cnxnFactory, 
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:ZooKeeper    文件:QuorumPeer.java   
/**
 * This constructor is only used by the existing unit test code.
 * It defaults to FileLogProvider persistence provider.
 */
public QuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
        File logDir, int clientPort, int electionAlg,
        long myid, int tickTime, int initLimit, int syncLimit)
    throws IOException
{
    this(quorumPeers, snapDir, logDir, electionAlg,
            myid,tickTime, initLimit,syncLimit, false,
            ServerCnxnFactory.createFactory(new InetSocketAddress(clientPort), -1),
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:ZooKeeper    文件:LENonTerminateTest.java   
public MockQuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
        File logDir, int clientPort, int electionAlg,
        long myid, int tickTime, int initLimit, int syncLimit)
throws IOException
{
    super(quorumPeers, snapDir, logDir, electionAlg,
            myid,tickTime, initLimit,syncLimit, false,
            ServerCnxnFactory.createFactory(clientPort, -1),
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:StreamProcessingInfrastructure    文件:QuorumPeer.java   
/**
 * For backward compatibility purposes, we instantiate QuorumMaj by default.
 */

public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory) throws IOException {
    this(quorumPeers, dataDir, dataLogDir, electionType, myid, tickTime, 
            initLimit, syncLimit, false, cnxnFactory, 
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:StreamProcessingInfrastructure    文件:QuorumPeer.java   
/**
 * This constructor is only used by the existing unit test code.
 * It defaults to FileLogProvider persistence provider.
 */
public QuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
        File logDir, int clientPort, int electionAlg,
        long myid, int tickTime, int initLimit, int syncLimit)
    throws IOException
{
    this(quorumPeers, snapDir, logDir, electionAlg,
            myid,tickTime, initLimit,syncLimit, false,
            ServerCnxnFactory.createFactory(new InetSocketAddress(clientPort), -1),
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:StreamProcessingInfrastructure    文件:LENonTerminateTest.java   
public MockQuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
        File logDir, int clientPort, int electionAlg,
        long myid, int tickTime, int initLimit, int syncLimit)
throws IOException
{
    super(quorumPeers, snapDir, logDir, electionAlg,
            myid,tickTime, initLimit,syncLimit, false,
            ServerCnxnFactory.createFactory(clientPort, -1),
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:bigstreams    文件:QuorumPeer.java   
/**
 * For backward compatibility purposes, we instantiate QuorumMaj by default.
 */

public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory) throws IOException {
    this(quorumPeers, dataDir, dataLogDir, electionType, myid, tickTime, 
            initLimit, syncLimit, cnxnFactory, 
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:bigstreams    文件:QuorumPeer.java   
/**
 * This constructor is only used by the existing unit test code.
 * It defaults to FileLogProvider persistence provider.
 */
public QuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
        File logDir, int clientPort, int electionAlg,
        long myid, int tickTime, int initLimit, int syncLimit)
    throws IOException
{
    this(quorumPeers, snapDir, logDir, electionAlg,
            myid,tickTime, initLimit,syncLimit,
            ServerCnxnFactory.createFactory(new InetSocketAddress(clientPort), -1),
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:bigstreams    文件:LENonTerminateTest.java   
public MockQuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
        File logDir, int clientPort, int electionAlg,
        long myid, int tickTime, int initLimit, int syncLimit)
throws IOException
{
    super(quorumPeers, snapDir, logDir, electionAlg,
            myid,tickTime, initLimit,syncLimit,
            ServerCnxnFactory.createFactory(clientPort, -1),
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:bigstreams    文件:QuorumPeer.java   
/**
 * For backward compatibility purposes, we instantiate QuorumMaj by default.
 */

public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory) throws IOException {
    this(quorumPeers, dataDir, dataLogDir, electionType, myid, tickTime, 
            initLimit, syncLimit, cnxnFactory, 
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:bigstreams    文件:QuorumPeer.java   
/**
 * This constructor is only used by the existing unit test code.
 * It defaults to FileLogProvider persistence provider.
 */
public QuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
        File logDir, int clientPort, int electionAlg,
        long myid, int tickTime, int initLimit, int syncLimit)
    throws IOException
{
    this(quorumPeers, snapDir, logDir, electionAlg,
            myid,tickTime, initLimit,syncLimit,
            ServerCnxnFactory.createFactory(new InetSocketAddress(clientPort), -1),
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:bigstreams    文件:LENonTerminateTest.java   
public MockQuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
        File logDir, int clientPort, int electionAlg,
        long myid, int tickTime, int initLimit, int syncLimit)
throws IOException
{
    super(quorumPeers, snapDir, logDir, electionAlg,
            myid,tickTime, initLimit,syncLimit,
            ServerCnxnFactory.createFactory(clientPort, -1),
            new QuorumMaj(countParticipants(quorumPeers)));
}
项目:zookeeper-src-learning    文件:QuorumPeer.java   
/**
 * For backward compatibility purposes, we instantiate QuorumMaj by default.
 */

public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
        File dataLogDir, int electionType,
        long myid, int tickTime, int initLimit, int syncLimit,
        ServerCnxnFactory cnxnFactory) throws IOException {
    this(quorumPeers, dataDir, dataLogDir, electionType, myid, tickTime, 
            initLimit, syncLimit, cnxnFactory, 
            new QuorumMaj(countParticipants(quorumPeers)));
}