org.apache.flume.sink.elasticsearch
Class ElasticSearchDynamicSerializer
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElasticSearchDynamicSerializer
public ElasticSearchDynamicSerializer()
configure
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
configure
public void configure(ComponentConfiguration conf)
- Specified by:
configure
in interface ConfigurableComponent
getContentBuilder
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
- Parameters:
event
- The flume event to serialize
- Returns:
- A
BytesStream
used to write to ElasticSearch
- Throws:
IOException
- If an error occurs during serialization
Copyright © 2009-2013 Apache Software Foundation. All Rights Reserved.