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 [email protected] or file a JIRA ticket
with INFRA.
---