Class EsIndexTopology.UserDataSpout
java.lang.Object
org.apache.storm.topology.base.BaseComponent
org.apache.storm.topology.base.BaseRichSpout
org.apache.storm.elasticsearch.bolt.EsIndexTopology.UserDataSpout
- All Implemented Interfaces:
Serializable
,ISpout
,IComponent
,IRichSpout
- Enclosing class:
- EsIndexTopology
The user data spout.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Acknowledges the message with idmsgId
.void
declareOutputFields
(OutputFieldsDeclarer declarer) Declaressource
,index
,type
andid
.void
Marks the message with idmsgId
as failed.void
Makes the spout emit the next tuple, if any.void
open
(Map<String, Object> config, TopologyContext context, SpoutOutputCollector collectorArg) Acquirescollector
and initializespending
.Methods inherited from class org.apache.storm.topology.base.BaseRichSpout
activate, close, deactivate
Methods inherited from class org.apache.storm.topology.base.BaseComponent
getComponentConfiguration
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.storm.topology.IComponent
getComponentConfiguration
-
Constructor Details
-
UserDataSpout
public UserDataSpout()
-
-
Method Details
-
declareOutputFields
Declaressource
,index
,type
andid
.- Parameters:
declarer
- the declarer to pass to
-
open
public void open(Map<String, Object> config, TopologyContext context, SpoutOutputCollector collectorArg) Acquirescollector
and initializespending
.- Parameters:
config
- unusedcontext
- unusedcollectorArg
- the collector to acquire
-
nextTuple
public void nextTuple()Makes the spout emit the next tuple, if any. -
ack
Acknowledges the message with idmsgId
.- Specified by:
ack
in interfaceISpout
- Overrides:
ack
in classBaseRichSpout
- Parameters:
msgId
- the message id
-
fail
Marks the message with idmsgId
as failed.- Specified by:
fail
in interfaceISpout
- Overrides:
fail
in classBaseRichSpout
- Parameters:
msgId
- the message id
-