Github user satishd commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2241#discussion_r129217706
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/executor/spout/SpoutExecutor.java ---
    @@ -105,19 +107,21 @@ public void expire(Long key, TupleInfo tupleInfo) {
                 }
             });
     
    -        this.spoutThrottlingMetrics.registerAll(topoConf, 
idToTask.values().iterator().next().getUserContext());
    +        this.spoutThrottlingMetrics.registerAll(topoConf, 
idToTask.get(taskIds.get(0)).getUserContext());
             this.outputCollectors = new ArrayList<>();
    -        for (Map.Entry<Integer, Task> entry : idToTask.entrySet()) {
    -            Task taskData = entry.getValue();
    +        for (int i=0; i<idToTask.size(); ++i) {
    --- End diff --
    
    Why did we replace with this instead of using foreach with 
`idToTask.entrySet()` as that does not need any map lookups?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to