You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by ddebree <gi...@git.apache.org> on 2015/09/06 16:37:49 UTC
[GitHub] storm pull request: [STORM-1032] Add generics to component configu...
GitHub user ddebree opened a pull request:
https://github.com/apache/storm/pull/723
[STORM-1032] Add generics to component configuration methods
The getComponentConfiguration methods currently return a simple Map object. In fact they should be returning a Map<String, Object>.
By changing this, it will make it slightly clear what is being returned by the method and potentially pick up some issues at compile time.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ddebree/storm configuration_map_generics
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/723.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 #723
----
commit f55f7a7e57f382b91a700daeeb292580fcf9da7d
Author: ddebree <dd...@gmail.com>
Date: 2015-09-06T14:27:29Z
Add generics to the map returned by component configuration to specify the structure of the configuration
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: [STORM-1032] Add generics to component configu...
Posted by ddebree <gi...@git.apache.org>.
Github user ddebree commented on a diff in the pull request:
https://github.com/apache/storm/pull/723#discussion_r38822071
--- Diff: storm-core/src/jvm/backtype/storm/drpc/LinearDRPCTopologyBuilder.java ---
@@ -174,13 +174,12 @@ private static String boltId(int index) {
private static class Component {
public IRichBolt bolt;
public int parallelism;
- public List<Map> componentConfs;
+ public List<Map<String, Object>> componentConfs = new ArrayList<>();
public List<InputDeclaration> declarations = new ArrayList<InputDeclaration>();
public Component(IRichBolt bolt, int parallelism) {
this.bolt = bolt;
this.parallelism = parallelism;
- this.componentConfs = new ArrayList();
--- End diff --
I moved this to line 177 above to make it slightly cleaner
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: [STORM-1032] Add generics to component configu...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/storm/pull/723
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: [STORM-1032] Add generics to component configu...
Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the pull request:
https://github.com/apache/storm/pull/723#issuecomment-138704321
+1
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: [STORM-1032] Add generics to component configu...
Posted by ddebree <gi...@git.apache.org>.
Github user ddebree commented on a diff in the pull request:
https://github.com/apache/storm/pull/723#discussion_r38822073
--- Diff: storm-core/src/jvm/storm/trident/topology/TridentTopologyBuilder.java ---
@@ -204,7 +204,7 @@ public StormTopology buildTopology() {
for(String id: _bolts.keySet()) {
Component c = _bolts.get(id);
- Map<String, CoordSpec> specs = new HashMap();
+ Map<String, CoordSpec> specs = new HashMap<>();
--- End diff --
Another minor generics fix.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---