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/11/02 22:21:27 UTC
[jira] [Updated] (STORM-1126) Allow a configMethod that takes no
arguments
[ https://issues.apache.org/jira/browse/STORM-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chuck Burgess updated STORM-1126:
---------------------------------
Assignee: Chuck Burgess
Flags: Patch
Description:
Allow the configMethod implementation to handle calling a method that requires no arguments, by omitting the "args" line.
{noformat}
configMethods
- name: "myMethod"
{noformat}
was:
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)
Issue Type: New Feature (was: Question)
Summary: Allow a configMethod that takes no arguments (was: How to Specify a configMethod that takes no arguments)
> Allow a configMethod that takes no arguments
> --------------------------------------------
>
> Key: STORM-1126
> URL: https://issues.apache.org/jira/browse/STORM-1126
> Project: Apache Storm
> Issue Type: New Feature
> Components: Flux
> Affects Versions: 0.10.0
> Reporter: Chuck Burgess
> Assignee: Chuck Burgess
> Priority: Minor
>
> Allow the configMethod implementation to handle calling a method that requires no arguments, by omitting the "args" line.
> {noformat}
> configMethods
> - name: "myMethod"
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)