Class ElasticsearchSink.Builder<T>

    • Constructor Summary

      Constructors 
      Constructor Description
      Builder​(List<org.apache.http.HttpHost> httpHosts, org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkFunction<T> elasticsearchSinkFunction)
      Deprecated.
      Creates a new ElasticsearchSink that connects to the cluster using a RestHighLevelClient.
    • Constructor Detail

      • Builder

        public Builder​(List<org.apache.http.HttpHost> httpHosts,
                       org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkFunction<T> elasticsearchSinkFunction)
        Deprecated.
        Creates a new ElasticsearchSink that connects to the cluster using a RestHighLevelClient.
        Parameters:
        httpHosts - The list of HttpHost to which the RestHighLevelClient connects to.
        elasticsearchSinkFunction - This is used to generate multiple ActionRequest from 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 failed ActionRequest.
      • 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.
      • equals

        public boolean equals​(Object o)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object