public class EsIndexBolt extends AbstractEsBolt
Basic bolt for storing tuple to ES document.
client, collector
Constructor and Description |
---|
EsIndexBolt(EsConfig esConfig,
EsTupleMapper tupleMapper)
EsIndexBolt constructor
|
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) |
void |
execute(Tuple tuple)
Tuple should have relevant fields (source, index, type, id) for tupleMapper to extract ES document.
|
void |
prepare(Map map,
TopologyContext topologyContext,
OutputCollector outputCollector) |
cleanup
getComponentConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentConfiguration
public EsIndexBolt(EsConfig esConfig, EsTupleMapper tupleMapper)
EsIndexBolt constructor
esConfig
- Elasticsearch configuration containing node addresses and cluster name EsConfig
tupleMapper
- Tuple to ES document mapper EsTupleMapper
public void prepare(Map map, TopologyContext topologyContext, OutputCollector outputCollector)
prepare
in interface IBolt
prepare
in class AbstractEsBolt
public void execute(Tuple tuple)
Tuple should have relevant fields (source, index, type, id) for tupleMapper to extract ES document.
execute
in interface IBolt
execute
in class AbstractEsBolt
public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer)
declareOutputFields
in interface IComponent
declareOutputFields
in class AbstractEsBolt
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.