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

项目: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();
}
项目:fuck_zookeeper    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:https-github.com-apache-zookeeper    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:ZooKeeper    文件:QuorumAuthUpgradeTest.java   
private void restartServer(Map<String, String> authConfigs, int index,
        ZooKeeper zk, CountdownWatcher watcher) throws IOException,
                KeeperException, InterruptedException, TimeoutException {
    LOG.info("Restarting server myid=" + index);
    MainThread m = shutdown(index);
    startServer(m, authConfigs);
    Assert.assertTrue("waiting for server" + index + "being up",
            ClientBase.waitForServerUp("127.0.0.1:" + m.getClientPort(),
                    ClientBase.CONNECTION_TIMEOUT));
    watcher.waitForConnected(ClientTest.CONNECTION_TIMEOUT);
    zk.create("/foo", new byte[0], Ids.OPEN_ACL_UNSAFE,
            CreateMode.PERSISTENT_SEQUENTIAL);
}
项目:ZooKeeper    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:StreamProcessingInfrastructure    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:bigstreams    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:zookeeper    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:SecureKeeper    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:SecureKeeper    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:StreamBench    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:LoadBalanced_zk    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:LoadBalanced_zk    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:zookeeper.dsc    文件:ZxidRolloverTest.java   
private void start(int idx) throws IOException {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
}
项目:zookeeper-pkg    文件:ZxidRolloverTest.java   
private void start(int idx) throws Exception {
    qu.start(idx);
    for (String hp : qu.getConnString().split(",")) {
        Assert.assertTrue("waiting for server up", ClientBase.waitForServerUp(hp,
                ClientTest.CONNECTION_TIMEOUT));
    }

    checkLeader();
    // all clients should be connected
    checkClientsConnected();
}
项目:fuck_zookeeper    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:https-github.com-apache-zookeeper    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:ZooKeeper    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:StreamProcessingInfrastructure    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:bigstreams    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:zookeeper    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:SecureKeeper    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:SecureKeeper    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:StreamBench    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:LoadBalanced_zk    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:LoadBalanced_zk    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:zookeeper.dsc    文件:ZxidRolloverTest.java   
private void waitForClients() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}
项目:zookeeper-pkg    文件:ZxidRolloverTest.java   
private void waitForClientsConnected() throws Exception {
    for (int i = 0; i < zkClients.length; i++) {
        zkClientWatchers[i].waitForConnected(ClientTest.CONNECTION_TIMEOUT);
        zkClientWatchers[i].reset();
    }
}