public class EsPercolateBolt extends AbstractEsBolt
Basic bolt for retrieve matched percolate queries.
client, collector
Constructor and Description |
---|
EsPercolateBolt(EsConfig esConfig,
EsTupleMapper tupleMapper)
EsPercolateBolt constructor
|
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) |
void |
execute(Tuple tuple)
Tuple should have relevant fields (source, index, type) for storeMapper to extract ES document.
If there exists non-empty percolate response, EsPercolateBolt will emit tuple with original source and Percolate.Match for each Percolate.Match in PercolateResponse. |
void |
prepare(Map map,
TopologyContext topologyContext,
OutputCollector outputCollector) |
cleanup
getComponentConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentConfiguration
public EsPercolateBolt(EsConfig esConfig, EsTupleMapper tupleMapper)
EsPercolateBolt 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) for storeMapper to extract ES document.
If there exists non-empty percolate response, EsPercolateBolt will emit tuple with original source and Percolate.Match for each Percolate.Match in PercolateResponse.
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.