java.lang.Object
org.elasticsearch.action.bulk.ShardBulkSplitHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic Tuple<BulkShardResponse, Exception> combineResponses(BulkShardRequest originalRequest, Map<ShardId, BulkShardRequest> splitRequests, Map<ShardId, Tuple<BulkShardResponse, Exception>> responses) static Map<ShardId, BulkShardRequest> splitRequests(BulkShardRequest request, ProjectMetadata project) Splits a bulk request into multiple requests for each shard.
-
Method Details
-
splitRequests
public static Map<ShardId,BulkShardRequest> splitRequests(BulkShardRequest request, ProjectMetadata project) Splits a bulk request into multiple requests for each shard. If the items in the request only route to the source shard it will return the original request. If the items only route to the target shard it will return a map with one request. If the requests route to both the map will have a request for each shard. -
combineResponses
public static Tuple<BulkShardResponse,Exception> combineResponses(BulkShardRequest originalRequest, Map<ShardId, BulkShardRequest> splitRequests, Map<ShardId, Tuple<BulkShardResponse, Exception>> responses)
-