}
Runnable runnable = null;
if (event instanceof Tuple) {
Tuple tuple = (Tuple) event;
Object id = tuple.getValue(0);
Object obj = pending.remove((Long) id);
if (obj == null ) {
if (isDebug) {
LOG.info("Pending map no entry:" + id );
}
return;
}
TupleInfo tupleInfo = (TupleInfo) obj;
String stream_id = tuple.getSourceStreamId();
if (stream_id.equals(Acker.ACKER_ACK_STREAM_ID)) {
runnable = new AckSpoutMsg(spout, tupleInfo, task_stats,
isDebug);
} else if (stream_id.equals(Acker.ACKER_FAIL_STREAM_ID)) {
runnable = new FailSpoutMsg(id, spout, tupleInfo, task_stats,
isDebug);
} else {
LOG.warn("Receive one unknow source Tuple " + idStr);
return;
}
task_stats.recv_tuple(tuple.getSourceComponent(),
tuple.getSourceStreamId());
} else if (event instanceof TimeTick.Tick) {
Map<Long, TupleInfo> timeoutMap = pending.rotate();
for (java.util.Map.Entry<Long, TupleInfo> entry : timeoutMap