Examples of ClusterHealthRequest


Examples of com.dotcms.repackage.org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest

     * @return
     */
    public Map<String,ClusterIndexHealth> getClusterHealth() {
        AdminClient client=new ESClient().getClient().admin();

        ClusterHealthRequest req = new ClusterHealthRequest();
        ActionFuture<ClusterHealthResponse> chr = client.cluster().health(req);

        ClusterHealthResponse res  = chr.actionGet();
        Map<String,ClusterIndexHealth> map  = res.getIndices();

View Full Code Here

Examples of com.dotcms.repackage.org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest

          Logger.error(ClusterResource.class, "Error getting ES Client", e);
          jsonNode.put("error", e.getMessage());
          return responseResource.response( jsonNode.toString() );
        }

    ClusterHealthRequest clusterReq = new ClusterHealthRequest();
    ActionFuture<ClusterHealthResponse> afClusterRes = client.cluster().health(clusterReq);
    ClusterHealthResponse clusterRes = afClusterRes.actionGet();


    jsonNode.put("clusterName", clusterRes.getClusterName());
View Full Code Here

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

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

        return health().getRelocatingShards();
    }

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

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

        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

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

     * @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

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

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

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

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

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

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

                ).actionGet();
            }

        }

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

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

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

    void waitForYellow(String name) {
        client.admin().cluster().health(new ClusterHealthRequest(name).waitForYellowStatus()).actionGet();
    }
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.