T
- Type of the elements handled by the sink this builder creates.Elasticsearch7SinkBuilder
.@Deprecated @PublicEvolving public static class ElasticsearchSink.Builder<T> extends Object
ElasticsearchSink
.Constructor and Description |
---|
Builder(List<org.apache.http.HttpHost> httpHosts,
ElasticsearchSinkFunction<T> elasticsearchSinkFunction)
Deprecated.
Creates a new
ElasticsearchSink that connects to the cluster using a RestHighLevelClient . |
Modifier and Type | Method and Description |
---|---|
ElasticsearchSink<T> |
build()
Deprecated.
Creates the Elasticsearch sink.
|
boolean |
equals(Object o)
Deprecated.
|
int |
hashCode()
Deprecated.
|
void |
setBulkFlushBackoff(boolean enabled)
Deprecated.
Sets whether or not to enable bulk flush backoff behaviour.
|
void |
setBulkFlushBackoffDelay(long delayMillis)
Deprecated.
Sets the amount of delay between each backoff attempt when flushing bulk requests, in
milliseconds.
|
void |
setBulkFlushBackoffRetries(int maxRetries)
Deprecated.
Sets the maximum number of retries for a backoff attempt when flushing bulk requests.
|
void |
setBulkFlushBackoffType(ElasticsearchSinkBase.FlushBackoffType flushBackoffType)
Deprecated.
Sets the type of back of to use when flushing bulk requests.
|
void |
setBulkFlushInterval(long intervalMillis)
Deprecated.
Sets the bulk flush interval, in milliseconds.
|
void |
setBulkFlushMaxActions(int numMaxActions)
Deprecated.
Sets the maximum number of actions to buffer for each bulk request.
|
void |
setBulkFlushMaxSizeMb(int maxSizeMb)
Deprecated.
Sets the maximum size of buffered actions, in mb, per bulk request.
|
void |
setFailureHandler(ActionRequestFailureHandler failureHandler)
Deprecated.
Sets a failure handler for action requests.
|
void |
setRestClientFactory(RestClientFactory restClientFactory)
Deprecated.
Sets a REST client factory for custom client configuration.
|
public Builder(List<org.apache.http.HttpHost> httpHosts, ElasticsearchSinkFunction<T> elasticsearchSinkFunction)
ElasticsearchSink
that connects to the cluster using a RestHighLevelClient
.httpHosts
- The list of HttpHost
to which the RestHighLevelClient
connects to.elasticsearchSinkFunction
- This is used to generate multiple ActionRequest
from the incoming element.public void setBulkFlushMaxActions(int numMaxActions)
numMaxActions
- the maximum number of actions to buffer per bulk request.public void setBulkFlushMaxSizeMb(int maxSizeMb)
maxSizeMb
- the maximum size of buffered actions, in mb.public void setBulkFlushInterval(long intervalMillis)
intervalMillis
- the bulk flush interval, in milliseconds.public void setBulkFlushBackoff(boolean enabled)
enabled
- whether or not to enable backoffs.public void setBulkFlushBackoffType(ElasticsearchSinkBase.FlushBackoffType flushBackoffType)
flushBackoffType
- the backoff type to use.public void setBulkFlushBackoffRetries(int maxRetries)
maxRetries
- the maximum number of retries for a backoff attempt when flushing bulk
requestspublic void setBulkFlushBackoffDelay(long delayMillis)
delayMillis
- the amount of delay between each backoff attempt when flushing bulk
requests, in milliseconds.public void setFailureHandler(ActionRequestFailureHandler failureHandler)
failureHandler
- This is used to handle failed ActionRequest
.public void setRestClientFactory(RestClientFactory restClientFactory)
restClientFactory
- the factory that configures the rest client.public ElasticsearchSink<T> build()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.