Class EsConfig

java.lang.Object
org.apache.storm.elasticsearch.common.EsConfig
All Implemented Interfaces:
Serializable

public class EsConfig extends Object implements Serializable
Configuration for Elasticsearch connection.
Since:
0.11
See Also:
  • Constructor Details

    • EsConfig

      public EsConfig()
      EsConfig Constructor to be used in EsIndexBolt, EsPercolateBolt and EsStateFactory. Connects to Elasticsearch at http://localhost:9200.
    • EsConfig

      public EsConfig(String... urls)
      EsConfig Constructor to be used in EsIndexBolt, EsPercolateBolt and EsStateFactory.
      Parameters:
      urls - Elasticsearch addresses in scheme://host:port pattern string array
      Throws:
      IllegalArgumentException - if urls are empty
      NullPointerException - on any of the fields being null
  • Method Details

    • withDefaultHeaders

      public EsConfig withDefaultHeaders(org.apache.http.Header[] defaultHeaders)
    • withFailureListener

      public EsConfig withFailureListener(org.elasticsearch.client.RestClient.FailureListener failureListener)
    • withHttpClientConfigCallback

      public EsConfig withHttpClientConfigCallback(org.elasticsearch.client.RestClientBuilder.HttpClientConfigCallback httpClientConfigCallback)
    • withRequestConfigCallback

      public EsConfig withRequestConfigCallback(org.elasticsearch.client.RestClientBuilder.RequestConfigCallback requestConfigCallback)
    • withPathPrefix

      public EsConfig withPathPrefix(String pathPrefix)
    • withCompression

      public EsConfig withCompression(boolean compression)
    • getHttpHosts

      public org.apache.http.HttpHost[] getHttpHosts()
    • getDefaultHeaders

      public org.apache.http.Header[] getDefaultHeaders()
    • getFailureListener

      public org.elasticsearch.client.RestClient.FailureListener getFailureListener()
    • getHttpClientConfigCallback

      public org.elasticsearch.client.RestClientBuilder.HttpClientConfigCallback getHttpClientConfigCallback()
    • getRequestConfigCallback

      public org.elasticsearch.client.RestClientBuilder.RequestConfigCallback getRequestConfigCallback()
    • getPathPrefix

      public String getPathPrefix()
    • isCompression

      public boolean isCompression()