You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Chuck Burgess (JIRA)" <ji...@apache.org> on 2015/10/29 22:52:27 UTC
[jira] [Commented] (STORM-1126) How to Specify a configMethod that
takes no arguments
[ https://issues.apache.org/jira/browse/STORM-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14981382#comment-14981382 ]
Chuck Burgess commented on STORM-1126:
--------------------------------------
https://github.com/apache/storm/pull/833
> 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)