Module org.elasticsearch.server
Class BalancedShardsAllocator.ModelNode
java.lang.Object
org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelNode
- All Implemented Interfaces:
Iterable<org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex>
- Enclosing class:
BalancedShardsAllocator
-
Constructor Summary
ConstructorsConstructorDescriptionModelNode(WriteLoadForecaster writeLoadForecaster, Metadata metadata, ClusterInfo clusterInfo, RoutingNode routingNode) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddShard(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex index, ShardRouting shard) booleancontainsShard(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex projIndex, ShardRouting shard) doubleorg.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndexgetIndex(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex index) inthighestPrimary(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex index) Iterator<org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex> iterator()intintnumShards(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex idx) voidremoveShard(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex projectIndex, ShardRouting shard) toString()doubleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ModelNode
public ModelNode(WriteLoadForecaster writeLoadForecaster, Metadata metadata, ClusterInfo clusterInfo, RoutingNode routingNode)
-
-
Method Details
-
getIndex
public org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex getIndex(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex index) -
getNodeId
-
getRoutingNode
-
numShards
public int numShards() -
numShards
public int numShards(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex idx) -
writeLoad
public double writeLoad() -
diskUsageInBytes
public double diskUsageInBytes() -
highestPrimary
public int highestPrimary(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex index) -
addShard
public void addShard(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex index, ShardRouting shard) -
removeShard
public void removeShard(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex projectIndex, ShardRouting shard) -
toString
-
iterator
public Iterator<org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex> iterator() -
containsShard
public boolean containsShard(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ProjectIndex projIndex, ShardRouting shard)
-