public interface ShardsAllocator
A ShardsAllocator is the main entry point for shard allocation on nodes in the cluster.
The allocator makes basic decision where a shard instance will be allocated, if already allocated instances
need relocate to other nodes due to node failures or due to rebalancing decisions.
| Modifier and Type | Method and Description |
|---|---|
boolean |
allocateUnassigned(RoutingAllocation allocation)
Assign all unassigned shards to nodes
|
void |
applyFailedShards(FailedRerouteAllocation allocation)
Applies changes on failed nodes based on the implemented algorithm.
|
void |
applyStartedShards(StartedRerouteAllocation allocation)
Applies changes on started nodes based on the implemented algorithm.
|
boolean |
moveShards(RoutingAllocation allocation)
Move started shards that can not be allocated to a node anymore
|
boolean |
rebalance(RoutingAllocation allocation)
Rebalancing number of shards on all nodes
|
void applyStartedShards(StartedRerouteAllocation allocation)
ShardRoutingState.STARTED from ShardRoutingState.RELOCATING
this allocator might apply some cleanups on the node that used to hold the shard.allocation - all started shardsvoid applyFailedShards(FailedRerouteAllocation allocation)
allocation - all failed shardsboolean allocateUnassigned(RoutingAllocation allocation)
allocation - current node allocationtrue if the allocation has changed, otherwise falseboolean rebalance(RoutingAllocation allocation)
allocation - current node allocationtrue if the allocation has changed, otherwise falseboolean moveShards(RoutingAllocation allocation)
allocation - current node allocationtrue if the allocation has changed, otherwise falseCopyright © 2009–2017. All rights reserved.