public class ElasticBulkRequest extends Object
It performs the necessary actions depending on its success or failure.
In case of error, it will request th elastic output node to re-trigger
a second re-indexation into an error index. That second indexation is taken care of
by a ElasticErrorBulkRequest
instance.
Constructor and Description |
---|
ElasticBulkRequest(ElasticsearchOutput output,
org.elasticsearch.client.RestHighLevelClient client,
org.elasticsearch.action.bulk.BulkRequest bulkRequest,
ElasticDocument[] documents,
int bulkEffectiveSize) |
Modifier and Type | Method and Description |
---|---|
void |
execute(com.codahale.metrics.Timer.Context timer,
com.codahale.metrics.Counter batchNumber,
org.thales.punch.libraries.utils.api.Every every) |
ElasticBulkRequest |
setBulkFailureHandler(FailureHandler handler) |
ElasticBulkRequest |
setFailedDocumentReindexation(boolean b) |
ElasticBulkRequest |
setFailedDocumentReindexationForMappingExceptionsOnly(boolean b) |
ElasticBulkRequest |
setFailTupleWhenErrorNotIndexed(boolean b) |
ElasticBulkRequest |
setUnavailabilityFailureHandler(FailureHandler handler) |
public ElasticBulkRequest(ElasticsearchOutput output, org.elasticsearch.client.RestHighLevelClient client, org.elasticsearch.action.bulk.BulkRequest bulkRequest, ElasticDocument[] documents, int bulkEffectiveSize)
public void execute(com.codahale.metrics.Timer.Context timer, com.codahale.metrics.Counter batchNumber, org.thales.punch.libraries.utils.api.Every every)
public ElasticBulkRequest setFailedDocumentReindexation(boolean b)
public ElasticBulkRequest setFailedDocumentReindexationForMappingExceptionsOnly(boolean b)
public ElasticBulkRequest setFailTupleWhenErrorNotIndexed(boolean b)
public ElasticBulkRequest setBulkFailureHandler(FailureHandler handler)
public ElasticBulkRequest setUnavailabilityFailureHandler(FailureHandler handler)
Copyright © 2022. All rights reserved.