Class RoutingNodesChangedObserver
- java.lang.Object
-
- org.elasticsearch.cluster.routing.allocation.RoutingNodesChangedObserver
-
- All Implemented Interfaces:
RoutingChangesObserver
public class RoutingNodesChangedObserver extends java.lang.Object implements RoutingChangesObserver
Records if changes were made toRoutingNodes
during an allocation round.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.routing.RoutingChangesObserver
RoutingChangesObserver.AbstractRoutingChangesObserver, RoutingChangesObserver.DelegatingRoutingChangesObserver
-
-
Constructor Summary
Constructors Constructor Description RoutingNodesChangedObserver()
-
Method Summary
Modifier and Type Method Description void
initializedReplicaReinitialized(ShardRouting oldReplica, ShardRouting reinitializedReplica)
Called when an initializing replica is reinitialized.boolean
isChanged()
Returns whether changes were madevoid
relocationCompleted(ShardRouting removedRelocationSource)
Called on relocation source when relocation completes after relocation target is started.void
relocationSourceRemoved(ShardRouting removedReplicaRelocationSource)
Called on replica relocation target when replica relocation source fails.void
relocationStarted(ShardRouting startedShard, ShardRouting targetRelocatingShard)
Called when relocation of a started shard is initiated.void
replicaPromoted(ShardRouting replicaShard)
Called when started replica is promoted to primary.void
shardFailed(ShardRouting failedShard, UnassignedInfo unassignedInfo)
Called when a shard is failed or cancelled.void
shardInitialized(ShardRouting unassignedShard, ShardRouting initializedShard)
Called when unassigned shard is initialized.void
shardStarted(ShardRouting initializingShard, ShardRouting startedShard)
Called when an initializing shard is started.void
startedPrimaryReinitialized(ShardRouting startedPrimaryShard, ShardRouting initializedShard)
Called on started primary shard after it has been promoted from replica to primary and is reinitialized due to shadow replicas.void
unassignedInfoUpdated(ShardRouting unassignedShard, UnassignedInfo newUnassignedInfo)
Called when an unassigned shard's unassigned information was updated
-
-
-
Method Detail
-
isChanged
public boolean isChanged()
Returns whether changes were made
-
shardInitialized
public void shardInitialized(ShardRouting unassignedShard, ShardRouting initializedShard)
Description copied from interface:RoutingChangesObserver
Called when unassigned shard is initialized. Does not include initializing relocation target shards.- Specified by:
shardInitialized
in interfaceRoutingChangesObserver
-
shardStarted
public void shardStarted(ShardRouting initializingShard, ShardRouting startedShard)
Description copied from interface:RoutingChangesObserver
Called when an initializing shard is started.- Specified by:
shardStarted
in interfaceRoutingChangesObserver
-
relocationStarted
public void relocationStarted(ShardRouting startedShard, ShardRouting targetRelocatingShard)
Description copied from interface:RoutingChangesObserver
Called when relocation of a started shard is initiated.- Specified by:
relocationStarted
in interfaceRoutingChangesObserver
-
unassignedInfoUpdated
public void unassignedInfoUpdated(ShardRouting unassignedShard, UnassignedInfo newUnassignedInfo)
Description copied from interface:RoutingChangesObserver
Called when an unassigned shard's unassigned information was updated- Specified by:
unassignedInfoUpdated
in interfaceRoutingChangesObserver
-
shardFailed
public void shardFailed(ShardRouting failedShard, UnassignedInfo unassignedInfo)
Description copied from interface:RoutingChangesObserver
Called when a shard is failed or cancelled.- Specified by:
shardFailed
in interfaceRoutingChangesObserver
-
relocationCompleted
public void relocationCompleted(ShardRouting removedRelocationSource)
Description copied from interface:RoutingChangesObserver
Called on relocation source when relocation completes after relocation target is started.- Specified by:
relocationCompleted
in interfaceRoutingChangesObserver
-
relocationSourceRemoved
public void relocationSourceRemoved(ShardRouting removedReplicaRelocationSource)
Description copied from interface:RoutingChangesObserver
Called on replica relocation target when replica relocation source fails. Promotes the replica relocation target to ordinary initializing shard.- Specified by:
relocationSourceRemoved
in interfaceRoutingChangesObserver
-
startedPrimaryReinitialized
public void startedPrimaryReinitialized(ShardRouting startedPrimaryShard, ShardRouting initializedShard)
Description copied from interface:RoutingChangesObserver
Called on started primary shard after it has been promoted from replica to primary and is reinitialized due to shadow replicas.- Specified by:
startedPrimaryReinitialized
in interfaceRoutingChangesObserver
-
replicaPromoted
public void replicaPromoted(ShardRouting replicaShard)
Description copied from interface:RoutingChangesObserver
Called when started replica is promoted to primary.- Specified by:
replicaPromoted
in interfaceRoutingChangesObserver
-
initializedReplicaReinitialized
public void initializedReplicaReinitialized(ShardRouting oldReplica, ShardRouting reinitializedReplica)
Description copied from interface:RoutingChangesObserver
Called when an initializing replica is reinitialized. This happens when a primary relocation completes, which reinitializes all currently initializing replicas as their recovery source node changes- Specified by:
initializedReplicaReinitialized
in interfaceRoutingChangesObserver
-
-