[
https://issues.apache.org/jira/browse/STORM-932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shyam Rajendran updated STORM-932:
----------------------------------
Assignee: (was: Shyam Rajendran)
> 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)