// Start the agent
ChukwaAgent agent = ChukwaAgent.getAgent();
int portno = 9093; // Default
ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);
// ADD
// org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.
// CharFileTailingAdaptorUTF8NewLineEscaped
// SysLog
// 0 /var/log/messages
// 0
System.out.println("Adding adaptor");
long adaptor = cli
.add(
"org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.CharFileTailingAdaptorUTF8NewLineEscaped",
"AutomatedTestType", "0 " + inputFile, 0);
cli.remove(adaptor);
System.out.println("Adaptor removed");
agent.shutdown();
System.out.println("Shutting down agent");
CollectorStub.jettyServer.stop();
System.out.println("Shutting down collector");