Class RoutingNodesHelper
java.lang.Object
org.elasticsearch.cluster.routing.RoutingNodesHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stream<ShardRouting> assignedShardsIn(RoutingNode routingNode) static Stream<ShardRouting> assignedShardsIn(RoutingNodes routingNodes) static Stream<ShardRouting> asStream(IndexShardRoutingTable indexShardRoutingTable) Returns a stream over allShardRoutingin aIndexShardRoutingTable.static intnumberOfShardsWithState(RoutingNodes nodes, ShardRoutingState state) static RoutingNoderoutingNode(String nodeId, DiscoveryNode node, ShardRouting... shards) static List<ShardRouting> shardsWithState(RoutingNodes routingNodes, String index, ShardRoutingState states) static List<ShardRouting> shardsWithState(RoutingNodes routingNodes, ShardRoutingState state)
-
Method Details
-
numberOfShardsWithState
-
shardsWithState
public static List<ShardRouting> shardsWithState(RoutingNodes routingNodes, ShardRoutingState state) -
shardsWithState
public static List<ShardRouting> shardsWithState(RoutingNodes routingNodes, String index, ShardRoutingState states) -
assignedShardsIn
-
assignedShardsIn
-
asStream
Returns a stream over allShardRoutingin aIndexShardRoutingTable. This is not part of production code on purpose as its too costly to iterate the table like this in many production use cases.- Parameters:
indexShardRoutingTable- index shard routing table to iterate over- Returns:
- stream over
ShardRouting
-
routingNode
-