storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Susheel Kumar Gadalay <>
Subject Re: Can I use a custom Storm configuration in the topology itself?
Date Fri, 03 Jan 2014 05:13:27 GMT
Yes, u can pass user defined configuration values.

You can retrieve the same by
conf.get("insertScanBoltTestData").toString() in the spout/bolt
open/prepare method.

On 12/31/13, Pete Carlson <> wrote:
> From reading the Storm API Config class i.e.,
> it states "you may put other configurations in any of the configs. Storm
> will ignore anything it doesn't recognize, but your topologies are free to
> make use of them by reading them in the prepare method of Bolts or the open
> method of Spouts"
> Is there a way to also use other configurations in the topology itself?
> In the JUnit test of my topology I added the following custom
> configuration:
> conf.put("insertScanBoltTestData", true);
> And when I run my topology I see this (key, value) pair in the Storm
> topology config logs for one of the workers.
> My goal is to have my topology look for this custom configuration and only
> inject test data for some of my bolts if insertScanBoltTestData has a value
> of true.  This would only be in the case that the topology is under test.
> Has anyone done something similar to this?
> Pete
> --
> Pete Carlson
> Software Developer
> Tetra Concepts LLC

View raw message