Package org.apache.zookeeper.server

Examples of org.apache.zookeeper.server.ServerCnxnFactory.shutdown()


                        CreateMode.PERSISTENT);
            }
        } finally {
            zk.close();
        }
        f.shutdown();
        Assert.assertTrue("waiting for server to shutdown",
                ClientBase.waitForServerDown(HOSTPORT, CONNECTION_TIMEOUT));
        // now corrupt the snapshot
        PurgeTxnLog.purge(tmpDir, tmpDir, 3);
        FileTxnSnapLog snaplog = new FileTxnSnapLog(tmpDir, tmpDir);
View Full Code Here


            startSignal.await(CONNECTION_TIMEOUT,
                    TimeUnit.MILLISECONDS);
            Assert.assertTrue("count == 0", startSignal.getCount() == 0);
            zk.close();
        } finally {
            f.shutdown();
            zks.shutdown();

            Assert.assertTrue("waiting for server down",
                       ClientBase.waitForServerDown(HOSTPORT,
                                                    CONNECTION_TIMEOUT));
View Full Code Here

        }

        zk.close();

        // bring down the server
        f.shutdown();
        Assert.assertTrue("waiting for server down",
                   ClientBase.waitForServerDown(HOSTPORT,
                           ClientBase.CONNECTION_TIMEOUT));

    }
View Full Code Here

        factory.startup(zks);
        System.out.println("Comment: starting factory");
        Assert.assertTrue("waiting for server up",
                   ClientBase.waitForServerUp("127.0.0.1:" + PORT,
                           QuorumTest.CONNECTION_TIMEOUT));
        factory.shutdown();
        zks.shutdown();
        Assert.assertTrue("waiting for server down",
                   ClientBase.waitForServerDown("127.0.0.1:" + PORT,
                                                QuorumTest.CONNECTION_TIMEOUT));
        System.out.println("Comment: shutting down standalone");
View Full Code Here

            // expected
        }
        zk.close();

        zks.shutdown();
        f.shutdown();
        Assert.assertTrue("waiting for server being down ", ClientBase
                .waitForServerDown(HOSTPORT, CONNECTION_TIMEOUT));
    }
}
View Full Code Here

            Assert.assertTrue(zk.exists("/9/9/8", false) != null);
        } finally {
            zk.close();
        }
        f.shutdown();
        zks.shutdown();
        Assert.assertTrue("waiting for server down",
                   ClientBase.waitForServerDown(HOSTPORT,
                           ClientBase.CONNECTION_TIMEOUT));
View Full Code Here

                zk.setACL("/", Ids.CREATOR_ALL_ACL, -1);
            } finally {
                zk.close();
            }
        } finally {
            f.shutdown();
            zks.shutdown();
            Assert.assertTrue("waiting for server down",
                    ClientBase.waitForServerDown(HOSTPORT,
                            ClientBase.CONNECTION_TIMEOUT));
        }
View Full Code Here

                zk.create(path, path.getBytes(), list, CreateMode.PERSISTENT);
            }
            Assert.assertTrue("size of the acl map ", (101 == zks.getZKDatabase().getAclSize()));
        } finally {
            // now shutdown the server and restart it
            f.shutdown();
            zks.shutdown();
            Assert.assertTrue("waiting for server down",
                    ClientBase.waitForServerDown(HOSTPORT, CONNECTION_TIMEOUT));
        }
        startSignal = new CountDownLatch(1);
View Full Code Here

            }
            Assert.assertTrue("acl map ", (106 == zks.getZKDatabase().getAclSize()));
   
            zk.close();
        } finally {
            f.shutdown();
            zks.shutdown();
            Assert.assertTrue("waiting for server down",
                       ClientBase.waitForServerDown(HOSTPORT,
                               ClientBase.CONNECTION_TIMEOUT));
        }
View Full Code Here

        } finally {
            zk.close();
        }

        // shutdown and start zookeeper again
        f.shutdown();
        zks.shutdown();
        Assert.assertTrue("waiting for server to shutdown",
                ClientBase.waitForServerDown(HOSTPORT, CONNECTION_TIMEOUT));
        zks = new ZooKeeperServer(tmpDir, tmpDir, 3000);
        zks.startdata();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.