public class EventSerializerIndexRequestBuilderFactory extends AbstractElasticSearchIndexRequestBuilderFactory
ElasticSearchIndexRequestBuilderFactory.
 It serializes flume events using the
 ElasticSearchEventSerializer instance configured on the sink.| Modifier and Type | Field and Description | 
|---|---|
| protected ElasticSearchEventSerializer | serializer | 
fastDateFormatdf| Modifier | Constructor and Description | 
|---|---|
|   | EventSerializerIndexRequestBuilderFactory(ElasticSearchEventSerializer serializer) | 
| protected  | EventSerializerIndexRequestBuilderFactory(ElasticSearchEventSerializer serializer,
                                         org.apache.commons.lang.time.FastDateFormat fdf) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | configure(ComponentConfiguration config) | 
| void | configure(Context context)
 Request the implementing class to (re)configure itself. | 
| protected void | prepareIndexRequest(org.elasticsearch.action.index.IndexRequestBuilder indexRequest,
                   String indexName,
                   String indexType,
                   Event event)Prepares an ElasticSearch  IndexRequestBuilderinstance | 
createIndexRequest, getIndexNameprotected final ElasticSearchEventSerializer serializer
public EventSerializerIndexRequestBuilderFactory(ElasticSearchEventSerializer serializer)
protected EventSerializerIndexRequestBuilderFactory(ElasticSearchEventSerializer serializer, org.apache.commons.lang.time.FastDateFormat fdf)
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 Configurableconfigure in class AbstractElasticSearchIndexRequestBuilderFactoryConfigurablepublic void configure(ComponentConfiguration config)
configure in interface ConfigurableComponentconfigure in class AbstractElasticSearchIndexRequestBuilderFactoryConfigurableComponentprotected void prepareIndexRequest(org.elasticsearch.action.index.IndexRequestBuilder indexRequest,
                                   String indexName,
                                   String indexType,
                                   Event event)
                            throws IOException
AbstractElasticSearchIndexRequestBuilderFactoryIndexRequestBuilder instanceprepareIndexRequest in class AbstractElasticSearchIndexRequestBuilderFactoryindexRequest - The (empty) ElasticSearch IndexRequestBuilder to prepareindexName - Index name to use -- as per AbstractElasticSearchIndexRequestBuilderFactory.getIndexName(String, long)indexType - Index type to use -- as configured on the sinkevent - Flume event to serialize and add to index requestIOException - If an error occurs e.g. during serializationCopyright © 2009-2017 Apache Software Foundation. All Rights Reserved.