Module org.elasticsearch.server
Package org.elasticsearch.index.reindex
Class BulkByScrollTask.Status
java.lang.Object
org.elasticsearch.index.reindex.BulkByScrollTask.Status
- All Implemented Interfaces:
NamedWriteable
,Writeable
,SuccessfullyProcessed
,Task.Status
,ToXContent
,ToXContentObject
- Enclosing class:
- BulkByScrollTask
public static class BulkByScrollTask.Status
extends Object
implements Task.Status, SuccessfullyProcessed
Status of the reindex, update by query, or delete by query. While in
general we allow Task.Status implementations to make
backwards incompatible changes to their
ToXContent.toXContent(org.elasticsearch.xcontent.XContentBuilder, org.elasticsearch.xcontent.ToXContent.Params)
implementations, this one has become defacto standardized because Kibana
parses it. As such, we should be very careful about removing things from
this.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
XContent param name to indicate if "created" count must be included in the response.static final String
XContent param name to indicate if "updated" count must be included in the response.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionStatus
(Integer sliceId, long total, long updated, long created, long deleted, int batches, long versionConflicts, long noops, long bulkRetries, long searchRetries, TimeValue throttled, float requestsPerSecond, String reasonCancelled, TimeValue throttledUntil) Status
(List<BulkByScrollTask.StatusOrException> sliceStatuses, String reasonCancelled) Constructor merging many statuses.Status
(StreamInput in) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
equalsWithoutSliceStatus
(Object o, boolean includeUpdated, boolean includeCreated) int
Number of scan responses this request has processed.long
Number of retries that had to be attempted due to bulk actions being rejected.long
Count of documents created.long
Count of successful delete operations.long
getNoops()
Number of noops (skipped bulk items) as part of this request.The reason that the request was canceled or null if it hasn't been.float
The number of requests per second to which to throttle the request.long
Number of retries that had to be attempted due to search actions being rejected.Statuses of the sub requests into which this sub-request was sliced.The total time this request has throttled itself not including the current throttle time if it is currently sleeping.Remaining delay of any current throttle sleep or 0 if not sleeping.long
getTotal()
The total number of documents this request will process.long
Count of documents updated.long
Number of version conflicts this request has hit.Returns the name of the writeable objectint
hashCode()
void
innerToString
(StringBuilder builder) innerXContent
(XContentBuilder builder, ToXContent.Params params) toString()
toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.index.reindex.SuccessfullyProcessed
getSuccessfullyProcessed
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
- See Also:
-
INCLUDE_CREATED
XContent param name to indicate if "created" count must be included in the response.- See Also:
-
INCLUDE_UPDATED
XContent param name to indicate if "updated" count must be included in the response.- See Also:
-
SLICE_ID_FIELD
- See Also:
-
TOTAL_FIELD
- See Also:
-
UPDATED_FIELD
- See Also:
-
CREATED_FIELD
- See Also:
-
DELETED_FIELD
- See Also:
-
BATCHES_FIELD
- See Also:
-
VERSION_CONFLICTS_FIELD
- See Also:
-
NOOPS_FIELD
- See Also:
-
RETRIES_FIELD
- See Also:
-
RETRIES_BULK_FIELD
- See Also:
-
RETRIES_SEARCH_FIELD
- See Also:
-
THROTTLED_RAW_FIELD
- See Also:
-
THROTTLED_HR_FIELD
- See Also:
-
REQUESTS_PER_SEC_FIELD
- See Also:
-
CANCELED_FIELD
- See Also:
-
THROTTLED_UNTIL_RAW_FIELD
- See Also:
-
THROTTLED_UNTIL_HR_FIELD
- See Also:
-
SLICES_FIELD
- See Also:
-
FIELDS_SET
-
-
Constructor Details
-
Status
-
Status
public Status(List<BulkByScrollTask.StatusOrException> sliceStatuses, @Nullable String reasonCancelled) Constructor merging many statuses.- Parameters:
sliceStatuses
- Statuses of sub requests that this task was sliced into.reasonCancelled
- Reason that this *this* task was cancelled. Note that each entry insliceStatuses
can be cancelled independently of this task but if this task is cancelled then the workers *should* be cancelled.
-
Status
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
getWriteableName
Description copied from interface:NamedWriteable
Returns the name of the writeable object- Specified by:
getWriteableName
in interfaceNamedWriteable
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
innerXContent
public XContentBuilder innerXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Throws:
IOException
-
toString
-
innerToString
-
getTotal
public long getTotal()The total number of documents this request will process. 0 means we don't yet know or, possibly, there are actually 0 documents to process. Its ok that these have the same meaning because any request with 0 actual documents should be quite short lived. -
getUpdated
public long getUpdated()Description copied from interface:SuccessfullyProcessed
Count of documents updated.- Specified by:
getUpdated
in interfaceSuccessfullyProcessed
-
getCreated
public long getCreated()Description copied from interface:SuccessfullyProcessed
Count of documents created.- Specified by:
getCreated
in interfaceSuccessfullyProcessed
-
getDeleted
public long getDeleted()Description copied from interface:SuccessfullyProcessed
Count of successful delete operations.- Specified by:
getDeleted
in interfaceSuccessfullyProcessed
-
getBatches
public int getBatches()Number of scan responses this request has processed. -
getVersionConflicts
public long getVersionConflicts()Number of version conflicts this request has hit. -
getNoops
public long getNoops()Number of noops (skipped bulk items) as part of this request. -
getBulkRetries
public long getBulkRetries()Number of retries that had to be attempted due to bulk actions being rejected. -
getSearchRetries
public long getSearchRetries()Number of retries that had to be attempted due to search actions being rejected. -
getThrottled
The total time this request has throttled itself not including the current throttle time if it is currently sleeping. -
getRequestsPerSecond
public float getRequestsPerSecond()The number of requests per second to which to throttle the request. Float.POSITIVE_INFINITY means unlimited. -
getReasonCancelled
The reason that the request was canceled or null if it hasn't been. -
getThrottledUntil
Remaining delay of any current throttle sleep or 0 if not sleeping. -
getSliceStatuses
Statuses of the sub requests into which this sub-request was sliced. Empty if this request wasn't sliced into sub-requests. -
hashCode
public int hashCode() -
equalsWithoutSliceStatus
-
equals
-