Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2385#discussion_r147235680
--- Diff:
storm-client/src/jvm/org/apache/storm/topology/BaseConfigurationDeclarer.java
---
@@ -79,8 +81,18 @@ public T setMemoryLoad(Number onHeap, Number offHeap) {
@Override
public T setCPULoad(Number amount) {
if(amount != null) {
+ addResource(Config.TOPOLOGY_COMPONENT_CPU_PCORE_PERCENT,
amount);
return
addConfiguration(Config.TOPOLOGY_COMPONENT_CPU_PCORE_PERCENT, amount);
}
return (T) this;
}
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public T addResources(Map<String, Double> resources) {
+ if(resources != null) {
--- End diff --
nit: you need a space after the if.
---