public class BulkRequest extends Object
BulkRequest
class from the high level client.
However, this had limitations: the actual requests going to ES can't be retrieved later as everything is package-protected and final.
We do need the original requests to schedule a new job for those that have failed.
The alternative would be rebuilding the requests, but this is more expensive resource-wise,
but definitely maintenance-wise: it would mean the logic would need to be implemented twice instead of in one place
(which is of course more error-prone: with this implementation we simply take the original bulk requests and store them in the job
without any additional processing. See the BulkIndexRequestExecutorImpl
class for that implementation).Modifier and Type | Field and Description |
---|---|
protected List<BulkRequestItem> |
bulkRequestItems |
Constructor and Description |
---|
BulkRequest() |
Modifier and Type | Method and Description |
---|---|
void |
addBulkRequestItem(BulkRequestItem bulkRequestItem) |
protected String |
concatenate(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
BulkRequestItem bulkRequestItem,
ElasticsearchCompatibility elasticsearchCompatibility) |
List<BulkRequestItem> |
getBulkRequestItems() |
String |
serialize(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
ElasticsearchCompatibility elasticsearchCompatibility) |
void |
setBulkRequestItems(List<BulkRequestItem> bulkRequestItems) |
protected List<BulkRequestItem> bulkRequestItems
public void addBulkRequestItem(BulkRequestItem bulkRequestItem)
public String serialize(com.fasterxml.jackson.databind.ObjectMapper objectMapper, ElasticsearchCompatibility elasticsearchCompatibility)
protected String concatenate(com.fasterxml.jackson.databind.ObjectMapper objectMapper, BulkRequestItem bulkRequestItem, ElasticsearchCompatibility elasticsearchCompatibility)
public List<BulkRequestItem> getBulkRequestItems()
public void setBulkRequestItems(List<BulkRequestItem> bulkRequestItems)