Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2419#discussion_r151444469
--- Diff:
storm-client/src/jvm/org/apache/storm/coordination/BatchSubtopologyBuilder.java
---
@@ -446,31 +446,26 @@ public String getComponent() {
}
private void addDeclaration(InputDeclaration declaration) {
- _component.declarations.add(declaration);
+ component.declarations.add(declaration);
}
@Override
public BoltDeclarer addConfigurations(Map<String, Object> conf) {
- _component.componentConfs.add(conf);
+ if (conf != null && !conf.isEmpty()) {
+ component.componentConf.putAll(conf);
+ }
return this;
}
@Override
- public Map getRASConfiguration() {
- for (Map<String, Object> conf : _component.componentConfs) {
- if
(conf.containsKey(Config.TOPOLOGY_COMPONENT_RESOURCES_MAP)) {
- return conf;
- }
- }
- Map<String, Object> newConf = new HashMap<>();
- newConf.put(Config.TOPOLOGY_COMPONENT_RESOURCES_MAP, new
HashMap());
- _component.componentConfs.add(newConf);
- return newConf;
+ public Map<String, Object> getRASConfiguration() {
+ //TODO this should not be modifiable
--- End diff --
Yes thank you I forgot to grep the patch for TODOs.
---