public abstract class AbstractBulkByScrollRequest<Self extends AbstractBulkByScrollRequest<Self>>
extends org.elasticsearch.action.ActionRequest<Self>
| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE_ALL_MATCHES |
| Constructor and Description |
|---|
AbstractBulkByScrollRequest() |
AbstractBulkByScrollRequest(org.elasticsearch.action.search.SearchRequest source) |
| Modifier and Type | Method and Description |
|---|---|
org.elasticsearch.tasks.Task |
createTask(long id,
java.lang.String type,
java.lang.String action,
org.elasticsearch.tasks.TaskId parentTaskId) |
int |
getMaxRetries()
Total number of retries attempted for rejections.
|
float |
getRequestsPerSecond()
The throttle for this request in sub-requests per second.
|
org.elasticsearch.common.unit.TimeValue |
getRetryBackoffInitialTime()
Initial delay after a rejection before retrying request.
|
org.elasticsearch.action.search.SearchRequest |
getSearchRequest()
The search request that matches the documents to process.
|
boolean |
getShouldStoreResult() |
int |
getSize()
Maximum number of processed documents.
|
org.elasticsearch.common.unit.TimeValue |
getTimeout()
Timeout to wait for the shards on to be available for each bulk request?
|
org.elasticsearch.action.support.ActiveShardCount |
getWaitForActiveShards()
The number of shard copies that must be active before proceeding with the write.
|
boolean |
isAbortOnVersionConflict()
Should version conflicts cause aborts? Defaults to false.
|
boolean |
isRefresh()
Call refresh on the indexes we've written to after the request ends?
|
void |
readFrom(org.elasticsearch.common.io.stream.StreamInput in) |
protected void |
searchToString(java.lang.StringBuilder b)
Append a short description of the search request to a StringBuilder.
|
protected abstract Self |
self()
`this` cast to Self.
|
Self |
setAbortOnVersionConflict(boolean abortOnVersionConflict)
Should version conflicts cause aborts? Defaults to false.
|
void |
setConflicts(java.lang.String conflicts)
Sets abortOnVersionConflict based on REST-friendly names.
|
Self |
setMaxRetries(int maxRetries)
Set the total number of retries attempted for rejections.
|
Self |
setRefresh(boolean refresh)
Call refresh on the indexes we've written to after the request ends?
|
Self |
setRequestsPerSecond(float requestsPerSecond)
Set the throttle for this request in sub-requests per second.
|
Self |
setRetryBackoffInitialTime(org.elasticsearch.common.unit.TimeValue retryBackoffInitialTime)
Set the initial delay after a rejection before retrying request.
|
Self |
setShouldStoreResult(boolean shouldStoreResult)
Should this task store its result after it has finished?
|
Self |
setSize(int size)
Maximum number of processed documents.
|
Self |
setTimeout(org.elasticsearch.common.unit.TimeValue timeout)
Timeout to wait for the shards on to be available for each bulk request?
|
Self |
setWaitForActiveShards(org.elasticsearch.action.support.ActiveShardCount activeShardCount)
Sets the number of shard copies that must be active before proceeding with the write.
|
Self |
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. |
org.elasticsearch.action.ActionRequestValidationException |
validate() |
void |
writeTo(org.elasticsearch.common.io.stream.StreamOutput out) |
getDescription, getParentTask, setParentTask, setParentTaskpublic static final int SIZE_ALL_MATCHES
public AbstractBulkByScrollRequest()
public AbstractBulkByScrollRequest(org.elasticsearch.action.search.SearchRequest source)
protected abstract Self self()
public org.elasticsearch.action.ActionRequestValidationException validate()
validate in class org.elasticsearch.action.ActionRequest<Self extends AbstractBulkByScrollRequest<Self>>public int getSize()
public Self setSize(int size)
public boolean isAbortOnVersionConflict()
public Self setAbortOnVersionConflict(boolean abortOnVersionConflict)
public void setConflicts(java.lang.String conflicts)
public org.elasticsearch.action.search.SearchRequest getSearchRequest()
public boolean isRefresh()
public Self setRefresh(boolean refresh)
public org.elasticsearch.common.unit.TimeValue getTimeout()
public Self setTimeout(org.elasticsearch.common.unit.TimeValue timeout)
public org.elasticsearch.action.support.ActiveShardCount getWaitForActiveShards()
public Self setWaitForActiveShards(org.elasticsearch.action.support.ActiveShardCount activeShardCount)
ReplicationRequest.waitForActiveShards(ActiveShardCount) for details.public Self 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 org.elasticsearch.common.unit.TimeValue getRetryBackoffInitialTime()
public Self setRetryBackoffInitialTime(org.elasticsearch.common.unit.TimeValue retryBackoffInitialTime)
public int getMaxRetries()
public Self setMaxRetries(int maxRetries)
public float getRequestsPerSecond()
Float.POSITIVE_INFINITY means set no throttle and that is the
default. Throttling is done between batches, as we start the next scroll requests. That way we can increase the scroll's timeout to
make sure that it contains any time that we might wait.public Self setRequestsPerSecond(float requestsPerSecond)
Float.POSITIVE_INFINITY means set no throttle and that is the
default. Throttling is done between batches, as we start the next scroll requests. That way we can increase the scroll's timeout to
make sure that it contains any time that we might wait.public Self setShouldStoreResult(boolean shouldStoreResult)
public boolean getShouldStoreResult()
getShouldStoreResult in class org.elasticsearch.action.ActionRequest<Self extends AbstractBulkByScrollRequest<Self>>public org.elasticsearch.tasks.Task createTask(long id,
java.lang.String type,
java.lang.String action,
org.elasticsearch.tasks.TaskId parentTaskId)
createTask in class org.elasticsearch.transport.TransportRequestpublic void readFrom(org.elasticsearch.common.io.stream.StreamInput in)
throws java.io.IOException
readFrom in interface org.elasticsearch.common.io.stream.StreamablereadFrom in class org.elasticsearch.action.ActionRequest<Self extends AbstractBulkByScrollRequest<Self>>java.io.IOExceptionpublic void writeTo(org.elasticsearch.common.io.stream.StreamOutput out)
throws java.io.IOException
writeTo in interface org.elasticsearch.common.io.stream.StreamablewriteTo in class org.elasticsearch.action.ActionRequest<Self extends AbstractBulkByScrollRequest<Self>>java.io.IOExceptionprotected void searchToString(java.lang.StringBuilder b)