org.apache.flume.sink.elasticsearch
Interface ElasticSearchIndexRequestBuilderFactory
- All Superinterfaces:
- Configurable, ConfigurableComponent
- All Known Implementing Classes:
- AbstractElasticSearchIndexRequestBuilderFactory, EventSerializerIndexRequestBuilderFactory
public interface ElasticSearchIndexRequestBuilderFactory
- extends Configurable, ConfigurableComponent
Interface for creating ElasticSearch IndexRequestBuilder
instances from serialized flume events. This is configurable, so any config
params required should be taken through this.
Field Summary |
static org.apache.commons.lang.time.FastDateFormat |
df
|
Method Summary |
org.elasticsearch.action.index.IndexRequestBuilder |
createIndexRequest(org.elasticsearch.client.Client client,
String indexPrefix,
String indexType,
Event event)
|
df
static final org.apache.commons.lang.time.FastDateFormat df
createIndexRequest
org.elasticsearch.action.index.IndexRequestBuilder createIndexRequest(org.elasticsearch.client.Client client,
String indexPrefix,
String indexType,
Event event)
throws IOException
- Parameters:
client
- ElasticSearch Client
to prepare index fromindexPrefix
- Prefix of index name to use -- as configured on the sinkindexType
- Index type to use -- as configured on the sinkevent
- Flume event to serialize and add to index request
- Returns:
- prepared ElasticSearch
IndexRequestBuilder
instance
- Throws:
IOException
- If an error occurs e.g. during serialization
Copyright © 2009-2013 Apache Software Foundation. All Rights Reserved.