Server server = new Server(9990);
Context root = new Context(server, "/", Context.SESSIONS);
ServletCollector.setWriter(new ConsoleWriter(true));
root.addServlet(new ServletHolder(new ServletCollector(
new ChukwaConfiguration(true))), "/*");
server.start();
server.setStopAtShutdown(false);
Thread.sleep(1000);
ChukwaAgent agent = new ChukwaAgent();
HttpConnector connector = new HttpConnector(agent,
"http://localhost:9990/chukwa");
connector.start();
ChukwaConfiguration cc = new ChukwaConfiguration();
int portno = cc.getInt("chukwaAgent.control.port", 9093);
ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);
File workdir = new File("/tmp/stresstest/");
workdir.mkdir();
for (int i = 0; i < FILES_TO_USE; ++i) {