Java 类org.apache.zookeeper.test.QuorumUtil 实例源码

项目:fuck_zookeeper    文件:ZxidRolloverTest.java   
@Override
protected void setUp() throws Exception {
    LOG.info("STARTING " + getName());

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:https-github.com-apache-zookeeper    文件:ZxidRolloverTest.java   
@Before
public void setUp() throws Exception {
    System.setProperty("zookeeper.admin.enableServer", "false");

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:ZooKeeper    文件:ZxidRolloverTest.java   
@Override
protected void setUp() throws Exception {
    LOG.info("STARTING " + getName());

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:StreamProcessingInfrastructure    文件:ZxidRolloverTest.java   
@Override
protected void setUp() throws Exception {
    LOG.info("STARTING " + getName());

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:bigstreams    文件:ZxidRolloverTest.java   
@Override
protected void setUp() throws Exception {
    LOG.info("STARTING " + getName());

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:zookeeper    文件:ZxidRolloverTest.java   
@Override
protected void setUp() throws Exception {
    LOG.info("STARTING " + getName());

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:SecureKeeper    文件:ZxidRolloverTest.java   
@Before
public void setUp() throws Exception {
    System.setProperty("zookeeper.admin.enableServer", "false");

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:SecureKeeper    文件:ZxidRolloverTest.java   
@Before
public void setUp() throws Exception {
    System.setProperty("zookeeper.admin.enableServer", "false");

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:StreamBench    文件:ZxidRolloverTest.java   
@Override
protected void setUp() throws Exception {
    LOG.info("STARTING " + getName());

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:LoadBalanced_zk    文件:ZxidRolloverTest.java   
@Override
protected void setUp() throws Exception {
    LOG.info("STARTING " + getName());

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:LoadBalanced_zk    文件:ZxidRolloverTest.java   
@Override
protected void setUp() throws Exception {
    LOG.info("STARTING " + getName());

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}
项目:zookeeper.dsc    文件:ZxidRolloverTest.java   
@Override
protected void setUp() throws Exception {
    LOG.info("STARTING " + getName());

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        int followerPort = qu.getPeer(i+1).peer.getClientPort();
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + followerPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClients();
}
项目:zookeeper-pkg    文件:ZxidRolloverTest.java   
@Override
protected void setUp() throws Exception {
    LOG.info("STARTING " + getName());

    // set the snap count to something low so that we force log rollover
    // and verify that is working as part of the epoch rollover.
    SyncRequestProcessor.setSnapCount(7);

    qu = new QuorumUtil(1);
    startAll();

    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i] = new CountdownWatcher();
        PeerStruct peer = qu.getPeer(i + 1);
        zkClients[i] = new ZooKeeper(
                "127.0.0.1:" + peer.clientPort,
                ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]);
    }
    waitForClientsConnected();
}