diff --git a/storm-client/src/jvm/org/apache/storm/executor/Executor.java b/storm-client/src/jvm/org/apache/storm/executor/Executor.java index ef4d057d0f9..b0e078a547b 100644 --- a/storm-client/src/jvm/org/apache/storm/executor/Executor.java +++ b/storm-client/src/jvm/org/apache/storm/executor/Executor.java @@ -278,6 +278,8 @@ public void accept(Object event) { int taskId = addressedTuple.getDest(); TupleImpl tuple = (TupleImpl) addressedTuple.getTuple(); + String streamId = tuple.getSourceStreamId(); + boolean isSpout = this instanceof SpoutExecutor; if (isDebug) { LOG.info("Processing received TUPLE: {} for TASK: {} ", tuple, taskId); } @@ -285,6 +287,9 @@ public void accept(Object event) { try { if (taskId != AddressedTuple.BROADCAST_DEST) { tupleActionFn(taskId, tuple); + } else if (isSpout && streamId.equals(Constants.SYSTEM_TICK_STREAM_ID)) { + //taskId is irrelevant here. Ensures pending.rotate() is called once per tick. + tupleActionFn(taskIds.get(0), tuple); } else { for (Integer t : taskIds) { tupleActionFn(t, tuple);