use of com.alibaba.jstorm.transactional.spout.IBasicTransactionSpoutExecutor 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