You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by kishorvpatil <gi...@git.apache.org> on 2018/02/19 17:49:31 UTC
[GitHub] storm pull request #2563: [STORM-2961] Refactor addResource and addResources...
GitHub user kishorvpatil opened a pull request:
https://github.com/apache/storm/pull/2563
[STORM-2961] Refactor addResource and addResources Methods in BaseConfigurationDeclarer
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kishorvpatil/incubator-storm refactorDeclarers
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/2563.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2563
----
commit 0267d549a96c1e7aefa3cb5d23e1cca559dd8e74
Author: Kishor Patil <kp...@...>
Date: 2018-02-17T00:23:17Z
Refactor addResource and addResources Method and avoid NPEs
----
---
[GitHub] storm pull request #2563: [STORM-2961] Refactor addResource and addResources...
Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/2563#discussion_r169180931
--- Diff: storm-client/src/jvm/org/apache/storm/trident/topology/TridentTopologyBuilder.java ---
@@ -779,30 +769,20 @@ public BoltDeclarer addConfigurations(Map<String, Object> conf) {
return this;
}
+ /**
+ * return the current component configuration.
+ *
+ * @return the current configuration.
+ */
@Override
- public BoltDeclarer addResources(Map<String, Double> resources) {
- if (resources != null) {
- Map<String, Double> currentResources = (Map<String, Double>) component.componentConf.computeIfAbsent(
- Config.TOPOLOGY_COMPONENT_RESOURCES_MAP, (k) -> new HashMap<>());
- currentResources.putAll(resources);
- }
- return this;
+ public Map<String, Object> getComponentConfiguration() {
+ return component.componentConf;
}
- @Override
+ @Override
--- End diff --
nit: broken indent
---
[GitHub] storm issue #2563: [STORM-2961] Refactor addResource and addResources Method...
Posted by kishorvpatil <gi...@git.apache.org>.
Github user kishorvpatil commented on the issue:
https://github.com/apache/storm/pull/2563
@HeartSaVioR Thank you, I fixed the indentation.
---
[GitHub] storm pull request #2563: [STORM-2961] Refactor addResource and addResources...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/storm/pull/2563
---