public static Cluster initializeCluster(String path) throws JAXBException, IOException { Cluster cluster = EventUtil.getCluster(path); for (Property p : cluster.getEnv().getProperty()) { env.put(p.getKey(), p.getValue()); } return cluster; }
private static void cleanup(Cluster cluster) throws IOException, InterruptedException { List<String> args = new ArrayList<String>(); args.add(scriptDirSuffix); Node clientNode = new Node(); clientNode.setId("client"); clientNode.setClusterIp("127.0.0.1"); for (Node node : cluster.getNode()) { args.add(node.getClusterIp()); } EventUtil.executeLocalScript(clientNode, eventsDir + "/" + "events" + "/" + "cleanup.sh", args); }