IndicesRequest, AckedRequest, Streamable, Writeable, ToXContent, ToXContentObject, TaskAwareRequestpublic class ResizeRequest extends AcknowledgedRequest<ResizeRequest> implements IndicesRequest, ToXContentObject
IndicesRequest.ReplaceableToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsTransportRequest.EmptyWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static ObjectParser<ResizeRequest,java.lang.Void> |
PARSER |
DEFAULT_ACK_TIMEOUT, timeoutDEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeoutEMPTY_PARAMS| Constructor | Description |
|---|---|
ResizeRequest(java.lang.String targetIndex,
java.lang.String sourceIndex) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
fromXContent(XContentParser parser) |
|
ResizeType |
getResizeType() |
Returns the type of the resize operation
|
java.lang.String |
getSourceIndex() |
Returns the source index name
|
CreateIndexRequest |
getTargetIndexRequest() |
Returns the
CreateIndexRequest for the shrink index |
java.lang.String[] |
indices() |
Returns the array of indices that the action relates to
|
IndicesOptions |
indicesOptions() |
Returns the indices options used to resolve indices.
|
void |
readFrom(StreamInput in) |
Set this object's fields from a StreamInput.
|
void |
setResizeType(ResizeType type) |
The type of the resize operation
|
void |
setSourceIndex(java.lang.String index) |
|
void |
setTargetIndex(CreateIndexRequest targetIndexRequest) |
|
void |
setWaitForActiveShards(int waitForActiveShards) |
A shortcut for
setWaitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount. |
void |
setWaitForActiveShards(ActiveShardCount waitForActiveShards) |
Sets the number of shard copies that should be active for creation of the
new shrunken index to return.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
ActionRequestValidationException |
validate() |
|
void |
writeTo(StreamOutput out) |
Write this object's fields to a StreamOutput.
|
masterNodeTimeoutackTimeout, timeout, timeout, timeoutgetShouldStoreResultmasterNodeTimeout, masterNodeTimeout, masterNodeTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateTask, getDescription, setParentTaskisFragmentremoteAddress, remoteAddressgetParentTask, setParentTaskpublic static final ObjectParser<ResizeRequest,java.lang.Void> PARSER
public ResizeRequest(java.lang.String targetIndex,
java.lang.String sourceIndex)
public ActionRequestValidationException validate()
validate in class ActionRequestpublic void setSourceIndex(java.lang.String index)
public void readFrom(StreamInput in) throws java.io.IOException
StreamablereadFrom in interface StreamablereadFrom in class AcknowledgedRequest<ResizeRequest>java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
StreamablewriteTo in interface StreamablewriteTo in interface WriteablewriteTo in class AcknowledgedRequest<ResizeRequest>java.io.IOExceptionpublic java.lang.String[] indices()
IndicesRequestindices in interface IndicesRequestpublic IndicesOptions indicesOptions()
IndicesRequestindicesOptions in interface IndicesRequestpublic void setTargetIndex(CreateIndexRequest targetIndexRequest)
public CreateIndexRequest getTargetIndexRequest()
CreateIndexRequest for the shrink indexpublic java.lang.String getSourceIndex()
public void setWaitForActiveShards(ActiveShardCount waitForActiveShards)
ActiveShardCount.DEFAULT, which will
wait for one shard copy (the primary) to become active. Set this value to
ActiveShardCount.ALL to wait for all shards (primary and all replicas) to be active
before returning. Otherwise, use ActiveShardCount.from(int) to set this value to any
non-negative integer, up to the number of copies per shard (number of replicas + 1),
to wait for the desired amount of shard copies to become active before returning.
Index creation will only wait up until the timeout value for the number of shard copies
to be active before returning. Check ShardsAcknowledgedResponse.isShardsAcknowledged() to
determine if the requisite shard copies were all started before returning or timing out.waitForActiveShards - number of active shard copies to wait onpublic void setWaitForActiveShards(int waitForActiveShards)
setWaitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount.public void setResizeType(ResizeType type)
public ResizeType getResizeType()
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionpublic void fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException