- All Implemented Interfaces:
org.apache.lucene.util.Accountable,IndicesRequest,WriteRequest<BulkShardRequest>,Writeable,RefCounted,TaskAwareRequest,RawIndexingDataTransportRequest
public final class BulkShardRequest
extends ReplicatedWriteRequest<BulkShardRequest>
implements org.apache.lucene.util.Accountable, RawIndexingDataTransportRequest
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.RemoteClusterShardRequest, IndicesRequest.Replaceable, IndicesRequest.SingleIndexNoWildcardsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>Nested classes/interfaces inherited from interface org.elasticsearch.action.support.WriteRequest
WriteRequest.RefreshPolicy -
Field Summary
Fields inherited from class org.elasticsearch.action.support.replication.ReplicationRequest
DEFAULT_TIMEOUT, index, shardId, timeout, waitForActiveShardsFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLEFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
ConstructorsConstructorDescriptionBulkShardRequest(ShardId shardId, WriteRequest.RefreshPolicy refreshPolicy, BulkItemRequest[] items) BulkShardRequest(ShardId shardId, WriteRequest.RefreshPolicy refreshPolicy, BulkItemRequest[] items, boolean isSimulated) -
Method Summary
Modifier and TypeMethodDescriptionConsumes the inference metadata to execute inference on the bulk items just once.Returns optional description of the request to be displayed by the task managerPublic for testString[]indices()Returns the array of indices that the action relates tobooleanitems()voidonRetry()This method is called before this replication request is retried the first time.longprotected BulkShardRequestroutedBasedOnClusterVersion(long routedBasedOnClusterVersion) Sets the minimum version of the cluster state that is required on the next node before we redirect to another primary.voidsetInferenceFieldMap(Map<String, InferenceFieldMetadata> fieldInferenceMap) Public for test Set the transient metadata indicating that this request requires running inference before proceeding.toString()longvoidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.replication.ReplicatedWriteRequest
getRefreshPolicy, setRefreshPolicy, writeThinMethods inherited from class org.elasticsearch.action.support.replication.ReplicationRequest
createTask, index, index, indicesOptions, shardId, timeout, timeout, validate, waitForActiveShards, waitForActiveShards, waitForActiveShardsMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, getRequestId, setParentTask, setRequestIdMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResourcesMethods inherited from interface org.elasticsearch.action.IndicesRequest
includeDataStreamsMethods inherited from interface org.elasticsearch.transport.RawIndexingDataTransportRequest
isRawIndexingDataMethods inherited from interface org.elasticsearch.core.RefCounted
mustIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
setParentTaskMethods inherited from interface org.elasticsearch.action.support.WriteRequest
setRefreshPolicy, validate
-
Constructor Details
-
BulkShardRequest
- Throws:
IOException
-
BulkShardRequest
public BulkShardRequest(ShardId shardId, WriteRequest.RefreshPolicy refreshPolicy, BulkItemRequest[] items) -
BulkShardRequest
public BulkShardRequest(ShardId shardId, WriteRequest.RefreshPolicy refreshPolicy, BulkItemRequest[] items, boolean isSimulated)
-
-
Method Details
-
setInferenceFieldMap
Public for test Set the transient metadata indicating that this request requires running inference before proceeding. -
consumeInferenceFieldMap
Consumes the inference metadata to execute inference on the bulk items just once. -
getInferenceFieldMap
Public for test -
totalSizeInBytes
public long totalSizeInBytes() -
items
-
indices
Description copied from interface:IndicesRequestReturns the array of indices that the action relates to- Specified by:
indicesin interfaceIndicesRequest- Overrides:
indicesin classReplicationRequest<BulkShardRequest>
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classReplicatedWriteRequest<BulkShardRequest>- Throws:
IOException
-
toString
- Specified by:
toStringin classReplicationRequest<BulkShardRequest>
-
getDescription
Description copied from interface:TaskAwareRequestReturns optional description of the request to be displayed by the task manager- Specified by:
getDescriptionin interfaceTaskAwareRequest- Overrides:
getDescriptionin classReplicationRequest<BulkShardRequest>
-
routedBasedOnClusterVersion
Description copied from class:ReplicationRequestSets the minimum version of the cluster state that is required on the next node before we redirect to another primary. Used to prevent redirect loops, see alsoAbstractRunnable.doRun()- Overrides:
routedBasedOnClusterVersionin classReplicationRequest<BulkShardRequest>
-
onRetry
public void onRetry()Description copied from class:ReplicationRequestThis method is called before this replication request is retried the first time.- Overrides:
onRetryin classReplicationRequest<BulkShardRequest>
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-
isSimulated
public boolean isSimulated()
-