use of org.elasticsearch.client.support.AbstractClient in project elasticsearch-jdbc by jprante.
the class NodeTestUtils method closeNodes.
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");
}
use of org.elasticsearch.client.support.AbstractClient in project elasticsearch-jdbc by jprante.
the class NodeTestUtils method buildNode.
private Node buildNode(String id) throws IOException {
Settings nodeSettings = settingsBuilder().put(getNodeSettings()).put("name", id).build();
logger.info("settings={}", nodeSettings.getAsMap());
Node node = new MockNode(nodeSettings);
AbstractClient client = (AbstractClient) node.client();
nodes.put(id, node);
clients.put(id, client);
logger.info("clients={}", clients);
return node;
}
Aggregations