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 shards
void applyFailedShards(FailedRerouteAllocation allocation)
allocation
- all failed shards
boolean allocateUnassigned(RoutingAllocation allocation)
allocation
- current node allocationtrue
if the allocation has changed, otherwise false
boolean rebalance(RoutingAllocation allocation)
allocation
- current node allocationtrue
if the allocation has changed, otherwise false
boolean moveShards(RoutingAllocation allocation)
allocation
- current node allocationtrue
if the allocation has changed, otherwise false
Copyright © 2009–2016. All rights reserved.