public class ShardStateAction extends AbstractComponent
| Modifier and Type | Class and Description |
|---|---|
static interface |
ShardStateAction.Listener |
static class |
ShardStateAction.NoLongerPrimaryShardException |
static class |
ShardStateAction.ShardEntry |
static class |
ShardStateAction.ShardFailedClusterStateTaskExecutor |
static class |
ShardStateAction.ShardStartedClusterStateTaskExecutor |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SHARD_FAILED_ACTION_NAME |
static java.lang.String |
SHARD_STARTED_ACTION_NAME |
deprecationLogger, logger, settings| Constructor and Description |
|---|
ShardStateAction(Settings settings,
ClusterService clusterService,
TransportService transportService,
AllocationService allocationService,
RoutingService routingService,
ThreadPool threadPool) |
| Modifier and Type | Method and Description |
|---|---|
void |
localShardFailed(ShardRouting shardRouting,
java.lang.String message,
java.lang.Exception failure,
ShardStateAction.Listener listener)
Send a shard failed request to the master node to update the cluster state when a shard on the local node failed.
|
void |
localShardFailed(ShardRouting shardRouting,
java.lang.String message,
java.lang.Exception failure,
ShardStateAction.Listener listener,
ClusterState currentState)
Send a shard failed request to the master node to update the cluster state when a shard on the local node failed.
|
void |
remoteShardFailed(ShardId shardId,
java.lang.String allocationId,
long primaryTerm,
java.lang.String message,
java.lang.Exception failure,
ShardStateAction.Listener listener)
Send a shard failed request to the master node to update the cluster state with the failure of a shard on another node.
|
void |
shardStarted(ShardRouting shardRouting,
java.lang.String message,
ShardStateAction.Listener listener) |
void |
shardStarted(ShardRouting shardRouting,
java.lang.String message,
ShardStateAction.Listener listener,
ClusterState currentState) |
protected void |
waitForNewMasterAndRetry(java.lang.String actionName,
ClusterStateObserver observer,
ShardStateAction.ShardEntry shardEntry,
ShardStateAction.Listener listener,
java.util.function.Predicate<ClusterState> changePredicate) |
logDeprecatedSetting, logRemovedSetting, nodeNamepublic static final java.lang.String SHARD_STARTED_ACTION_NAME
public static final java.lang.String SHARD_FAILED_ACTION_NAME
@Inject public ShardStateAction(Settings settings, ClusterService clusterService, TransportService transportService, AllocationService allocationService, RoutingService routingService, ThreadPool threadPool)
public void remoteShardFailed(ShardId shardId, java.lang.String allocationId, long primaryTerm, java.lang.String message, @Nullable java.lang.Exception failure, ShardStateAction.Listener listener)
shardId - shard id of the shard to failallocationId - allocation id of the shard to failprimaryTerm - the primary term associated with the primary shard that is failing the shard. Must be strictly positive.message - the reason for the failurefailure - the underlying cause of the failurelistener - callback upon completion of the requestpublic void localShardFailed(ShardRouting shardRouting, java.lang.String message, @Nullable java.lang.Exception failure, ShardStateAction.Listener listener)
public void localShardFailed(ShardRouting shardRouting, java.lang.String message, @Nullable java.lang.Exception failure, ShardStateAction.Listener listener, ClusterState currentState)
protected void waitForNewMasterAndRetry(java.lang.String actionName,
ClusterStateObserver observer,
ShardStateAction.ShardEntry shardEntry,
ShardStateAction.Listener listener,
java.util.function.Predicate<ClusterState> changePredicate)
public void shardStarted(ShardRouting shardRouting, java.lang.String message, ShardStateAction.Listener listener)
public void shardStarted(ShardRouting shardRouting, java.lang.String message, ShardStateAction.Listener listener, ClusterState currentState)