public class NullTerminatingSpout extends Object implements FiniteSpout
NullTerminatingSpout
in a finite spout (ie, implements FiniteSpout
interface) that wraps an
infinite spout, and returns true
in reachedEnd()
when the wrapped spout does not emit a tuple
in nextTuple()
for the first time.Constructor and Description |
---|
NullTerminatingSpout(org.apache.storm.topology.IRichSpout spout) |
Modifier and Type | Method and Description |
---|---|
void |
ack(Object msgId) |
void |
activate() |
void |
close() |
void |
deactivate() |
void |
declareOutputFields(org.apache.storm.topology.OutputFieldsDeclarer declarer) |
void |
fail(Object msgId) |
Map<String,Object> |
getComponentConfiguration() |
void |
nextTuple() |
void |
open(Map conf,
org.apache.storm.task.TopologyContext context,
org.apache.storm.spout.SpoutOutputCollector collector) |
boolean |
reachedEnd()
When returns true, the spout has reached the end of the stream.
|
public NullTerminatingSpout(org.apache.storm.topology.IRichSpout spout)
public void open(Map conf, org.apache.storm.task.TopologyContext context, org.apache.storm.spout.SpoutOutputCollector collector)
open
in interface org.apache.storm.spout.ISpout
public void close()
close
in interface org.apache.storm.spout.ISpout
public void activate()
activate
in interface org.apache.storm.spout.ISpout
public void deactivate()
deactivate
in interface org.apache.storm.spout.ISpout
public void nextTuple()
nextTuple
in interface org.apache.storm.spout.ISpout
public void ack(Object msgId)
ack
in interface org.apache.storm.spout.ISpout
public void fail(Object msgId)
fail
in interface org.apache.storm.spout.ISpout
public void declareOutputFields(org.apache.storm.topology.OutputFieldsDeclarer declarer)
declareOutputFields
in interface org.apache.storm.topology.IComponent
public Map<String,Object> getComponentConfiguration()
getComponentConfiguration
in interface org.apache.storm.topology.IComponent
public boolean reachedEnd()
FiniteSpout
reachedEnd
in interface FiniteSpout
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.