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

    https://github.com/apache/incubator-apex-core/pull/203#discussion_r49879967
  
    --- Diff: 
engine/src/main/java/com/datatorrent/stram/StreamingContainerManager.java ---
    @@ -1027,6 +1027,19 @@ public int processEvents()
             }
           }
           o.stats.lastWindowedStats = stats;
    +      if (!o.stats.responses.isEmpty()) {
    +        if (o.stats.operatorResponses == null) {
    +          o.stats.operatorResponses = new ArrayList<>();
    +        } else {
    +          o.stats.operatorResponses.clear();
    +        }
    +        StatsListener.OperatorResponse operatorResponse;
    +        while ((operatorResponse = o.stats.responses.poll()) != null) {
    +          o.stats.operatorResponses.add(operatorResponse);
    +        }
    +      } else {
    +        o.stats.operatorResponses = null;
    --- End diff --
    
    That's what I thought the intention was, but in this case benefits are 
negligible. Why do we set it to null in the else block? To avoid more if then 
else clutter? ;-)


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to