use of com.alibaba.jstorm.transactional.spout.BasicTransactionSpout in project jstorm by alibaba.
the class TransactionTopologyBuilder method setSpout.
public SpoutDeclarer setSpout(String id, ITransactionSpoutExecutor spout, Number parallelism_hint) {
upToDownstreamComponentsMap.put(id, new HashSet<String>());
IRichSpout spoutExecutor = new BasicTransactionSpout((ITransactionSpoutExecutor) spout);
return super.setSpout(id, spoutExecutor, parallelism_hint);
}
use of com.alibaba.jstorm.transactional.spout.BasicTransactionSpout in project jstorm by alibaba.
the class TransactionTopologyBuilder method setSpout.
private SpoutDeclarer setSpout(String id, IRichSpout spout, Number parallelismHint, boolean isSchedule) {
upToDownstreamComponentsMap.put(id, new HashSet<String>());
IRichSpout spoutExecutor;
if (spout instanceof IBasicTransactionSpoutExecutor) {
spoutExecutor = new BasicTransactionSpout((IBasicTransactionSpoutExecutor) spout);
} else if (!isSchedule) {
spoutExecutor = new BasicTransactionSpout((ITransactionSpoutExecutor) spout);
} else {
spoutExecutor = new ScheduleTransactionSpout((ITransactionSpoutExecutor) spout);
}
SpoutDeclarer ret = super.setSpout(id, spoutExecutor, parallelismHint);
return ret;
}
Aggregations