[
https://issues.apache.org/jira/browse/STORM-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14981380#comment-14981380
]
ASF GitHub Bot commented on STORM-1126:
---------------------------------------
GitHub user ashnazg opened a pull request:
https://github.com/apache/storm/pull/833
STORM-1126: allow for configMethods with no args
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ashnazg/storm noArgs
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/833.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 #833
----
commit 56e27477862d1693fe2c15c363dc71ab5d7da284
Author: Chuck Burgess <[email protected]>
Date: 2015-10-29T21:46:52Z
allow for configMethods with no args;
----
> How to Specify a configMethod that takes no arguments
> -----------------------------------------------------
>
> Key: STORM-1126
> URL: https://issues.apache.org/jira/browse/STORM-1126
> Project: Apache Storm
> Issue Type: Question
> Components: Flux
> Affects Versions: 0.10.0
> Reporter: Chuck Burgess
> Priority: Minor
>
> Can the configMethod implementation handle calling a method that requires no
> arguments? If so, I cannot figure out how to write that in the YAML.
> {noformat}
> configMethods
> - name: "myMethod"
> {noformat}
> does not work:
> {noformat}
> Exception in thread "main" java.lang.NullPointerException
> at
> org.apache.storm.flux.FluxBuilder.findCompatibleMethod(FluxBuilder.java:445)
> at
> org.apache.storm.flux.FluxBuilder.invokeConfigMethods(FluxBuilder.java:424)
> at org.apache.storm.flux.FluxBuilder.buildObject(FluxBuilder.java:302)
> at
> org.apache.storm.flux.FluxBuilder.buildComponents(FluxBuilder.java:339)
> at org.apache.storm.flux.FluxBuilder.buildTopology(FluxBuilder.java:75)
> at org.apache.storm.flux.Flux.runCli(Flux.java:153)
> at org.apache.storm.flux.Flux.main(Flux.java:98)
> {noformat}
> {noformat}
> configMethods
> - name: "myMethod"
> args:
> {noformat}
> does not work:
> {noformat}
> ...
> Caused by: java.lang.NullPointerException
> at
> org.apache.storm.flux.model.ConfigMethodDef.setArgs(ConfigMethodDef.java:45)
> {noformat}
> {noformat}
> configMethods
> - name: "myMethod"
> args: []
> {noformat}
> does not work:
> {noformat}
> Exception in thread "main" java.lang.IllegalArgumentException: Unable to find
> configuration method 'build' in class
> 'io.latent.storm.rabbitmq.config.ConsumerConfigBuilder' with arguments [].
> at
> org.apache.storm.flux.FluxBuilder.invokeConfigMethods(FluxBuilder.java:431)
> at org.apache.storm.flux.FluxBuilder.buildObject(FluxBuilder.java:302)
> at
> org.apache.storm.flux.FluxBuilder.buildComponents(FluxBuilder.java:339)
> at org.apache.storm.flux.FluxBuilder.buildTopology(FluxBuilder.java:75)
> at org.apache.storm.flux.Flux.runCli(Flux.java:153)
> at org.apache.storm.flux.Flux.main(Flux.java:98)
> {noformat}
> (presumably because this results in usage of `build( empty list)` rather than
> just `build()`)
> (originally filed at https://github.com/ptgoetz/flux/issues/17)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)