You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by revans2 <gi...@git.apache.org> on 2016/09/21 14:42:18 UTC

[GitHub] storm pull request #1699: STORM-2109: Treat Supervisor CPU/MEMORY Configs as...

GitHub user revans2 opened a pull request:

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

    STORM-2109: Treat Supervisor CPU/MEMORY Configs as Numbers

    

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

    $ git pull https://github.com/revans2/incubator-storm STORM-2109

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

    https://github.com/apache/storm/pull/1699.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 #1699
    
----
commit 8fe28a4ad86d1217e15cc67fc5a9577f3b477f0e
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Date:   2016-09-21T14:41:15Z

    STORM-2109: Treat Supervisor CPU/MEMORY Configs as Numbers

----


---
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 issue #1699: STORM-2109: Treat Supervisor CPU/MEMORY Configs as Number...

Posted by abellina <gi...@git.apache.org>.
Github user abellina commented on the issue:

    https://github.com/apache/storm/pull/1699
  
    +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 issue #1699: STORM-2109: Treat Supervisor CPU/MEMORY Configs as Number...

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

    https://github.com/apache/storm/pull/1699
  
    Rebased and addressed the review comments.


---
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 #1699: STORM-2109: Treat Supervisor CPU/MEMORY Configs as...

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

    https://github.com/apache/storm/pull/1699#discussion_r80074819
  
    --- Diff: storm-core/src/jvm/org/apache/storm/daemon/supervisor/timer/SupervisorHeartbeat.java ---
    @@ -72,10 +72,10 @@ private SupervisorInfo buildSupervisorInfo(Map<String, Object> conf, Supervisor
     
         private Map<String, Double> mkSupervisorCapacities(Map conf) {
             Map<String, Double> ret = new HashMap<String, Double>();
    -        Double mem = (double) (conf.get(Config.SUPERVISOR_MEMORY_CAPACITY_MB));
    -        ret.put(Config.SUPERVISOR_MEMORY_CAPACITY_MB, mem);
    -        Double cpu = (double) (conf.get(Config.SUPERVISOR_CPU_CAPACITY));
    -        ret.put(Config.SUPERVISOR_CPU_CAPACITY, cpu);
    +        Number mem = (Number) (conf.get(Config.SUPERVISOR_MEMORY_CAPACITY_MB));
    +        ret.put(Config.SUPERVISOR_MEMORY_CAPACITY_MB, mem.doubleValue());
    +        Number cpu = (Number) (conf.get(Config.SUPERVISOR_CPU_CAPACITY));
    --- End diff --
    
    Good point. Utils.getDouble() with default value would be safer.


---
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 #1699: STORM-2109: Treat Supervisor CPU/MEMORY Configs as...

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

    https://github.com/apache/storm/pull/1699#discussion_r79851428
  
    --- Diff: storm-core/src/jvm/org/apache/storm/daemon/supervisor/timer/SupervisorHeartbeat.java ---
    @@ -72,10 +72,10 @@ private SupervisorInfo buildSupervisorInfo(Map<String, Object> conf, Supervisor
     
         private Map<String, Double> mkSupervisorCapacities(Map conf) {
             Map<String, Double> ret = new HashMap<String, Double>();
    -        Double mem = (double) (conf.get(Config.SUPERVISOR_MEMORY_CAPACITY_MB));
    -        ret.put(Config.SUPERVISOR_MEMORY_CAPACITY_MB, mem);
    -        Double cpu = (double) (conf.get(Config.SUPERVISOR_CPU_CAPACITY));
    -        ret.put(Config.SUPERVISOR_CPU_CAPACITY, cpu);
    +        Number mem = (Number) (conf.get(Config.SUPERVISOR_MEMORY_CAPACITY_MB));
    +        ret.put(Config.SUPERVISOR_MEMORY_CAPACITY_MB, mem.doubleValue());
    +        Number cpu = (Number) (conf.get(Config.SUPERVISOR_CPU_CAPACITY));
    --- End diff --
    
    Possibility of NPE here. Can we use utils method to do this.


---
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 #1699: STORM-2109: Treat Supervisor CPU/MEMORY Configs as...

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

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


---
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 issue #1699: STORM-2109: Treat Supervisor CPU/MEMORY Configs as Number...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/1699
  
    +1 again.


---
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 #1699: STORM-2109: Treat Supervisor CPU/MEMORY Configs as...

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

    https://github.com/apache/storm/pull/1699#discussion_r80282664
  
    --- Diff: storm-core/src/jvm/org/apache/storm/daemon/supervisor/timer/SupervisorHeartbeat.java ---
    @@ -72,10 +72,10 @@ private SupervisorInfo buildSupervisorInfo(Map<String, Object> conf, Supervisor
     
         private Map<String, Double> mkSupervisorCapacities(Map conf) {
             Map<String, Double> ret = new HashMap<String, Double>();
    -        Double mem = (double) (conf.get(Config.SUPERVISOR_MEMORY_CAPACITY_MB));
    -        ret.put(Config.SUPERVISOR_MEMORY_CAPACITY_MB, mem);
    -        Double cpu = (double) (conf.get(Config.SUPERVISOR_CPU_CAPACITY));
    -        ret.put(Config.SUPERVISOR_CPU_CAPACITY, cpu);
    +        Number mem = (Number) (conf.get(Config.SUPERVISOR_MEMORY_CAPACITY_MB));
    +        ret.put(Config.SUPERVISOR_MEMORY_CAPACITY_MB, mem.doubleValue());
    +        Number cpu = (Number) (conf.get(Config.SUPERVISOR_CPU_CAPACITY));
    --- End diff --
    
    The NPE should never happen if defaults.yaml is configured correctly, but I will still make the change.


---
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 issue #1699: STORM-2109: Treat Supervisor CPU/MEMORY Configs as Number...

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

    https://github.com/apache/storm/pull/1699
  
    The travis failure is unrelated it is yet again a maven issue downloading something that should be there.
    
    @knusbaum @kishorvpatil could you please take a look?


---
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 issue #1699: STORM-2109: Treat Supervisor CPU/MEMORY Configs as Number...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/1699
  
    +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.
---