You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Shyam Rajendran (JIRA)" <ji...@apache.org> on 2015/07/10 16:05:04 UTC
[jira] [Created] (STORM-932) Trident RichSpoutBatchExecutor emit
batch
Shyam Rajendran created STORM-932:
-------------------------------------
Summary: Trident RichSpoutBatchExecutor emit batch
Key: STORM-932
URL: https://issues.apache.org/jira/browse/STORM-932
Project: Apache Storm
Issue Type: Bug
Reporter: Shyam Rajendran
Priority: Trivial
While working on support to make pending tuple count available for Spouts, we noticed that the emitBatch code actually waits for two tuple misses to break of the loop instead of one.
```
for(int i=0; i<_maxBatchSize; i++) {
_spout.nextTuple();
if(_collector.numEmitted < i) {
break;
}
}
idsMap.put(txid, _collector.ids);
```
As the numEmitted is incremented for every tuple emitted, the condition to check for missed tuple could have been better put as
_collector.numEmitted == i instead. This would break the loop when a single tuple in the batch missed proper emit.
Kindly confirm if this behaviour is as expected.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)