<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to pass external configuration properties to storm topology? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114046#M30394</link>
    <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/10755/sanjeevverma82.html"&gt;@Sanjeev Verma&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can use &lt;/P&gt;&lt;P&gt;Config conf = new Config(); &lt;/P&gt;&lt;P&gt;        conf.put(key, val); &lt;/P&gt;&lt;P&gt;        conf.put(key1, val1);&lt;/P&gt;&lt;P&gt;e.g redis config, etc.&lt;/P&gt;&lt;P&gt;and then you can use this in prepare method of bolts(in case of trident in functions/ filters, etc).&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Nov 2016 18:55:01 GMT</pubDate>
    <dc:creator>amber_kulkarni8</dc:creator>
    <dc:date>2016-11-03T18:55:01Z</dc:date>
    <item>
      <title>How to pass external configuration properties to storm topology?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114043#M30391</link>
      <description>&lt;P&gt;I want to pass some custom configuration properties to storm topology that are not part of storm yaml, how can I pass it.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 17:40:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114043#M30391</guid>
      <dc:creator>sanjeev_verma82</dc:creator>
      <dc:date>2016-06-01T17:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass external configuration properties to storm topology?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114044#M30392</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10755/sanjeevverma82.html" nodeid="10755"&gt;@Sanjeev Verma&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you can use following ways to get the external configuration inside the topplogy&lt;/P&gt;&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;1:&lt;/P&gt;
&lt;P&gt;pass the arguments like this&lt;/P&gt;
&lt;P&gt;storm jar storm-jar topology-name -c sKey=sValue -c key1=value1 -c key2=value2 &amp;gt;/tmp/storm.txt&lt;/P&gt;
&lt;P&gt;2:&lt;/P&gt;
&lt;P&gt;Create a simple java resource file (properties files) and pass it as arguments to your topology main class, in main method read the properties from the main file &lt;/P&gt;
&lt;P&gt;and build the storm configuration object using conf.put()&lt;/P&gt;
&lt;P&gt;3:&lt;/P&gt;
&lt;P&gt;create separate yaml file read it through the Utils method provided by storm api,look for more documentation &lt;A href="https://nathanmarz.github.io/storm/doc/backtype/storm/utils/Utils.html"&gt;https://nathanmarz.github.io/storm/doc/backtype/storm/utils/Utils.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Utils.findAndReadConfigFile()&lt;/P&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 01 Jun 2016 17:50:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114044#M30392</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-06-01T17:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass external configuration properties to storm topology?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114045#M30393</link>
      <description>&lt;P&gt;Consider wiring your topologies with Storm's Flux. It also allows for property substitution: &lt;A target="_blank" href="http://storm.apache.org/releases/current/flux.html"&gt;http://storm.apache.org/releases/current/flux.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 20:43:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114045#M30393</guid>
      <dc:creator>andrewg</dc:creator>
      <dc:date>2016-06-01T20:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass external configuration properties to storm topology?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114046#M30394</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/10755/sanjeevverma82.html"&gt;@Sanjeev Verma&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can use &lt;/P&gt;&lt;P&gt;Config conf = new Config(); &lt;/P&gt;&lt;P&gt;        conf.put(key, val); &lt;/P&gt;&lt;P&gt;        conf.put(key1, val1);&lt;/P&gt;&lt;P&gt;e.g redis config, etc.&lt;/P&gt;&lt;P&gt;and then you can use this in prepare method of bolts(in case of trident in functions/ filters, etc).&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:55:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114046#M30394</guid>
      <dc:creator>amber_kulkarni8</dc:creator>
      <dc:date>2016-11-03T18:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass external configuration properties to storm topology?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114047#M30395</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/173/agrande.html" nodeid="173"&gt;@Andrew Grande&lt;/A&gt;, &lt;A rel="user" href="https://community.cloudera.com/users/8919/rajkumarsingh.html" nodeid="8919"&gt;@Rajkumar Singh&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;I am trying to make the -c work with Flux and the exec-maven-plugin:&lt;/P&gt;&lt;PRE&gt;call mvn compile exec:java -Dexec.args="--local --sleep 400000 --resource /topology.yaml -c foo.bar=1"
&lt;/PRE&gt;&lt;P&gt;, but I get: &lt;/P&gt;&lt;PRE&gt;[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default-cli) on project StorageTopology: An exception occured while executing the Java class. null: InvocationTargetException: Unrecognized option: -c -&amp;gt; [Help 1] &lt;/PRE&gt;&lt;P&gt;Does this only work with storm jar submission?&lt;/P&gt;&lt;P&gt;Can I make it work with the exec maven plugin?&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;P&gt;Mauro.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 04:08:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-external-configuration-properties-to-storm/m-p/114047#M30395</guid>
      <dc:creator>maurgi</dc:creator>
      <dc:date>2017-06-08T04:08:59Z</dc:date>
    </item>
  </channel>
</rss>

