@Internal public class Elasticsearch1ApiCallBridge extends Object implements ElasticsearchApiCallBridge
ElasticsearchApiCallBridge
for Elasticsearch 1.x.Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Perform any necessary state cleanup.
|
void |
configureBulkProcessorBackoff(org.elasticsearch.action.bulk.BulkProcessor.Builder builder,
ElasticsearchSinkBase.BulkFlushBackoffPolicy flushBackoffPolicy)
Set backoff-related configurations on the provided
BulkProcessor.Builder . |
org.elasticsearch.client.Client |
createClient(Map<String,String> clientConfig)
Creates an Elasticsearch
Client . |
Throwable |
extractFailureCauseFromBulkItemResponse(org.elasticsearch.action.bulk.BulkItemResponse bulkItemResponse)
Extracts the cause of failure of a bulk item action.
|
public org.elasticsearch.client.Client createClient(Map<String,String> clientConfig)
ElasticsearchApiCallBridge
Client
.createClient
in interface ElasticsearchApiCallBridge
clientConfig
- The configuration to use when constructing the client.public Throwable extractFailureCauseFromBulkItemResponse(org.elasticsearch.action.bulk.BulkItemResponse bulkItemResponse)
ElasticsearchApiCallBridge
extractFailureCauseFromBulkItemResponse
in interface ElasticsearchApiCallBridge
bulkItemResponse
- the bulk item response to extract cause of failureThrowable
from the response (null
is the response is successful).public void configureBulkProcessorBackoff(org.elasticsearch.action.bulk.BulkProcessor.Builder builder, @Nullable ElasticsearchSinkBase.BulkFlushBackoffPolicy flushBackoffPolicy)
ElasticsearchApiCallBridge
BulkProcessor.Builder
.
The builder will be later on used to instantiate the actual BulkProcessor
.configureBulkProcessorBackoff
in interface ElasticsearchApiCallBridge
builder
- the BulkProcessor.Builder
to configure.flushBackoffPolicy
- user-provided backoff retry settings (null
if the user disabled backoff retries).public void cleanup()
ElasticsearchApiCallBridge
cleanup
in interface ElasticsearchApiCallBridge
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.