public class ClusterAllocationExplainRequest extends MasterNodeRequest<ClusterAllocationExplainRequest>
TransportRequest.Empty
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
Constructor and Description |
---|
ClusterAllocationExplainRequest()
Create a new allocation explain request to explain any unassigned shard in the cluster.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCurrentNode()
Returns the node holding the replica shard to be explained.
|
java.lang.String |
getIndex()
Returns the index name of the shard to explain, or
null to use any unassigned shard (see useAnyUnassignedShard() ). |
java.lang.Integer |
getShard()
Returns the shard id of the shard to explain, or
null to use any unassigned shard (see useAnyUnassignedShard() ). |
boolean |
includeDiskInfo()
Returns
true if information about disk usage and shard sizes should also be returned. |
void |
includeDiskInfo(boolean includeDiskInfo)
Set to
true to include information about the gathered disk information of nodes in the cluster. |
boolean |
includeYesDecisions()
Returns
true if yes decisions should be included. |
void |
includeYesDecisions(boolean includeYesDecisions)
Set to
true to include yes decisions for a particular node. |
java.lang.Boolean |
isPrimary()
Returns
true if explaining the primary shard for the shard id (see getShard() ),
false if explaining a replica shard copy for the shard id, or null to use any
unassigned shard (see useAnyUnassignedShard() ). |
static ClusterAllocationExplainRequest |
parse(XContentParser parser) |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
ClusterAllocationExplainRequest |
setCurrentNode(java.lang.String currentNodeId)
Requests the explain API to explain an already assigned replica shard currently allocated to
the given node.
|
ClusterAllocationExplainRequest |
setIndex(java.lang.String index)
Sets the index name of the shard to explain.
|
ClusterAllocationExplainRequest |
setPrimary(java.lang.Boolean primary)
Sets whether to explain the allocation of the primary shard or a replica shard copy
for the shard id (see
getShard() ). |
ClusterAllocationExplainRequest |
setShard(java.lang.Integer shard)
Sets the shard id of the shard to explain.
|
java.lang.String |
toString() |
boolean |
useAnyUnassignedShard()
Returns
true iff the first unassigned shard is to be used |
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
getShouldStoreResult
getParentTask, setParentTask
remoteAddress, remoteAddress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createTask, getDescription, setParentTask
public ClusterAllocationExplainRequest()
public ActionRequestValidationException validate()
validate
in class ActionRequest
public boolean useAnyUnassignedShard()
true
iff the first unassigned shard is to be usedpublic ClusterAllocationExplainRequest setIndex(java.lang.String index)
@Nullable public java.lang.String getIndex()
null
to use any unassigned shard (see useAnyUnassignedShard()
).public ClusterAllocationExplainRequest setShard(java.lang.Integer shard)
@Nullable public java.lang.Integer getShard()
null
to use any unassigned shard (see useAnyUnassignedShard()
).public ClusterAllocationExplainRequest setPrimary(java.lang.Boolean primary)
getShard()
).@Nullable public java.lang.Boolean isPrimary()
true
if explaining the primary shard for the shard id (see getShard()
),
false
if explaining a replica shard copy for the shard id, or null
to use any
unassigned shard (see useAnyUnassignedShard()
).public ClusterAllocationExplainRequest setCurrentNode(java.lang.String currentNodeId)
@Nullable public java.lang.String getCurrentNode()
null
if any replica shard
can be explained.public void includeYesDecisions(boolean includeYesDecisions)
true
to include yes decisions for a particular node.public boolean includeYesDecisions()
true
if yes decisions should be included. Otherwise only "no" and "throttle"
decisions are returned.public void includeDiskInfo(boolean includeDiskInfo)
true
to include information about the gathered disk information of nodes in the cluster.public boolean includeDiskInfo()
true
if information about disk usage and shard sizes should also be returned.public java.lang.String toString()
toString
in class java.lang.Object
public static ClusterAllocationExplainRequest parse(XContentParser parser) throws java.io.IOException
java.io.IOException
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class MasterNodeRequest<ClusterAllocationExplainRequest>
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class MasterNodeRequest<ClusterAllocationExplainRequest>
java.io.IOException