You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Jungtaek Lim (JIRA)" <ji...@apache.org> on 2016/08/24 03:16:20 UTC

[jira] [Assigned] (STORM-1870) Allow FluxShellBolt/Spout set custom "componentConfig" via yaml.

     [ https://issues.apache.org/jira/browse/STORM-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jungtaek Lim reassigned STORM-1870:
-----------------------------------

    Assignee: Jungtaek Lim

> Allow FluxShellBolt/Spout set custom "componentConfig" via yaml.
> ----------------------------------------------------------------
>
>                 Key: STORM-1870
>                 URL: https://issues.apache.org/jira/browse/STORM-1870
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: Flux
>            Reporter: Pavel Grochal
>            Assignee: Jungtaek Lim
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> FluxShellBolt/Spout should have option to provide custom config option when importing topology from YAML file.
> We use this to provide custom configuration for example to our python RabbitMQ bolts. (Passing strings and list of strings).
> We are using this code:
> {code:title=FluxShellBolt.java|borderStyle=solid}
> public class FluxShellBolt extends ShellBolt implements IRichBolt {
>     
>     //... (rest of the class)
>     public void addComponentConfig(String key, Object value) {
>         this.componentConfig.put(key, value);
>     }
>     public void addComponentConfig(String key, Object[] value) {
>         this.componentConfig.put(key, value);
>     }
> }
> {code}
> And our YAML file:
> {code:title=topology.yaml|borderStyle=solid}
> bolts:
> - className: org.apache.storm.flux.wrappers.bolts.FluxShellBolt
>   configMethods:
>   - name: addComponentConfig
>     args: [rabbitmq.configfile, etc/rabbit.yml]
>   - name: addComponentConfig
>     args:
>     - publisher.data_paths
>     - [actions]
>     
> ... (rest of yaml file)
> {code}
> It works fine, however it produces this type of warning:
> {code}
> WARN  o.a.s.f.FluxBuilder - Found multiple invokable methods for class class org.apache.storm.flux.wrappers.bolts.FluxShellBolt, method addComponentConfig, given arguments [publisher.data_paths, [actions]]. Using the last one found.
> {code}
> Which fortunately happens to be correct method, but it is not correct solution.
> Any ideas?
> It is quite needed to provide custom config to ShellSpout/Bolt, since we run all spouts/bolts in python via this option. It would be nice to have this option in official release.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)