Class ElasticSearchDynamicSerializer

  extended by org.apache.flume.sink.elasticsearch.ElasticSearchDynamicSerializer
All Implemented Interfaces:
Configurable, ConfigurableComponent, ElasticSearchEventSerializer

public class ElasticSearchDynamicSerializer
extends Object
implements ElasticSearchEventSerializer

Basic serializer that serializes the event body and header fields into individual fields

A best effort will be used to determine the content-type, if it cannot be determined fields will be indexed as Strings

Field Summary
Fields inherited from interface org.apache.flume.sink.elasticsearch.ElasticSearchEventSerializer
Constructor Summary
Method Summary
 void configure(ComponentConfiguration conf)
 void configure(Context context)
           Request the implementing class to (re)configure itself.
 org.elasticsearch.common.xcontent.XContentBuilder getContentBuilder(Event event)
          Return an BytesStream made up of the serialized flume event
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ElasticSearchDynamicSerializer()
Method Detail


public void configure(Context context)
Description copied from interface: Configurable

Request 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 guarrantees on when configure might be called.

Specified by:
configure in interface Configurable


public void configure(ComponentConfiguration conf)
Specified by:
configure in interface ConfigurableComponent


public org.elasticsearch.common.xcontent.XContentBuilder getContentBuilder(Event event)
                                                                    throws IOException
Description copied from interface: ElasticSearchEventSerializer
Return an BytesStream made up of the serialized flume event

Specified by:
getContentBuilder in interface ElasticSearchEventSerializer
event - The flume event to serialize
A BytesStream used to write to ElasticSearch
IOException - If an error occurs during serialization

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