private void closeNodes() throws IOException { logger.info("closing all clients"); for (AbstractClient client : clients.values()) { client.close(); } clients.clear(); logger.info("closing all nodes"); for (Node node : nodes.values()) { if (node != null) { node.close(); } } nodes.clear(); logger.info("all nodes closed"); }
private Node buildNode(String id) throws IOException { Settings nodeSettings = settingsBuilder() .put(getNodeSettings()) .put("name", id) .build(); logger.info("settings={}", nodeSettings.getAsMap()); // ES 2.1 renders NodeBuilder as useless Node node = new MockNode(nodeSettings); AbstractClient client = (AbstractClient)node.client(); nodes.put(id, node); clients.put(id, client); logger.info("clients={}", clients); return node; }
private Node buildNode(String id) throws IOException { Settings nodeSettings = settingsBuilder() .put(getNodeSettings()) .put("name", id) .build(); logger.info("settings={}", nodeSettings.getAsMap()); // ES 2.1 renders NodeBuilder as useless Node node = new MockNode(nodeSettings, XmlPlugin.class); AbstractClient client = (AbstractClient)node.client(); nodes.put(id, node); clients.put(id, client); logger.info("clients={}", clients); return node; }
private Node buildNode(String id) throws IOException { Settings nodeSettings = settingsBuilder() .put(getNodeSettings()) .put("name", id) .build(); logger.info("settings={}", nodeSettings.getAsMap()); // ES 2.1 renders NodeBuilder as useless Node node = new MockNode(nodeSettings, CondBoostPlugin.class); AbstractClient client = (AbstractClient)node.client(); nodes.put(id, node); clients.put(id, client); logger.info("clients={}", clients); return node; }
private Node buildNode(String id) { Settings finalSettings = settingsBuilder() .put(getNodeSettings()) .put("name", id) .build(); Node node = nodeBuilder() .settings(finalSettings).build(); AbstractClient client = (AbstractClient)node.client(); nodes.put(id, node); clients.put(id, client); return node; }
public void closeAllNodes() throws IOException { for (AbstractClient client : clients.values()) { client.close(); } clients.clear(); for (Node node : nodes.values()) { if (node != null) { node.close(); } } nodes.clear(); }
private Node buildNode(String id) { Settings finalSettings = settingsBuilder() .put(getNodeSettings()) .put("name", id) .build(); logger.info("settings={}", finalSettings.getAsMap()); Node node = nodeBuilder() .settings(finalSettings).build(); AbstractClient client = (AbstractClient)node.client(); nodes.put(id, node); clients.put(id, client); return node; }
public void closeAllNodes() throws IOException { logger.info("closing all clients"); for (AbstractClient client : clients.values()) { client.close(); } clients.clear(); logger.info("closing all nodes"); for (Node node : nodes.values()) { if (node != null) { node.close(); } } nodes.clear(); logger.info("all nodes closed"); }
private Node buildNode(String id) throws IOException { Settings nodeSettings = settingsBuilder() .put(getNodeSettings()) .put("name", id) .build(); logger.info("settings={}", nodeSettings.getAsMap()); // ES 2.1 renders NodeBuilder as useless Node node = new MockNode(nodeSettings, HelperPlugin.class); AbstractClient client = (AbstractClient)node.client(); nodes.put(id, node); clients.put(id, client); logger.info("clients={}", clients); return node; }
private Node buildNode(String id) throws IOException { Settings nodeSettings = settingsBuilder() .put(getNodeSettings()) .put("name", id) .build(); logger.info("settings={}", nodeSettings.getAsMap()); // ES 2.1 renders NodeBuilder as useless Node node = new MockNode(nodeSettings, AnalysisBaseformPlugin.class); AbstractClient client = (AbstractClient)node.client(); nodes.put(id, node); clients.put(id, client); logger.info("clients={}", clients); return node; }
public AbstractClient client(String id) { return clients.get(id); }