@Internal public interface ElasticsearchApiCallBridge extends Serializable
ElasticsearchApiCallBridgeis used to bridge incompatible Elasticsearch Java API calls across different versions. This includes calls to create Elasticsearch clients, handle failed item responses, etc. Any incompatible Elasticsearch Java APIs should be bridged using this interface.
Implementations are allowed to be stateful. For example, for Elasticsearch 1.x, since connecting via an embedded node is allowed, the call bridge will hold reference to the created embedded node. Each instance of the sink will hold exactly one instance of the call bridge, and state cleanup is performed when the sink is closed.
|Modifier and Type||Method and Description|
Perform any necessary state cleanup.
Set backoff-related configurations on the provided
Creates an Elasticsearch
Extracts the cause of failure of a bulk item action.
clientConfig- The configuration to use when constructing the client.
@Nullable Throwable extractFailureCauseFromBulkItemResponse(org.elasticsearch.action.bulk.BulkItemResponse bulkItemResponse)
bulkItemResponse- the bulk item response to extract cause of failure
Throwablefrom the response (
nullis the response is successful).
void configureBulkProcessorBackoff(org.elasticsearch.action.bulk.BulkProcessor.Builder builder, @Nullable ElasticsearchSinkBase.BulkFlushBackoffPolicy flushBackoffPolicy)
BulkProcessor.Builder. The builder will be later on used to instantiate the actual
flushBackoffPolicy- user-provided backoff retry settings (
nullif the user disabled backoff retries).
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.