Github user jerrypeng commented on a diff in the pull request:
https://github.com/apache/storm/pull/921#discussion_r47701837
--- Diff:
storm-core/src/jvm/backtype/storm/scheduler/SupervisorDetails.java ---
@@ -119,10 +119,18 @@ private Double getTotalResource(String type) {
}
public Double getTotalMemory() {
- return getTotalResource(Config.SUPERVISOR_MEMORY_CAPACITY_MB);
+ Double totalMemory =
getTotalResource(Config.SUPERVISOR_MEMORY_CAPACITY_MB);
+ if (totalMemory == null) {
+ throw new IllegalStateException("default value for
supervisor.memory.capacity.mb is not set!");
+ }
+ return totalMemory;
}
public Double getTotalCPU() {
- return getTotalResource(Config.SUPERVISOR_CPU_CAPACITY);
+ Double totalCPU = getTotalResource(Config.SUPERVISOR_CPU_CAPACITY);
+ if (totalCPU == null) {
+ throw new IllegalStateException("default value for
supervisor.cpu.capacity is not set!");
+ }
+ return totalCPU;
--- End diff --
This case should not really happen. This will only happen if the config
SUPERVISOR_CPU_CAPACITY was not included in defaults.yaml for some reason
---
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.
---