org.apache.flume.sink.elasticsearch.client
Interface ElasticSearchClient

All Superinterfaces:
Configurable
All Known Implementing Classes:
ElasticSearchRestClient, ElasticSearchTransportClient

public interface ElasticSearchClient
extends Configurable

Interface for an ElasticSearch client which is responsible for sending bulks of events to ElasticSearch.


Method Summary
 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 execute()
          Sends bulk to the elasticsearch cluster
 
Methods inherited from interface org.apache.flume.conf.Configurable
configure
 

Method Detail

close

void close()
Close connection to elastic search in client


addEvent

void addEvent(Event event,
              IndexNameBuilder indexNameBuilder,
              String indexType,
              long ttlMs)
              throws Exception
Add new event to the bulk

Parameters:
event - Flume Event
indexNameBuilder - Index name builder which generates name of index to feed
indexType - Name of type of document which will be sent to the elasticsearch cluster
ttlMs - Time to live expressed in milliseconds. Value <= 0 is ignored
Throws:
Exception

execute

void execute()
             throws Exception
Sends bulk to the elasticsearch cluster

Throws:
Exception


Copyright © 2009-2015 Apache Software Foundation. All Rights Reserved.