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

    https://github.com/apache/storm/pull/921#discussion_r47696526
  
    --- Diff: storm-core/src/jvm/backtype/storm/scheduler/Cluster.java ---
    @@ -560,14 +619,29 @@ public void 
updateAssignedMemoryForTopologyAndSupervisor(Topologies topologies)
             }
         }
     
    +    /**
    +     * set scheduler status for a topology
    +     */
    +    private static final Logger LOG = LoggerFactory
    +            .getLogger(Cluster.class);
         public void setStatus(String topologyId, String status) {
             this.status.put(topologyId, status);
         }
     
    +    /**
    +     * Get all schedule statuses
    +     */
         public Map<String, String> getStatusMap() {
             return this.status;
         }
     
    +    /**
    +     * set scheduler status map
    +     */
    +    public void setStatusMap(Map<String, String> statusMap) {
    +        this.status.putAll(statusMap);
    +    }
    --- End diff --
    
    This is named like a setter method, but it does not set the status map to 
what is in `statusMap`, it overrides any entries present in both. Suggest we 
rename it or change it to replace the current map.


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