Examples of routingNodes()


Examples of org.elasticsearch.cluster.ClusterState.routingNodes()

        assertThat(routingTable.index("test").shard(0).shards().get(0).unassigned(), equalTo(false));
        assertThat(routingTable.index("test").shard(0).shards().get(0).state(), equalTo(INITIALIZING));
        assertThat(routingTable.index("test").shard(0).shards().get(0).currentNodeId(), equalTo("node1"));

        logger.info("Marking the shard as failed");
        RoutingNodes routingNodes = clusterState.routingNodes();
        prevRoutingTable = routingTable;
        routingTable = strategy.applyFailedShard(clusterState, routingNodes.node("node1").shardsWithState(INITIALIZING).get(0)).routingTable();
        clusterState = newClusterStateBuilder().state(clusterState).routingTable(routingTable).build();

        assertThat(prevRoutingTable != routingTable, equalTo(true));
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.