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,
AllocationService allocationService,
ClusterInfoService clusterInfoService,
AllocationDeciders allocationDeciders,
ShardsAllocator shardAllocator) |
Modifier and Type | Method and Description |
---|---|
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)
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, AllocationService allocationService, ClusterInfoService clusterInfoService, AllocationDeciders allocationDeciders, ShardsAllocator shardAllocator)
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 ClusterAllocationExplanation explainShard(ShardRouting shard, RoutingAllocation allocation, RoutingNodes routingNodes, boolean includeYesDecisions, ShardsAllocator shardAllocator)
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>