Class ElasticsearchSink.Builder<T>
- java.lang.Object
-
- org.apache.flink.streaming.connectors.elasticsearch7.ElasticsearchSink.Builder<T>
-
- Type Parameters:
T- Type of the elements handled by the sink this builder creates.
- Enclosing class:
- ElasticsearchSink<T>
@Deprecated @PublicEvolving public static class ElasticsearchSink.Builder<T> extends Object
Deprecated.This has been deprecated, please useElasticsearch7SinkBuilder.A builder for creating anElasticsearchSink.
-
-
Constructor Summary
Constructors Constructor Description Builder(List<org.apache.http.HttpHost> httpHosts, org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkFunction<T> elasticsearchSinkFunction)Deprecated.Creates a newElasticsearchSinkthat connects to the cluster using aRestHighLevelClient.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ElasticsearchSink<T>build()Deprecated.Creates the Elasticsearch sink.booleanequals(Object o)Deprecated.inthashCode()Deprecated.voidsetBulkFlushBackoff(boolean enabled)Deprecated.Sets whether or not to enable bulk flush backoff behaviour.voidsetBulkFlushBackoffDelay(long delayMillis)Deprecated.Sets the amount of delay between each backoff attempt when flushing bulk requests, in milliseconds.voidsetBulkFlushBackoffRetries(int maxRetries)Deprecated.Sets the maximum number of retries for a backoff attempt when flushing bulk requests.voidsetBulkFlushBackoffType(org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkBase.FlushBackoffType flushBackoffType)Deprecated.Sets the type of back of to use when flushing bulk requests.voidsetBulkFlushInterval(long intervalMillis)Deprecated.Sets the bulk flush interval, in milliseconds.voidsetBulkFlushMaxActions(int numMaxActions)Deprecated.Sets the maximum number of actions to buffer for each bulk request.voidsetBulkFlushMaxSizeMb(int maxSizeMb)Deprecated.Sets the maximum size of buffered actions, in mb, per bulk request.voidsetFailureHandler(org.apache.flink.streaming.connectors.elasticsearch.ActionRequestFailureHandler failureHandler)Deprecated.Sets a failure handler for action requests.voidsetRestClientFactory(RestClientFactory restClientFactory)Deprecated.Sets a REST client factory for custom client configuration.
-
-
-
Constructor Detail
-
Builder
public Builder(List<org.apache.http.HttpHost> httpHosts, org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkFunction<T> elasticsearchSinkFunction)
Deprecated.Creates a newElasticsearchSinkthat connects to the cluster using aRestHighLevelClient.- Parameters:
httpHosts- The list ofHttpHostto which theRestHighLevelClientconnects to.elasticsearchSinkFunction- This is used to generate multipleActionRequestfrom the incoming element.
-
-
Method Detail
-
setBulkFlushMaxActions
public void setBulkFlushMaxActions(int numMaxActions)
Deprecated.Sets the maximum number of actions to buffer for each bulk request. You can pass -1 to disable it.- Parameters:
numMaxActions- the maximum number of actions to buffer per bulk request.
-
setBulkFlushMaxSizeMb
public void setBulkFlushMaxSizeMb(int maxSizeMb)
Deprecated.Sets the maximum size of buffered actions, in mb, per bulk request. You can pass -1 to disable it.- Parameters:
maxSizeMb- the maximum size of buffered actions, in mb.
-
setBulkFlushInterval
public void setBulkFlushInterval(long intervalMillis)
Deprecated.Sets the bulk flush interval, in milliseconds. You can pass -1 to disable it.- Parameters:
intervalMillis- the bulk flush interval, in milliseconds.
-
setBulkFlushBackoff
public void setBulkFlushBackoff(boolean enabled)
Deprecated.Sets whether or not to enable bulk flush backoff behaviour.- Parameters:
enabled- whether or not to enable backoffs.
-
setBulkFlushBackoffType
public void setBulkFlushBackoffType(org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkBase.FlushBackoffType flushBackoffType)
Deprecated.Sets the type of back of to use when flushing bulk requests.- Parameters:
flushBackoffType- the backoff type to use.
-
setBulkFlushBackoffRetries
public void setBulkFlushBackoffRetries(int maxRetries)
Deprecated.Sets the maximum number of retries for a backoff attempt when flushing bulk requests.- Parameters:
maxRetries- the maximum number of retries for a backoff attempt when flushing bulk requests
-
setBulkFlushBackoffDelay
public void setBulkFlushBackoffDelay(long delayMillis)
Deprecated.Sets the amount of delay between each backoff attempt when flushing bulk requests, in milliseconds.- Parameters:
delayMillis- the amount of delay between each backoff attempt when flushing bulk requests, in milliseconds.
-
setFailureHandler
public void setFailureHandler(org.apache.flink.streaming.connectors.elasticsearch.ActionRequestFailureHandler failureHandler)
Deprecated.Sets a failure handler for action requests.- Parameters:
failureHandler- This is used to handle failedActionRequest.
-
setRestClientFactory
public void setRestClientFactory(RestClientFactory restClientFactory)
Deprecated.Sets a REST client factory for custom client configuration.- Parameters:
restClientFactory- the factory that configures the rest client.
-
build
public ElasticsearchSink<T> build()
Deprecated.Creates the Elasticsearch sink.- Returns:
- the created Elasticsearch sink.
-
-