public final class ExternalTestCluster extends TestCluster
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
EXTERNAL_CLUSTER_PREFIX |
random, transportClientRatio
Constructor | Description |
---|---|
ExternalTestCluster(java.nio.file.Path tempDir,
org.elasticsearch.common.settings.Settings additionalSettings,
java.util.Collection<java.lang.Class<? extends org.elasticsearch.plugins.Plugin>> pluginClasses,
org.elasticsearch.common.transport.TransportAddress... transportAddresses) |
Modifier and Type | Method | Description |
---|---|---|
void |
afterTest() |
This method should be executed during tear down, after each test (but after assertAfterTest)
|
org.elasticsearch.client.Client |
client() |
Returns a client connected to any node in the cluster
|
void |
close() |
Closes the current cluster
|
void |
ensureEstimatedStats() |
Ensures that any breaker statistics are reset to 0.
|
java.lang.Iterable<org.elasticsearch.client.Client> |
getClients() |
Returns an
Iterable over all clients in this test cluster |
java.lang.String |
getClusterName() |
Returns the cluster name
|
org.elasticsearch.common.io.stream.NamedWriteableRegistry |
getNamedWriteableRegistry() |
Returns this clusters
NamedWriteableRegistry this is needed to
deserialize binary content from this cluster that might include custom named writeables |
java.net.InetSocketAddress[] |
httpAddresses() |
Returns the http addresses of the nodes within the cluster.
|
int |
numDataAndMasterNodes() |
Returns the number of data and master eligible nodes in the cluster.
|
int |
numDataNodes() |
Returns the number of data nodes in the cluster.
|
int |
size() |
Returns the number of nodes in the cluster.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
assertAfterTest, beforeIndexDeletion, beforeTest, seed, wipe, wipeAllTemplates, wipeIndices, wipeRepositories, wipeTemplates
public static final java.lang.String EXTERNAL_CLUSTER_PREFIX
public ExternalTestCluster(java.nio.file.Path tempDir, org.elasticsearch.common.settings.Settings additionalSettings, java.util.Collection<java.lang.Class<? extends org.elasticsearch.plugins.Plugin>> pluginClasses, org.elasticsearch.common.transport.TransportAddress... transportAddresses)
public void afterTest()
TestCluster
afterTest
in class TestCluster
public org.elasticsearch.client.Client client()
TestCluster
client
in class TestCluster
public int size()
TestCluster
size
in class TestCluster
public int numDataNodes()
TestCluster
numDataNodes
in class TestCluster
public int numDataAndMasterNodes()
TestCluster
numDataAndMasterNodes
in class TestCluster
public java.net.InetSocketAddress[] httpAddresses()
TestCluster
httpAddresses
in class TestCluster
public void close() throws java.io.IOException
TestCluster
close
in class TestCluster
java.io.IOException
public void ensureEstimatedStats()
TestCluster
ensureEstimatedStats
in class TestCluster
public java.lang.Iterable<org.elasticsearch.client.Client> getClients()
TestCluster
Iterable
over all clients in this test clustergetClients
in class TestCluster
public org.elasticsearch.common.io.stream.NamedWriteableRegistry getNamedWriteableRegistry()
TestCluster
NamedWriteableRegistry
this is needed to
deserialize binary content from this cluster that might include custom named writeablesgetNamedWriteableRegistry
in class TestCluster
public java.lang.String getClusterName()
TestCluster
getClusterName
in class TestCluster