org.elasticsearch.cluster.routing.allocation
Class SameShardNodeAllocation

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.cluster.routing.allocation.NodeAllocation
          extended by org.elasticsearch.cluster.routing.allocation.SameShardNodeAllocation

public class SameShardNodeAllocation
extends NodeAllocation

An allocation strategy that does not allow for the same shard instance to be allocated on the same node.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.elasticsearch.cluster.routing.allocation.NodeAllocation
NodeAllocation.Decision
 
Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
SameShardNodeAllocation(Settings settings)
           
 
Method Summary
 NodeAllocation.Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
           
 
Methods inherited from class org.elasticsearch.cluster.routing.allocation.NodeAllocation
allocateUnassigned, applyFailedShards, applyStartedShards, canRebalance
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SameShardNodeAllocation

@Inject
public SameShardNodeAllocation(Settings settings)
Method Detail

canAllocate

public NodeAllocation.Decision canAllocate(ShardRouting shardRouting,
                                           RoutingNode node,
                                           RoutingAllocation allocation)
Overrides:
canAllocate in class NodeAllocation