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

    https://github.com/apache/storm/pull/1199#discussion_r55854466
  
    --- Diff: storm-core/src/jvm/org/apache/storm/trident/TridentTopology.java 
---
    @@ -394,11 +395,28 @@ public StormTopology build() {
             Map<Node, String> spoutIds = genSpoutIds(spoutNodes);
             Map<Group, String> boltIds = genBoltIds(mergedGroups);
             
    +        Map defaults = Utils.readDefaultConfig();
    +
             for(SpoutNode sn: spoutNodes) {
                 Integer parallelism = parallelisms.get(grouper.nodeGroup(sn));
    +
    +            Map<String, Number> spoutRes = null;
    +            if(sn instanceof ITridentResource) {
    +                spoutRes = 
mergeDefaultResources(((ITridentResource)sn).getResources(), defaults);
    +            }
    +            else {
    +                spoutRes = mergeDefaultResources(null, defaults);
    +            }
    --- End diff --
    
    Good catch. I think we can ignore the null check even, though. We don't 
insert nulls into the spoutNodes collection, and if there were some in there 
somehow, lots of stuff would blow up.


---
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