Package org.elasticsearch.action.admin.cluster.health

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthRequestBuilder.execute()


        }
    }

    private void printClusterStatus() {
        ClusterHealthRequestBuilder healthRequestBuilder = elasticsearchClient.admin().cluster().prepareHealth();
        ClusterHealthResponse response = healthRequestBuilder.execute().actionGet();
        if (response.getStatus().equals(ClusterHealthStatus.RED)) {
            LOG.error("Cluster health is RED. Indexing ability will be limited");
        } else if (response.getStatus().equals(ClusterHealthStatus.YELLOW)) {
            LOG.warn("Cluster health is YELLOW.");
        } else if (response.getStatus().equals(ClusterHealthStatus.GREEN)) {
View Full Code Here


        public Void execute(Client client, String indexName, OperationContext helper) {
          ClusterHealthRequestBuilder request = client.admin().cluster().prepareHealth(indexName);

          request.setWaitForGreenStatus().setTimeout(_healthTimeout);

          ClusterHealthResponse response = request.execute().actionGet();

          if (response.getStatus() != ClusterHealthStatus.GREEN) {
            throw new IllegalStateException("cluster not ready for rebuild (status " + response.getStatus()
                + ")");
          }
View Full Code Here

        public Void execute(Client client, String indexName, OperationContext helper) {
          ClusterHealthRequestBuilder request = client.admin().cluster().prepareHealth(indexName);

          request.setWaitForGreenStatus().setTimeout(_healthTimeout);

          ClusterHealthResponse response = request.execute().actionGet();

          if (response.getStatus() != ClusterHealthStatus.GREEN) {
            throw new IllegalStateException("cluster not ready for rebuild (status " + response.getStatus()
                + ")");
          }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.