File dataFile = new File(logdir, "zookeeper_data").getAbsoluteFile();
File snapFile = new File(logdir, "zookeeper_snap").getAbsoluteFile();
server = new ZooKeeperServer(
new FileTxnSnapLog(dataFile, snapFile),
new BasicDataTreeBuilder());
connection = new NIOServerCnxnFactory();
connection.configure(new InetSocketAddress(port), maxconnections);
connection.startup(server);