Github user d2r commented on a diff in the pull request:
https://github.com/apache/storm/pull/921#discussion_r47705023
--- Diff: storm-core/src/jvm/backtype/storm/scheduler/TopologyDetails.java
---
@@ -403,13 +415,23 @@ public void addResourcesForExec(ExecutorDetails exec,
Map<String, Double> resour
* Add default resource requirements for a executor
*/
public void addDefaultResforExec(ExecutorDetails exec) {
+ Double topologyComponentCpuPcorePercent =
Utils.getDouble(topologyConf.get(Config.TOPOLOGY_COMPONENT_CPU_PCORE_PERCENT),
null);
+ if (topologyComponentCpuPcorePercent == null) {
+ LOG.warn("default value for
topology.component.cpu.pcore.percent needs to be set!");
--- End diff --
Actually, this would make a good unit test. I think if we have deployed
storm, we can expect all of the required defaults to be defined in
defaults.yaml.
With the unit test, if I remove a required config entry from defaults.yaml,
the unit test will fail explicitly. This would not be something we need to
handle every time we call this method at runtime.
---
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.
---