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

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest


    }

    private void startEsNode() {
        LOG.debug("Starting ES node (port={})", configuration.getEsTransportTcpPort());
        node.start();
        node.client().admin().cluster().health(new ClusterHealthRequest().waitForYellowStatus())
                .actionGet(configuration.getEsClusterDiscoveryTimeout(), TimeUnit.MILLISECONDS);
    }
View Full Code Here


        return health().getRelocatingShards();
    }

    private ClusterHealthResponse health() {
        String[] indices = deflector.getAllDeflectorIndexNames();
        return c.admin().cluster().health(new ClusterHealthRequest(indices)).actionGet();
    }
View Full Code Here

        try {
            node.start();

            final Client client = node.client();
            try {
                client.admin().cluster().health(new ClusterHealthRequest().waitForYellowStatus()).actionGet(configuration.getEsClusterDiscoveryTimeout(), MILLISECONDS);
            } catch (ElasticsearchTimeoutException e) {
                final String hosts = node.settings().get("discovery.zen.ping.unicast.hosts");

                if (!isNullOrEmpty(hosts)) {
                    final Iterable<String> hostList = Splitter.on(',').omitEmptyStrings().trimResults().split(hosts);
View Full Code Here

     * @param indices The indices to provide additional cluster health information for. Use <tt>null</tt> or <tt>_all</tt> to execute against all indices
     * @return The cluster health request
     * @see org.elasticsearch.client.ClusterAdminClient#health(org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest)
     */
    public static ClusterHealthRequest clusterHealthRequest(String... indices) {
        return new ClusterHealthRequest(indices);
    }
View Full Code Here

* @author kimchy (shay.banon)
*/
public class ClusterHealthRequestBuilder extends BaseClusterRequestBuilder<ClusterHealthRequest, ClusterHealthResponse> {

    public ClusterHealthRequestBuilder(ClusterAdminClient clusterClient) {
        super(clusterClient, new ClusterHealthRequest());
    }
View Full Code Here

public class ClusterHealthRequestBuilder<JsonInput, JsonOutput> extends AbstractRequestBuilderJsonOutput<ClusterHealthRequest, ClusterHealthResponse, JsonInput, JsonOutput> {

    private String level;

    public ClusterHealthRequestBuilder(Client client, JsonToString<JsonInput> jsonToString, StringToJson<JsonOutput> stringToJson) {
        super(client, new ClusterHealthRequest(), jsonToString, stringToJson);
    }
View Full Code Here

                ).actionGet();
            }

        }

        ClusterHealthResponse response = elasticSearchClient.admin().cluster().health(new ClusterHealthRequest().waitForYellowStatus()).actionGet();
        LOG.debug("Cluster status: " + response.getStatus());
    }
View Full Code Here

    void waitForYellow() {
        waitForYellow(getIndexName());
    }

    void waitForYellow(String name) {
        client.admin().cluster().health(new ClusterHealthRequest(name).waitForYellowStatus()).actionGet();
    }
View Full Code Here

    void waitForYellow(String name) {
        client.admin().cluster().health(new ClusterHealthRequest(name).waitForYellowStatus()).actionGet();
    }

    void waitForGreen(String name) {
        client.admin().cluster().health(new ClusterHealthRequest(name).waitForGreenStatus()).actionGet();
    }
View Full Code Here

    /**
     * Warning: Can take several 10 seconds!
     */
    public void waitForYellow() {
        node.client().admin().cluster().health(new ClusterHealthRequest("myindex").waitForYellowStatus()).actionGet();
        logger.info("Now node status is 'yellow'!");
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest

Copyright © 2018 www.massapicom. 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.