use of com.github.alexcojocaru.mojo.elasticsearch.v2.client.Monitor in project elasticsearch-maven-plugin by alexcojocaru.
the class WaitToStartInstanceStep method execute.
@Override
public void execute(InstanceConfiguration config) {
int timeout = config.getStartupTimeout();
try (ElasticsearchClient client = new ElasticsearchClient.Builder().withInstanceConfiguration(config).withHostname("localhost").build()) {
Monitor monitor = new Monitor(client, config.getClusterConfiguration().getLog());
monitor.waitToStartInstance(config.getBaseDir(), config.getClusterConfiguration().getClusterName(), timeout);
}
}
use of com.github.alexcojocaru.mojo.elasticsearch.v2.client.Monitor in project elasticsearch-maven-plugin by alexcojocaru.
the class WaitToStartClusterStep method execute.
@Override
public void execute(ClusterConfiguration config) {
try (ElasticsearchClient client = new ElasticsearchClient.Builder().withInstanceConfiguration(config.getInstanceConfigurationList().get(0)).withHostname("localhost").build()) {
Monitor monitor = new Monitor(client, config.getLog());
monitor.waitToStartCluster(config.getClusterName(), config.getInstanceConfigurationList().size(), config.getStartupTimeout());
}
}
Aggregations