Class EsConfig
java.lang.Object
org.apache.storm.elasticsearch.common.EsConfig
- All Implemented Interfaces:
Serializable
Configuration for Elasticsearch connection.
- Since:
- 0.11
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.http.Header[]
org.elasticsearch.client.RestClient.FailureListener
org.elasticsearch.client.RestClientBuilder.HttpClientConfigCallback
org.apache.http.HttpHost[]
org.elasticsearch.client.RestClientBuilder.RequestConfigCallback
withDefaultHeaders
(org.apache.http.Header[] defaultHeaders) withFailureListener
(org.elasticsearch.client.RestClient.FailureListener failureListener) withHttpClientConfigCallback
(org.elasticsearch.client.RestClientBuilder.HttpClientConfigCallback httpClientConfigCallback) withMaxRetryTimeoutMillis
(Integer maxRetryTimeoutMillis) withPathPrefix
(String pathPrefix) withRequestConfigCallback
(org.elasticsearch.client.RestClientBuilder.RequestConfigCallback requestConfigCallback)
-
Constructor Details
-
EsConfig
public EsConfig()EsConfig Constructor to be used in EsIndexBolt, EsPercolateBolt and EsStateFactory. Connects to Elasticsearch at http://localhost:9200. -
EsConfig
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 emptyNullPointerException
- on any of the fields being null
-
-
Method Details
-
withMaxRetryTimeoutMillis
-
withDefaultHeaders
-
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
-
getHttpHosts
public org.apache.http.HttpHost[] getHttpHosts() -
getMaxRetryTimeoutMillis
-
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
-