org.elasticsearch.cluster.routing
Class RoutingNodes
java.lang.Object
org.elasticsearch.cluster.routing.RoutingNodes
- All Implemented Interfaces:
- java.lang.Iterable<RoutingNode>
@NotThreadSafe
public class RoutingNodes
- extends java.lang.Object
- implements java.lang.Iterable<RoutingNode>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoutingNodes
public RoutingNodes(MetaData metaData,
ClusterBlocks blocks,
RoutingTable routingTable)
iterator
public java.util.Iterator<RoutingNode> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<RoutingNode>
routingTable
public RoutingTable routingTable()
getRoutingTable
public RoutingTable getRoutingTable()
metaData
public MetaData metaData()
getMetaData
public MetaData getMetaData()
blocks
public ClusterBlocks blocks()
getBlocks
public ClusterBlocks getBlocks()
requiredAverageNumberOfShardsPerNode
public int requiredAverageNumberOfShardsPerNode()
hasUnassigned
public boolean hasUnassigned()
ignoredUnassigned
public java.util.List<MutableShardRouting> ignoredUnassigned()
unassigned
public java.util.List<MutableShardRouting> unassigned()
getUnassigned
public java.util.List<MutableShardRouting> getUnassigned()
nodesToShards
public java.util.Map<java.lang.String,RoutingNode> nodesToShards()
getNodesToShards
public java.util.Map<java.lang.String,RoutingNode> getNodesToShards()
node
public RoutingNode node(java.lang.String nodeId)
findPrimaryForReplica
public MutableShardRouting findPrimaryForReplica(ShardRouting shard)
shardsRoutingFor
public java.util.List<MutableShardRouting> shardsRoutingFor(ShardRouting shardRouting)
shardsRoutingFor
public java.util.List<MutableShardRouting> shardsRoutingFor(java.lang.String index,
int shardId)
numberOfShardsOfType
public int numberOfShardsOfType(ShardRoutingState state)
shardsWithState
public java.util.List<MutableShardRouting> shardsWithState(ShardRoutingState... state)
shardsWithState
public java.util.List<MutableShardRouting> shardsWithState(java.lang.String index,
ShardRoutingState... state)
sortedNodesLeastToHigh
public java.util.List<RoutingNode> sortedNodesLeastToHigh()
nodesToShardsSorted
public java.util.List<RoutingNode> nodesToShardsSorted(java.util.Comparator<RoutingNode> comparator)
prettyPrint
public java.lang.String prettyPrint()