Class ClusterAllocationExplainRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.master.MasterNodeRequest<ClusterAllocationExplainRequest>
org.elasticsearch.action.admin.cluster.allocation.ClusterAllocationExplainRequest
- All Implemented Interfaces:
- Writeable,- org.elasticsearch.core.RefCounted,- TaskAwareRequest
public class ClusterAllocationExplainRequest
extends MasterNodeRequest<ClusterAllocationExplainRequest>
A request to explain the allocation of a shard in the cluster
- 
Nested Class SummaryNested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequestTransportRequest.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.WriteableWriteable.Reader<V>, Writeable.Writer<V>
- 
Field SummaryFields inherited from class org.elasticsearch.action.support.master.MasterNodeRequestDEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new allocation explain request to explain any unassigned shard in the cluster.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the node holding the replica shard to be explained.getIndex()Returns the index name of the shard to explain, ornullto use any unassigned shard (seeuseAnyUnassignedShard()).getShard()Returns the shard id of the shard to explain, ornullto use any unassigned shard (seeuseAnyUnassignedShard()).booleanReturnstrueif information about disk usage and shard sizes should also be returned.voidincludeDiskInfo(boolean includeDiskInfo)Set totrueto include information about the gathered disk information of nodes in the cluster.booleanReturnstrueif yes decisions should be included.voidincludeYesDecisions(boolean includeYesDecisions)Set totrueto include yes decisions for a particular node.Returnstrueif explaining the primary shard for the shard id (seegetShard()),falseif explaining a replica shard copy for the shard id, ornullto use any unassigned shard (seeuseAnyUnassignedShard()).parse(org.elasticsearch.common.xcontent.XContentParser parser)setCurrentNode(String currentNodeId)Requests the explain API to explain an already assigned replica shard currently allocated to the given node.Sets the index name of the shard to explain.setPrimary(Boolean primary)Sets whether to explain the allocation of the primary shard or a replica shard copy for the shard id (seegetShard()).Sets the shard id of the shard to explain.toString()booleanReturnstrueiff the first unassigned shard is to be usedvalidate()voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequestmasterNodeTimeout, masterNodeTimeout, masterNodeTimeoutMethods inherited from class org.elasticsearch.action.ActionRequestgetShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequestgetParentTask, setParentTaskMethods inherited from class org.elasticsearch.transport.TransportMessagedecRef, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequestcreateTask, getDescription, setParentTask
- 
Constructor Details- 
ClusterAllocationExplainRequestpublic ClusterAllocationExplainRequest()Create a new allocation explain request to explain any unassigned shard in the cluster.
- 
ClusterAllocationExplainRequest- Throws:
- IOException
 
 
- 
- 
Method Details- 
writeToDescription copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
- writeToin interface- Writeable
- Overrides:
- writeToin class- MasterNodeRequest<ClusterAllocationExplainRequest>
- Throws:
- IOException
 
- 
validate- Specified by:
- validatein class- ActionRequest
 
- 
useAnyUnassignedShardpublic boolean useAnyUnassignedShard()Returnstrueiff the first unassigned shard is to be used
- 
setIndexSets the index name of the shard to explain.
- 
getIndexReturns the index name of the shard to explain, ornullto use any unassigned shard (seeuseAnyUnassignedShard()).
- 
setShardSets the shard id of the shard to explain.
- 
getShardReturns the shard id of the shard to explain, ornullto use any unassigned shard (seeuseAnyUnassignedShard()).
- 
setPrimarySets whether to explain the allocation of the primary shard or a replica shard copy for the shard id (seegetShard()).
- 
isPrimaryReturnstrueif explaining the primary shard for the shard id (seegetShard()),falseif explaining a replica shard copy for the shard id, ornullto use any unassigned shard (seeuseAnyUnassignedShard()).
- 
setCurrentNodeRequests the explain API to explain an already assigned replica shard currently allocated to the given node.
- 
getCurrentNodeReturns the node holding the replica shard to be explained. Returnsnullif any replica shard can be explained.
- 
includeYesDecisionspublic void includeYesDecisions(boolean includeYesDecisions)Set totrueto include yes decisions for a particular node.
- 
includeYesDecisionspublic boolean includeYesDecisions()Returnstrueif yes decisions should be included. Otherwise only "no" and "throttle" decisions are returned.
- 
includeDiskInfopublic void includeDiskInfo(boolean includeDiskInfo)Set totrueto include information about the gathered disk information of nodes in the cluster.
- 
includeDiskInfopublic boolean includeDiskInfo()Returnstrueif information about disk usage and shard sizes should also be returned.
- 
toString- Overrides:
- toStringin class- TransportRequest
 
- 
parsepublic static ClusterAllocationExplainRequest parse(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
- IOException
 
 
-