Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2385#discussion_r149159816
--- Diff:
storm-client/src/jvm/org/apache/storm/trident/topology/TridentTopologyBuilder.java
---
@@ -371,6 +371,30 @@ public SpoutDeclarer addConfigurations(Map<String,
Object> conf) {
return this;
}
+ @SuppressWarnings("unchecked")
+ @Override
+ public SpoutDeclarer addResource(String resourceName, Number
resourceValue) {
+ Map<String, Double> resourcesMap = (Map<String, Double>)
getRASConfiguration().get(Config.TOPOLOGY_COMPONENT_RESOURCES_MAP);
+
+ if (resourcesMap == null) {
+ resourcesMap = new HashMap<>();
+ }
+ resourcesMap.put(resourceName, resourceValue.doubleValue());
+
+
getRASConfiguration().put(Config.TOPOLOGY_COMPONENT_RESOURCES_MAP,
resourcesMap);
--- End diff --
And here...
---