You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by zhuoliu <gi...@git.apache.org> on 2015/10/29 20:05:18 UTC

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

GitHub user zhuoliu opened a pull request:

    https://github.com/apache/storm/pull/829

    [STORM-1144] Provide resource (mem/cpu) assign feedback for schedulers in UI

    1. Calculate the requested and assigned onheap memory, offheap memory and CPU.
    2. Add data structures and REST api to support these resources in topo-info, topo-summary, topo-page-info, cluster, core, nimbus.
    3. Display assigned cpu/mem at the index page, and show more details about the requested and assigned resources at each topology page.
    4. Adjust the items shown on UI (delete topoId item, exclude topoId from schedulerInfo)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zhuoliu/storm 1144

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/829.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #829
    
----
commit 70f455f133db1c015999d1748fa778dacefc7684
Author: zhuol <zh...@yahoo-inc.com>
Date:   2015-10-29T18:55:55Z

    [STORM-1144] Display resource usage in UI

commit abf9f286270f173f3f1d2c100f5d6ed2bb2dd52a
Author: zhuol <zh...@yahoo-inc.com>
Date:   2015-10-29T19:03:17Z

    Update the thrift java files

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by d2r <gi...@git.apache.org>.
Github user d2r commented on a diff in the pull request:

    https://github.com/apache/storm/pull/829#discussion_r43550745
  
    --- Diff: STORM-UI-REST-API.md ---
    @@ -204,6 +213,14 @@ Sample response:
                 "workersTotal": 3,
                 "executorsTotal": 28,
                 "replicationCount": 1
    +            "requestedMemOnHeap": 640
    +            "requestedMemOffHeap": 128
    +            "requestedTotalMem": 768
    +            "requestedCpu": 80
    +            "assignedMemOnHeap": 640
    +            "assignedMemOffHeap": 128
    +            "assignedTotalMem": 768
    +            "assignedCpu": 80
    --- End diff --
    
    nit: need commas for valid JSON


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by d2r <gi...@git.apache.org>.
Github user d2r commented on the pull request:

    https://github.com/apache/storm/pull/829#issuecomment-152650906
  
    +1


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by d2r <gi...@git.apache.org>.
Github user d2r commented on a diff in the pull request:

    https://github.com/apache/storm/pull/829#discussion_r43552033
  
    --- Diff: storm-core/src/jvm/backtype/storm/scheduler/resource/ResourceAwareScheduler.java ---
    @@ -76,20 +84,30 @@ public void schedule(Topologies topologies, Cluster cluster) {
                                 if (!nodesUsed.contains(targetNode.getId())) {
                                     nodesUsed.add(targetNode.getId());
                                 }
    +                            assignedMemOnHeap += targetSlot.getAllocatedMemOnHeap();
    +                            assignedMemOffHeap += targetSlot.getAllocatedMemOffHeap();
    +                            assignedCpu += targetSlot.getAllocatedCpu();
                             }
    -                        LOG.debug("Topology: {} assigned to {} nodes on {} workers", td.getId(), nodesUsed.size(), schedulerAssignmentMap.keySet().size());
    -                        cluster.setStatus(td.getId(), td.getId() + " Fully Scheduled");
    +                        LOG.debug("Topology: {} assigned to {} nodes on {} workers", td.getId(), nodesUsed.size(), assignedWorkers);
    +                        cluster.setStatus(td.getId(), "Fully Scheduled");
                         } catch (IllegalStateException ex) {
                             LOG.error(ex.toString());
    -                        LOG.error("Unsuccessfull in scheduling {}", td.getId());
    -                        cluster.setStatus(td.getId(), "Unsuccessfull in scheduling " + td.getId());
    +                        LOG.error("Unsuccessful in scheduling", td.getId());
    --- End diff --
    
    Thanks for fixing the typo, too.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by zhuoliu <gi...@git.apache.org>.
Github user zhuoliu commented on a diff in the pull request:

    https://github.com/apache/storm/pull/829#discussion_r43551741
  
    --- Diff: storm-core/src/storm.thrift ---
    @@ -146,6 +146,12 @@ struct TopologySummary {
     513: optional string sched_status;
     514: optional string owner;
     515: optional i32 replication_count;
    +521: optional double requested_memonheap;
    --- End diff --
    
    We leave some fields for future topology-specific schedulers, etc.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by zhuoliu <gi...@git.apache.org>.
Github user zhuoliu commented on the pull request:

    https://github.com/apache/storm/pull/829#issuecomment-152639230
  
    Sure, @revans2 .  The REST API doc for topology summary has been updated. Thanks.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/829


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by d2r <gi...@git.apache.org>.
Github user d2r commented on a diff in the pull request:

    https://github.com/apache/storm/pull/829#discussion_r43551008
  
    --- Diff: storm-core/src/jvm/backtype/storm/generated/DebugOptions.java ---
    @@ -51,7 +51,7 @@
     import org.slf4j.LoggerFactory;
     
     @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
    -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-10-9")
    +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-10-29")
    --- End diff --
    
    Can we eliminate diffs due only to timestamp changes?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by revans2 <gi...@git.apache.org>.
Github user revans2 commented on the pull request:

    https://github.com/apache/storm/pull/829#issuecomment-152625417
  
    The code and the UI look good.  +1 But please either file a follow on JIRA or add in documentation about the REST API changes


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by revans2 <gi...@git.apache.org>.
Github user revans2 commented on the pull request:

    https://github.com/apache/storm/pull/829#issuecomment-152642779
  
    +1


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by d2r <gi...@git.apache.org>.
Github user d2r commented on a diff in the pull request:

    https://github.com/apache/storm/pull/829#discussion_r43551272
  
    --- Diff: storm-core/src/storm.thrift ---
    @@ -146,6 +146,12 @@ struct TopologySummary {
     513: optional string sched_status;
     514: optional string owner;
     515: optional i32 replication_count;
    +521: optional double requested_memonheap;
    --- End diff --
    
    here and elsewhere: Can we make these arguments sequential, or is there a reason we did not want to do that?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by ptgoetz <gi...@git.apache.org>.
Github user ptgoetz commented on the pull request:

    https://github.com/apache/storm/pull/829#issuecomment-152306778
  
    +1 looks good!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: [STORM-1144] Provide resource (mem/cpu) assign...

Posted by kishorvpatil <gi...@git.apache.org>.
Github user kishorvpatil commented on the pull request:

    https://github.com/apache/storm/pull/829#issuecomment-152308917
  
    LGTM. The 1.8 travis build failure seems unrelated.
    +1


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---