IN - type of the records converted to Elasticsearch actions@PublicEvolving public abstract class ElasticsearchSinkBuilderBase<IN,B extends ElasticsearchSinkBuilderBase<IN,B>> extends Object
ElasticsearchSink.| Modifier and Type | Field and Description |
|---|---|
protected ElasticsearchEmitter<? super IN> |
emitter |
| Modifier | Constructor and Description |
|---|---|
protected |
ElasticsearchSinkBuilderBase() |
| Modifier and Type | Method and Description |
|---|---|
ElasticsearchSink<IN> |
build()
Constructs the
ElasticsearchSink with the properties configured this builder. |
protected abstract org.apache.flink.connector.elasticsearch.sink.BulkProcessorBuilderFactory |
getBulkProcessorBuilderFactory() |
protected <S extends ElasticsearchSinkBuilderBase<?,?>> |
self() |
B |
setBulkFlushBackoffStrategy(FlushBackoffType flushBackoffType,
int maxRetries,
long delayMillis)
Sets the type of back off to use when flushing bulk requests.
|
B |
setBulkFlushInterval(long intervalMillis)
Sets the bulk flush interval, in milliseconds.
|
B |
setBulkFlushMaxActions(int numMaxActions)
Sets the maximum number of actions to buffer for each bulk request.
|
B |
setBulkFlushMaxSizeMb(int maxSizeMb)
Sets the maximum size of buffered actions, in mb, per bulk request.
|
B |
setConnectionPassword(String password)
Sets the password used to authenticate the conection with the Elasticsearch cluster.
|
B |
setConnectionPathPrefix(String prefix)
Sets a prefix which used for every REST communication to the Elasticsearch cluster.
|
B |
setConnectionRequestTimeout(int timeout)
Sets the timeout for requesting the connection of the Elasticsearch cluster from the
connection manager.
|
B |
setConnectionTimeout(int timeout)
Sets the timeout for establishing a connection of the Elasticsearch cluster.
|
B |
setConnectionUsername(String username)
Sets the username used to authenticate the connection with the Elasticsearch cluster.
|
B |
setDeliveryGuarantee(org.apache.flink.connector.base.DeliveryGuarantee deliveryGuarantee)
Sets the wanted
DeliveryGuarantee. |
<T extends IN> |
setEmitter(ElasticsearchEmitter<? super T> emitter)
Sets the emitter which is invoked on every record to convert it to Elasticsearch actions.
|
B |
setHosts(org.apache.http.HttpHost... hosts)
Sets the hosts where the Elasticsearch cluster nodes are reachable.
|
B |
setSocketTimeout(int timeout)
Sets the timeout for waiting for data or, put differently, a maximum period inactivity
between two consecutive data packets.
|
String |
toString() |
protected ElasticsearchEmitter<? super IN> emitter
protected <S extends ElasticsearchSinkBuilderBase<?,?>> S self()
public <T extends IN> ElasticsearchSinkBuilderBase<T,?> setEmitter(ElasticsearchEmitter<? super T> emitter)
emitter - to process records into Elasticsearch actions.public B setHosts(org.apache.http.HttpHost... hosts)
hosts - http addresses describing the node locationspublic B setDeliveryGuarantee(org.apache.flink.connector.base.DeliveryGuarantee deliveryGuarantee)
DeliveryGuarantee. The default delivery guarantee is DeliveryGuarantee.NONEdeliveryGuarantee - which describes the record emission behaviourpublic B setBulkFlushMaxActions(int numMaxActions)
numMaxActions - the maximum number of actions to buffer per bulk request.public B setBulkFlushMaxSizeMb(int maxSizeMb)
maxSizeMb - the maximum size of buffered actions, in mb.public B setBulkFlushInterval(long intervalMillis)
intervalMillis - the bulk flush interval, in milliseconds.public B setBulkFlushBackoffStrategy(FlushBackoffType flushBackoffType, int maxRetries, long delayMillis)
FlushBackoffType.NONE.
Sets the amount of delay between each backoff attempt when flushing bulk requests, in milliseconds.
Sets the maximum number of retries for a backoff attempt when flushing bulk requests.
flushBackoffType - the backoff type to use.public B setConnectionUsername(String username)
username - of the Elasticsearch cluster userpublic B setConnectionPassword(String password)
password - of the Elasticsearch cluster userpublic B setConnectionPathPrefix(String prefix)
prefix - for the communicationpublic B setConnectionRequestTimeout(int timeout)
timeout - for the connection requestpublic B setConnectionTimeout(int timeout)
timeout - for the connectionpublic B setSocketTimeout(int timeout)
timeout - for the socketprotected abstract org.apache.flink.connector.elasticsearch.sink.BulkProcessorBuilderFactory getBulkProcessorBuilderFactory()
public ElasticsearchSink<IN> build()
ElasticsearchSink with the properties configured this builder.ElasticsearchSinkCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.