public class ElasticSearchRestClient extends Object implements ElasticSearchClient
| Constructor and Description | 
|---|
| ElasticSearchRestClient(String[] hostNames,
                       ElasticSearchEventSerializer serializer) | 
| ElasticSearchRestClient(String[] hostNames,
                       ElasticSearchEventSerializer serializer,
                       org.apache.http.client.HttpClient client) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addEvent(Event event,
        IndexNameBuilder indexNameBuilder,
        String indexType,
        long ttlMs)Add new event to the bulk | 
| void | close()Close connection to elastic search in client | 
| void | configure(Context context)
 Request the implementing class to (re)configure itself. | 
| void | execute()Sends bulk to the elasticsearch cluster | 
public ElasticSearchRestClient(String[] hostNames, ElasticSearchEventSerializer serializer)
public ElasticSearchRestClient(String[] hostNames, ElasticSearchEventSerializer serializer, org.apache.http.client.HttpClient client)
public void configure(Context context)
ConfigurableRequest the implementing class to (re)configure itself.
When configuration parameters are changed, they must be reflected by the component asap.
There are no thread safety guarantees on when configure might be called.
configure in interface Configurablepublic void close()
ElasticSearchClientclose in interface ElasticSearchClientpublic void addEvent(Event event, IndexNameBuilder indexNameBuilder, String indexType, long ttlMs) throws Exception
ElasticSearchClientaddEvent in interface ElasticSearchClientevent - Flume EventindexNameBuilder - Index name builder which generates name of index to feedindexType - Name of type of document which will be sent to the elasticsearch clusterttlMs - Time to live expressed in milliseconds. Value <= 0 is ignoredExceptionpublic void execute()
             throws Exception
ElasticSearchClientexecute in interface ElasticSearchClientExceptionCopyright © 2009-2017 Apache Software Foundation. All Rights Reserved.