add local node to node builder
This commit is contained in:
parent
a9cd00e287
commit
2fd36fdbf8
|
@ -116,6 +116,18 @@ public class NodeBuilder {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the node a local node. A local node is a node that uses a local (JVM level) discovery and
|
||||
* transport. Other (local) nodes started within the same JVM (actually, class-loader) will be
|
||||
* discovered and communicated with. Nodes outside of the JVM will not be discovered.
|
||||
*
|
||||
* @param local Should the node be local or not
|
||||
*/
|
||||
public NodeBuilder local(boolean local) {
|
||||
settings.put("node.local", true);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The cluster name this node is part of (maps to the <tt>cluster.name</tt> setting). Defaults
|
||||
* to <tt>elasticsearch</tt>.
|
||||
|
|
|
@ -47,7 +47,7 @@ public class SimpleAttachmentIntegrationTests {
|
|||
private Node node;
|
||||
|
||||
@BeforeClass public void setupServer() {
|
||||
node = nodeBuilder().settings(settingsBuilder().put("node.local", true)).node();
|
||||
node = nodeBuilder().local(true).node();
|
||||
}
|
||||
|
||||
@AfterClass public void closeServer() {
|
||||
|
|
Loading…
Reference in New Issue