You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by govind-menon <gi...@git.apache.org> on 2018/09/12 15:46:31 UTC

[GitHub] storm pull request #2827: STORM-3221: Fixing utilization in clusterSummary A...

GitHub user govind-menon opened a pull request:

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

    STORM-3221: Fixing utilization in clusterSummary API call

    

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

    $ git pull https://github.com/govind-menon/storm STORM-3221

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

    https://github.com/apache/storm/pull/2827.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 #2827
    
----
commit 121e68ec19971e850dfc71f3190257181f1a1edc
Author: Govind Menon <go...@...>
Date:   2018-09-12T15:45:53Z

    STORM-3221: Fixing utilization in clusterSummary API call

----


---

[GitHub] storm pull request #2827: STORM-3221: Fixing utilization in clusterSummary A...

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

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


---

[GitHub] storm pull request #2827: STORM-3221: Fixing utilization in clusterSummary A...

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

    https://github.com/apache/storm/pull/2827#discussion_r217094208
  
    --- Diff: storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java ---
    @@ -582,11 +582,9 @@ public static Response makeStandardResponse(
             result.put("schedulerDisplayResource",
                     conf.get(DaemonConfig.SCHEDULER_DISPLAY_RESOURCE));
             result.put("memAssignedPercentUtil", supervisorTotalMemory > 0
    -                ? String.valueOf((supervisorTotalMemory - supervisorUsedMemory)  * 100.0
    -                / supervisorTotalMemory) : "0.0");
    +                ? String.valueOf((supervisorUsedMemory  * 100.0) / supervisorTotalMemory) : "0.0");
             result.put("cpuAssignedPercentUtil", supervisorTotalCpu > 0
    -                ? String.valueOf((supervisorTotalCpu - supervisorUsedCpu) * 100.0
    -                / supervisorTotalCpu) : "0.0");
    +                ? String.valueOf((supervisorUsedCpu * 100.0) / supervisorTotalCpu) : "0.0");
    --- End diff --
    
    nit: Can we fix the rounding while we are at it?


---