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

    https://github.com/apache/storm/pull/921#discussion_r47699211
  
    --- Diff: storm-core/src/clj/backtype/storm/daemon/nimbus.clj ---
    @@ -843,13 +847,14 @@
     
             supervisors (read-all-supervisor-details nimbus 
all-scheduling-slots supervisor->dead-ports)
             cluster (Cluster. (:inimbus nimbus) supervisors 
topology->scheduler-assignment conf)
    -
    +        _ (.setStatusMap cluster (deref (:id->sched-status nimbus)))
             ;; call scheduler.schedule to schedule all the topologies
             ;; the new assignments for all the topologies are in the cluster 
object.
             _ (.schedule (:scheduler nimbus) topologies cluster)
             _ (.setResourcesMap cluster @(:id->resources nimbus))
             _ (if-not (conf SCHEDULER-DISPLAY-RESOURCE) 
(.updateAssignedMemoryForTopologyAndSupervisor cluster topologies))
    -        _ (reset! (:id->sched-status nimbus) (.getStatusMap cluster))
    +        ;;merge with existing statuses
    +        _ (reset! (:id->sched-status nimbus) (merge (deref 
(:id->sched-status nimbus)) (.getStatusMap cluster)))
    --- End diff --
    
    This code will merge the diff of the statuses so that the scheduler doesn't 
have to set the status for a topology every time.  Since a user may want to set 
a custom message based on the results of the scheduling strategy, we don't want 
to run the strategy every time to get that message.  We want to be able to just 
set a status once and let it persist


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