public class EsLookupBolt extends AbstractEsBolt
Basic bolt for looking up document in ES.
client, collector, objectMapper
Constructor and Description |
---|
EsLookupBolt(EsConfig esConfig)
EsLookupBolt constructor.
|
EsLookupBolt(EsConfig esConfig,
EsTupleMapper tupleMapper,
EsLookupResultOutput output)
EsLookupBolt constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer)
Declare the output schema for all the streams of this topology.
|
void |
process(Tuple tuple)
Process a single non-tick tuple of input.
|
prepare
execute, onTickTuple
cleanup
getComponentConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentConfiguration
public EsLookupBolt(EsConfig esConfig)
EsLookupBolt constructor.
esConfig
- Elasticsearch configuration containing node addresses EsConfig
NullPointerException
- if any of the parameters is nullpublic EsLookupBolt(EsConfig esConfig, EsTupleMapper tupleMapper, EsLookupResultOutput output)
EsLookupBolt constructor.
esConfig
- Elasticsearch configuration containing node addresses EsConfig
tupleMapper
- Tuple to ES document mapper EsTupleMapper
output
- ES response to Values mapper EsLookupResultOutput
NullPointerException
- if any of the parameters is nullpublic void process(Tuple tuple)
BaseTickTupleAwareRichBolt
Process a single non-tick tuple of input. Implementation needs to handle ack manually. More details on IBolt.execute(Tuple)
.
process
in class BaseTickTupleAwareRichBolt
tuple
- The input tuple to be processed.public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer)
IComponent
Declare the output schema for all the streams of this topology.
declareOutputFields
in interface IComponent
declareOutputFields
in class AbstractEsBolt
outputFieldsDeclarer
- this is used to declare output stream ids, output fields, and whether or not each output stream is a direct streamCopyright © 2020 The Apache Software Foundation. All rights reserved.