- All Implemented Interfaces:
public class DelayedAllocationService extends AbstractLifecycleComponent implements ClusterStateListener
DelayedAllocationServicelistens to cluster state changes and checks if there are unassigned shards with delayed allocation (unassigned shards that have the delay marker). These are shards that have become unassigned due to a node leaving and which were assigned the delay marker based on the index delay setting
AllocationService.disassociateDeadNodes(RoutingAllocation). This class is responsible for choosing the next (closest) delay expiration of a delayed shard to schedule a reroute to remove the delay marker. The actual removal of the delay marker happens in
AllocationService.removeDelayMarkers(RoutingAllocation), triggering yet another cluster change event.
Method SummaryModifier and TypeMethodDescription
voidCalled when cluster state changes.
protected longoverride this to control time based decisions during delayed allocation
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
doStartprotected void doStart()
doStopprotected void doStop()
doCloseprotected void doClose()
currentNanoTimeprotected long currentNanoTime()override this to control time based decisions during delayed allocation
clusterChangedpublic void clusterChanged
(ClusterChangedEvent event)Description copied from interface:
ClusterStateListenerCalled when cluster state changes.
assertClusterOrMasterStateThreadprotected void assertClusterOrMasterStateThread()