Inject external properties for Apache Storm Flux

417 Views Asked by At

I am using Flux 1.0.0 and I have rewritten my topology into a YAML file. But I have some properties that used to be part of the configuration that I used the Storm driver to run with.

storm.Driver --config myConfig/config.conf

Now with Storm Flux, how can I inject the properties that are in config.conf into my topology?

I am currently doing java -cp myStormJar org.apache.sotrm.flux.Flux --local /src/main/resources/myTopology.yaml

I tried to use --resources option, followed by the path to the conf file, but it does not inject it.

1

There are 1 best solutions below

0
On

Add the filter --resources placeholders ${resource.filter} to your yaml file. To make the property available in the stormConf - re-declare the filter resource in config: properties.

name: "storm-topology"

config:
    kafka.mapper.zkPort: ${kafka.mapper.zkPort}
    kafka.mapper.zkServers: ${kafka.mapper.zkServers}

You can also review the simple_hdfs.yaml example at: https://github.com/ptgoetz/flux/tree/master/flux-examples