Package org.apache.zookeeper.server.NIOServerCnxn

Examples of org.apache.zookeeper.server.NIOServerCnxn.Factory.startup()


      ZooDiscoveryContainer.zooKeeperServer = new ZooKeeperServer();
      FileTxnSnapLog fileTxnSnapLog = new FileTxnSnapLog(conf.getZookeeperDataFile(), conf.getZookeeperDataFile());
      ZooDiscoveryContainer.zooKeeperServer.setTxnLogFactory(fileTxnSnapLog);
      ZooDiscoveryContainer.zooKeeperServer.setTickTime(conf.getTickTime());
      Factory cnxnFactory = new NIOServerCnxn.Factory(new InetSocketAddress(conf.getClientPort()));
      cnxnFactory.startup(ZooDiscoveryContainer.zooKeeperServer);
    } catch (Exception e) {
      Logger.log(LogService.LOG_ERROR,
          "Zookeeper server cannot be started! Possibly another instance is already running on the same port. ", e);
    }
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.