Package org.apache.zookeeper.server

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


            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
            }
            _nioFactory = null;
        }
        zk.shutdown();
        if (zk.getZKDatabase() != null) {
            try {
                // release file description
                zk.getZKDatabase().close();
            } catch (IOException e) {
View Full Code Here


        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

        } catch (KeeperException.UnimplementedException ex) {
            // 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

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

            }
            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

            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

        long sizeLimit = db.calculateTxnLogSizeLimit();

        itr = db.getProposalsFromTxnLog(zxids[MSG_COUNT / 2], sizeLimit);
        Assert.assertFalse("Expect empty proposal", (itr.hasNext()));
        f.shutdown();
        zks.shutdown();
    }

    public void process(WatchedEvent event) {
        // do nothing
    }
View Full Code Here

            Assert.assertTrue("excepting next transaction. expected=" + expectedZxid + ", retreived=" + hdr.getZxid(), (hdr.getZxid() == expectedZxid));
            lastZxid = hdr.getZxid();
        }while(itr.next());

        Assert.assertTrue("processed all transactions. " + expectedZxid + " == " + TOTAL_TRANSACTIONS, (expectedZxid == TOTAL_TRANSACTIONS));
        zks.shutdown();
    }

    /**
     * test that we fail to load txnlog of a request zxid that is older
     * than what exist on disk
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.