Class BaseGatewayShardAllocator

java.lang.Object
org.elasticsearch.gateway.BaseGatewayShardAllocator
Direct Known Subclasses:
PrimaryShardAllocator, ReplicaShardAllocator

public abstract class BaseGatewayShardAllocator
extends java.lang.Object
An abstract class that implements basic functionality for allocating shards to nodes based on shard copies that already exist in the cluster. Individual implementations of this class are responsible for providing the logic to determine to which nodes (if any) those shards are allocated.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected org.apache.logging.log4j.Logger logger  
  • Constructor Summary

    Constructors 
    Constructor Description
    BaseGatewayShardAllocator()  
  • Method Summary

    Modifier and Type Method Description
    void allocateUnassigned​(RoutingAllocation allocation)
    Allocate unassigned shards to nodes (if any) where valid copies of the shard already exist.
    protected static java.util.List<NodeAllocationResult> buildDecisionsForAllNodes​(ShardRouting shard, RoutingAllocation allocation)
    Builds decisions for all nodes in the cluster, so that the explain API can provide information on allocation decisions for each node, while still waiting to allocate the shard (e.g.
    abstract AllocateUnassignedDecision makeAllocationDecision​(ShardRouting unassignedShard, RoutingAllocation allocation, org.apache.logging.log4j.Logger logger)
    Make a decision on the allocation of an unassigned shard.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait