org.elasticsearch.cluster.routing
Class RoutingNodes

java.lang.Object
  extended by org.elasticsearch.cluster.routing.RoutingNodes
All Implemented Interfaces:
Iterable<RoutingNode>

public class RoutingNodes
extends Object
implements Iterable<RoutingNode>


Constructor Summary
RoutingNodes(ClusterState clusterState)
           
 
Method Summary
 ClusterBlocks blocks()
           
 MutableShardRouting findPrimaryForReplica(ShardRouting shard)
           
 ClusterBlocks getBlocks()
           
 MetaData getMetaData()
           
 Map<String,RoutingNode> getNodesToShards()
           
 RoutingTable getRoutingTable()
           
 List<MutableShardRouting> getUnassigned()
           
 boolean hasUnassigned()
           
 List<MutableShardRouting> ignoredUnassigned()
           
 Iterator<RoutingNode> iterator()
           
 MetaData metaData()
           
 RoutingNode node(String nodeId)
           
 gnu.trove.map.hash.TObjectIntHashMap<String> nodesPerAttributesCounts(String attributeName)
           
 Map<String,RoutingNode> nodesToShards()
           
 int numberOfShardsOfType(ShardRoutingState state)
           
 String prettyPrint()
           
 int requiredAverageNumberOfShardsPerNode()
           
 RoutingTable routingTable()
           
 List<MutableShardRouting> shardsRoutingFor(ShardRouting shardRouting)
           
 List<MutableShardRouting> shardsRoutingFor(String index, int shardId)
           
 List<MutableShardRouting> shardsWithState(ShardRoutingState... state)
           
 List<MutableShardRouting> shardsWithState(String index, ShardRoutingState... state)
           
 List<MutableShardRouting> unassigned()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoutingNodes

public RoutingNodes(ClusterState clusterState)
Method Detail

iterator

public Iterator<RoutingNode> iterator()
Specified by:
iterator in interface 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 List<MutableShardRouting> ignoredUnassigned()

unassigned

public List<MutableShardRouting> unassigned()

getUnassigned

public List<MutableShardRouting> getUnassigned()

nodesToShards

public Map<String,RoutingNode> nodesToShards()

getNodesToShards

public Map<String,RoutingNode> getNodesToShards()

node

public RoutingNode node(String nodeId)

nodesPerAttributesCounts

public gnu.trove.map.hash.TObjectIntHashMap<String> nodesPerAttributesCounts(String attributeName)

findPrimaryForReplica

public MutableShardRouting findPrimaryForReplica(ShardRouting shard)

shardsRoutingFor

public List<MutableShardRouting> shardsRoutingFor(ShardRouting shardRouting)

shardsRoutingFor

public List<MutableShardRouting> shardsRoutingFor(String index,
                                                  int shardId)

numberOfShardsOfType

public int numberOfShardsOfType(ShardRoutingState state)

shardsWithState

public List<MutableShardRouting> shardsWithState(ShardRoutingState... state)

shardsWithState

public List<MutableShardRouting> shardsWithState(String index,
                                                 ShardRoutingState... state)

prettyPrint

public String prettyPrint()


Copyright © 2009-2012. All Rights Reserved.