Dear all,
I found an interesting problem when I use Trident, please kindly help.
Even there is no operation in spout.execute() command, Storm UI still shows
that lots of tuples being emitted. Please refer to the Screenshot attached.
Also the source code is shown below ( the source codes might not be exact
the same as in eclipse because of the format problem, it is to show logic):
tpy.newStream("bbb", new BaseRichSpout() {
@Override
public void declareOutputFields(OutputFieldsDeclarer declarer) {
declarer.declare(new Fields("lines"));
}
@Override
public void open(Map conf, TopologyContext context, SpoutOutputCollector
collector) {
// TODO Auto-generated method stub
}
@Override
public void nextTuple() {
// TODO Auto-generated method stub
}
}).each(new Fields("lines"), new Filter() {
@Override
public void prepare(Map conf, TridentOperationContext context) {
// TODO Auto-generated method stub
}
@Override
public void cleanup() {
// TODO Auto-generated method stub
}
@Override
public boolean isKeep(TridentTuple tuple) {
System.out.println(tuple);
return false;
}
});
Thank you very much!
Regards,
Sai