[ 
https://issues.apache.org/jira/browse/STORM-1450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15098863#comment-15098863
 ] 

ASF GitHub Bot commented on STORM-1450:
---------------------------------------

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

    https://github.com/apache/storm/pull/1016#discussion_r49785382
  
    --- Diff: storm-core/src/jvm/org/apache/storm/scheduler/Cluster.java ---
    @@ -662,22 +662,50 @@ public void setStatusMap(Map<String, String> 
statusMap) {
             this.status.putAll(statusMap);
         }
     
    -    public void setResources(String topologyId, Double[] resources) {
    -        this.resources.put(topologyId, resources);
    +    /**
    +     * Set the amount of resources used used by a topology. Used for 
displaying resource information on the UI
    +     * @param topologyId
    +     * @param resources describes the resources requested and assigned to 
topology in the following format in an array:
    +     *  {requestedMemOnHeap, requestedMemOffHeap, requestedCpu, 
assignedMemOnHeap, assignedMemOffHeap, assignedCpu}
    +     */
    +    public void setTopologyResources(String topologyId, Double[] 
resources) {
    --- End diff --
    
    Yep, I think that would be helpful. Both for topology and supervisor 
resources. We may file a separate JIRA for that or do it within this pull 
request.


> Fix bugs and refactor code in ResourceAwareScheduler
> ----------------------------------------------------
>
>                 Key: STORM-1450
>                 URL: https://issues.apache.org/jira/browse/STORM-1450
>             Project: Apache Storm
>          Issue Type: Improvement
>            Reporter: Boyang Jerry Peng
>            Assignee: Boyang Jerry Peng
>            Priority: Minor
>
> Code refactored:
> 1. Refactor RAS_Nodes. Pushed some of the functionality in to RAS_Nodes.  
> Each RAS_Node will now be initialized with a map of all its assignments.  
> Each RAS_Node will also figure out resources used and available. Removed 
> unnecessary functions.
> 2.  Made WorkerSlot immutable so that a scheduling strategy won't mistakenly 
> modify it
> 3. Added a wrapping layer for RAS_Node to feed into scheduling strategies so 
> that the semantics of what a scheduling strategy should do will be more 
> clear.  Each scheduling strategy shouldn't be actually assigning anything.  
> The strategy should only calculate a scheduling.
> Bug fixes:
> 1. Minor bug in displaying the assigned resources for a supervisor on the UI. 
> The function updateSupervisorResources was placed in the wrong place
> 2. Minor bug fix in freeing memory in RAS_Node there was some wrong math that 
> was done.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to