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

    https://github.com/apache/storm/pull/2113#discussion_r120648513
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/trident/operation/DefaultResourceDeclarer.java
 ---
    @@ -29,8 +33,8 @@
      */
     public class DefaultResourceDeclarer<T extends DefaultResourceDeclarer> 
implements ResourceDeclarer<T>, ITridentResource {
     
    -    private Map<String, Number> resources = new HashMap<>();
    -    private static Map<String, Object> conf = Utils.readStormConfig();
    +    private final transient Map<String, Number> resources = new 
HashMap<>();
    --- End diff --
    
    In trident Node inherits from DefaultResourceDeclarer, and Node is 
serialized out (repeatedly for different bolts and spouts in the topology).  
These are never used after the topology is created so this reduces the 
serialized size of a trident topology.
    
    I'll add a comment in the code to make it clean why.


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