Package org.apache.zookeeper.server

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


        assertTrue(groupCondition.waitForMaster(5, TimeUnit.SECONDS));


        group.close();
        curator.close();
        cnxnFactory.shutdown();
        cnxnFactory.join();
    }

    //Tests that if close() is executed right after start(), there are no left over entries.
    //(see  https://github.com/jboss-fuse/fuse/issues/133)
View Full Code Here


            List<String> entries = curator.getChildren().forPath(groupNode);
            assertTrue(entries.isEmpty());
        }

        curator.close();
        cnxnFactory.shutdown();
        cnxnFactory.join();
    }

    private class GroupCondition implements GroupListener<NodeState> {
        private CountDownLatch connected = new CountDownLatch(1);
View Full Code Here

                LOGGER.debug("Starting ZooKeeper server on address %s", peerConfig.getClientPortAddress());
                cnxnFactory.startup(zkServer);
                LOGGER.debug("Started ZooKeeper server");
            } catch (Exception e) {
                LOGGER.warn(String.format("Failed to start ZooKeeper server, reason : %s", e));
                cnxnFactory.shutdown();
                throw e;
            }

            // Register stats provider
            this.simplerServer = new SimpleServer(zkServer, cnxnFactory);
View Full Code Here

            factory.configure(
                new InetSocketAddress(
                    "127.0.0.1", PortAssignment.unique()), 10);
            factory.start();
            Thread.sleep(100);
            factory.shutdown();
        }

        long endFdCount = osMbean.getOpenFileDescriptorCount();
        LOG.info("End fdcount is: " + endFdCount);
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.