public class TransportClusterAllocationExplainAction extends TransportMasterNodeAction<ClusterAllocationExplainRequest,ClusterAllocationExplainResponse>
TransportClusterAllocationExplainAction
is responsible for actually executing the explanation of a shard's allocation on the
master node in the cluster.clusterService, transportService
actionName, indexNameExpressionResolver, parseFieldMatcher, taskManager, threadPool
deprecationLogger, logger, settings
Constructor and Description |
---|
TransportClusterAllocationExplainAction(Settings settings,
TransportService transportService,
ClusterService clusterService,
ThreadPool threadPool,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver,
ClusterInfoService clusterInfoService,
AllocationDeciders allocationDeciders,
ShardsAllocator shardAllocator,
TransportIndicesShardStoresAction shardStoresAction,
GatewayAllocator gatewayAllocator) |
Modifier and Type | Method and Description |
---|---|
static NodeExplanation |
calculateNodeExplanation(ShardRouting shard,
IndexMetaData indexMetaData,
DiscoveryNode node,
Decision nodeDecision,
java.lang.Float nodeWeight,
IndicesShardStoresResponse.StoreStatus storeStatus,
java.lang.String assignedNodeId,
java.util.Set<java.lang.String> activeAllocationIds,
boolean hasPendingAsyncFetch)
Construct a
NodeExplanation object for the given shard given all the metadata. |
protected ClusterBlockException |
checkBlock(ClusterAllocationExplainRequest request,
ClusterState state) |
protected java.lang.String |
executor() |
static ClusterAllocationExplanation |
explainShard(ShardRouting shard,
RoutingAllocation allocation,
RoutingNodes routingNodes,
boolean includeYesDecisions,
ShardsAllocator shardAllocator,
java.util.List<IndicesShardStoresResponse.StoreStatus> shardStores,
GatewayAllocator gatewayAllocator,
ClusterInfo clusterInfo)
For the given
ShardRouting , return the explanation of the allocation for that shard on all nodes. |
protected void |
masterOperation(ClusterAllocationExplainRequest request,
ClusterState state,
ActionListener<ClusterAllocationExplainResponse> listener) |
protected ClusterAllocationExplainResponse |
newResponse() |
static Decision |
tryShardOnNode(ShardRouting shard,
RoutingNode node,
RoutingAllocation allocation,
boolean includeYesDecisions)
Return the decisions for the given
ShardRouting on the given RoutingNode . |
doExecute, doExecute, localExecute, masterOperation
execute, execute, execute, execute
logDeprecatedSetting, logRemovedSetting, nodeName
@Inject public TransportClusterAllocationExplainAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, ClusterInfoService clusterInfoService, AllocationDeciders allocationDeciders, ShardsAllocator shardAllocator, TransportIndicesShardStoresAction shardStoresAction, GatewayAllocator gatewayAllocator)
protected java.lang.String executor()
executor
in class TransportMasterNodeAction<ClusterAllocationExplainRequest,ClusterAllocationExplainResponse>
protected ClusterBlockException checkBlock(ClusterAllocationExplainRequest request, ClusterState state)
checkBlock
in class TransportMasterNodeAction<ClusterAllocationExplainRequest,ClusterAllocationExplainResponse>
protected ClusterAllocationExplainResponse newResponse()
newResponse
in class TransportMasterNodeAction<ClusterAllocationExplainRequest,ClusterAllocationExplainResponse>
public static Decision tryShardOnNode(ShardRouting shard, RoutingNode node, RoutingAllocation allocation, boolean includeYesDecisions)
ShardRouting
on the given RoutingNode
. If includeYesDecisions
is not true,
only non-YES (NO and THROTTLE) decisions are returned.public static NodeExplanation calculateNodeExplanation(ShardRouting shard, IndexMetaData indexMetaData, DiscoveryNode node, Decision nodeDecision, java.lang.Float nodeWeight, IndicesShardStoresResponse.StoreStatus storeStatus, java.lang.String assignedNodeId, java.util.Set<java.lang.String> activeAllocationIds, boolean hasPendingAsyncFetch)
NodeExplanation
object for the given shard given all the metadata. This also attempts to construct the human
readable FinalDecision and final explanation as part of the explanation.public static ClusterAllocationExplanation explainShard(ShardRouting shard, RoutingAllocation allocation, RoutingNodes routingNodes, boolean includeYesDecisions, ShardsAllocator shardAllocator, java.util.List<IndicesShardStoresResponse.StoreStatus> shardStores, GatewayAllocator gatewayAllocator, ClusterInfo clusterInfo)
ShardRouting
, return the explanation of the allocation for that shard on all nodes. If includeYesDecisions
is true, returns all decisions, otherwise returns only 'NO' and 'THROTTLE' decisions.protected void masterOperation(ClusterAllocationExplainRequest request, ClusterState state, ActionListener<ClusterAllocationExplainResponse> listener)
masterOperation
in class TransportMasterNodeAction<ClusterAllocationExplainRequest,ClusterAllocationExplainResponse>