MCPcopy Create free account
hub / github.com/apache/mesos / start

Method start

src/examples/java/TestLog.java:73–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71 }
72
73 private InetSocketAddress start() throws IOException, InterruptedException {
74 int port = 0; // Ephemeral port.
75 int maxconnections = 1000;
76
77 File dataFile = new File(logdir, "zookeeper_data").getAbsoluteFile();
78 File snapFile = new File(logdir, "zookeeper_snap").getAbsoluteFile();
79
80 server = new ZooKeeperServer(
81 new FileTxnSnapLog(dataFile, snapFile),
82 new BasicDataTreeBuilder());
83
84 connection = new NIOServerCnxnFactory();
85 connection.configure(new InetSocketAddress(port), maxconnections);
86 connection.startup(server);
87
88 return connection.getLocalAddress();
89 }
90
91 private void stop() {
92 if (connection != null) {

Callers

nothing calls this directly

Calls 2

configureMethod · 0.80
startupMethod · 0.45

Tested by

no test coverage detected