Examples of timedOut()


Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.timedOut()

        ClusterHealthResponse health = node.client().admin().cluster().prepareHealth().setTimeout("5m").setWaitForYellowStatus().execute().actionGet();
        logger.info("health: " + health.status());
        logger.info("active shards: " + health.activeShards());
        logger.info("active primary shards: " + health.activePrimaryShards());
        if (health.timedOut()) {
            logger.error("Timed out on health...");
        }

        ClusterState clusterState = node.client().admin().cluster().prepareState().execute().actionGet().state();
        for (int i = 0; i < numberOfIndices; i++) {
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.timedOut()

            }

            logger.info("*** Waiting for GREEN status");
            try {
                ClusterHealthResponse clusterHealth = client.client().admin().cluster().prepareHealth().setWaitForGreenStatus().setTimeout("10m").execute().actionGet();
                if (clusterHealth.timedOut()) {
                    logger.warn("timed out waiting for green status....");
                }
            } catch (Exception e) {
                logger.warn("failed to execute cluster health....");
            }
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.timedOut()

        assertThat(createIndexResponse.acknowledged(), equalTo(true));

        logger.info("Running Cluster Health");
        ClusterHealthResponse clusterHealth = client("server1").admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet();
        logger.info("Done Cluster Health, status " + clusterHealth.status());
        assertThat(clusterHealth.timedOut(), equalTo(false));
        assertThat(clusterHealth.status(), equalTo(ClusterHealthStatus.YELLOW));

        // sleep till the cluster state gets published, since we check the master
        Thread.sleep(200);
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.timedOut()

        ClusterService clusterService2 = ((InternalNode) node("server2")).injector().getInstance(ClusterService.class);

        logger.info("Running Cluster Health");
        clusterHealth = client("server1").admin().cluster().health(clusterHealthRequest().waitForGreenStatus().waitForNodes("2")).actionGet();
        logger.info("Done Cluster Health, status " + clusterHealth.status());
        assertThat(clusterHealth.timedOut(), equalTo(false));
        assertThat(clusterHealth.status(), equalTo(ClusterHealthStatus.GREEN));

        // sleep till the cluster state gets published, since we check the master
        Thread.sleep(200);
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.timedOut()

        ClusterService clusterService3 = ((InternalNode) node("server3")).injector().getInstance(ClusterService.class);

        logger.info("Running Cluster Health");
        clusterHealth = client("server1").admin().cluster().health(clusterHealthRequest().waitForGreenStatus().waitForNodes("3").waitForRelocatingShards(0)).actionGet();
        logger.info("Done Cluster Health, status " + clusterHealth.status());
        assertThat(clusterHealth.timedOut(), equalTo(false));
        assertThat(clusterHealth.status(), equalTo(ClusterHealthStatus.GREEN));
        assertThat(clusterHealth.relocatingShards(), equalTo(0));
        assertThat(clusterHealth.activeShards(), equalTo(22));
        assertThat(clusterHealth.activePrimaryShards(), equalTo(11));
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.timedOut()

        closeNode("server1");
        // verify health
        logger.info("Running Cluster Health");
        clusterHealth = client("server2").admin().cluster().health(clusterHealthRequest().waitForGreenStatus().waitForRelocatingShards(0).waitForNodes("2")).actionGet();
        logger.info("Done Cluster Health, status " + clusterHealth.status());
        assertThat(clusterHealth.timedOut(), equalTo(false));
        assertThat(clusterHealth.status(), equalTo(ClusterHealthStatus.GREEN));
        assertThat(clusterHealth.relocatingShards(), equalTo(0));
        assertThat(clusterHealth.activeShards(), equalTo(22));
        assertThat(clusterHealth.activePrimaryShards(), equalTo(11));
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.timedOut()

        assertThat(createIndexResponse.acknowledged(), equalTo(true));

        logger.info("Running Cluster Health");
        ClusterHealthResponse clusterHealth = client("server1").admin().cluster().health(clusterHealthRequest().waitForGreenStatus()).actionGet();
        logger.info("Done Cluster Health, status " + clusterHealth.status());
        assertThat(clusterHealth.timedOut(), equalTo(false));
        assertThat(clusterHealth.status(), equalTo(ClusterHealthStatus.GREEN));
        assertThat(clusterHealth.relocatingShards(), equalTo(0));
        assertThat(clusterHealth.activeShards(), equalTo(11));
        assertThat(clusterHealth.activePrimaryShards(), equalTo(11));
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.timedOut()

        Thread.sleep(200);

        logger.info("Running Cluster Health");
        clusterHealth = client("server1").admin().cluster().health(clusterHealthRequest().waitForGreenStatus().waitForRelocatingShards(0).waitForNodes("2")).actionGet();
        logger.info("Done Cluster Health, status " + clusterHealth.status());
        assertThat(clusterHealth.timedOut(), equalTo(false));
        assertThat(clusterHealth.status(), equalTo(ClusterHealthStatus.GREEN));
        assertThat(clusterHealth.relocatingShards(), equalTo(0));
        assertThat(clusterHealth.activeShards(), equalTo(11));
        assertThat(clusterHealth.activePrimaryShards(), equalTo(11));
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.timedOut()

        startNode("node1");
        client("node1").admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("number_of_shards", 1).put("number_of_replicas", 2)).execute().actionGet();

        ClusterHealthResponse clusterHealth = client("node1").admin().cluster().prepareHealth().setWaitForActiveShards(1).setWaitForYellowStatus().execute().actionGet();
        logger.info("Done Cluster Health, status " + clusterHealth.status());
        assertThat(clusterHealth.timedOut(), equalTo(false));
        assertThat(clusterHealth.status(), equalTo(ClusterHealthStatus.YELLOW));

        // indexing, by default, will work (ONE consistency level)
        client("node1").prepareIndex("test", "type1", "1").setSource(source("1", "test")).setConsistencyLevel(WriteConsistencyLevel.ONE).execute().actionGet();
        try {
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.timedOut()

        ClusterService clusterService3 = ((InternalNode) node("server3")).injector().getInstance(ClusterService.class);

        logger.info("Running Cluster Health");
        clusterHealth = client("server1").admin().cluster().health(clusterHealthRequest().waitForGreenStatus().waitForRelocatingShards(0).waitForNodes("3")).actionGet();
        logger.info("Done Cluster Health, status " + clusterHealth.status());
        assertThat(clusterHealth.timedOut(), equalTo(false));
        assertThat(clusterHealth.status(), equalTo(ClusterHealthStatus.GREEN));
        assertThat(clusterHealth.relocatingShards(), equalTo(0));
        assertThat(clusterHealth.activeShards(), equalTo(11));
        assertThat(clusterHealth.activePrimaryShards(), equalTo(11));
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.