You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Rick Kellogg (JIRA)" <ji...@apache.org> on 2015/10/05 02:51:26 UTC

[jira] [Updated] (STORM-932) Trident RichSpoutBatchExecutor emit batch

     [ https://issues.apache.org/jira/browse/STORM-932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Kellogg updated STORM-932:
-------------------------------
    Component/s: storm-core

> Trident RichSpoutBatchExecutor  emit batch
> ------------------------------------------
>
>                 Key: STORM-932
>                 URL: https://issues.apache.org/jira/browse/STORM-932
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-core
>            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)