Package org.apache.storm.topology
Class ConfigurableTopology
java.lang.Object
org.apache.storm.topology.ConfigurableTopology
- Direct Known Subclasses:
- AnchoredWordCount,- ExclamationTopology,- LambdaTopology,- MultiThreadWordCountTopology,- RollingTopWords,- SkewedRollingTopWords,- WordCountTopology
Extensions of this class takes a reference to one or more configuration files. The main() method should call ConfigurableTopology.start()
 and it must instantiate a TopologyBuilder in the run() method.
 
 {
    public class MyTopology extends ConfigurableTopology {
   public static void main(String[] args) throws Exception {
       ConfigurableTopology.start(new MyTopology(), args);
   }
   @Override
   protected int run(String[] args) {
       TopologyBuilder builder = new TopologyBuilder();
       // build topology as usual
       return submit("crawl", conf, builder);
   }
 }
 - 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected ConfiggetConf()static Configprotected abstract intstatic voidstart(ConfigurableTopology topology, String[] args) protected intsubmit(String name, Config conf, TopologyBuilder builder) Submits the topology under a specific name.protected intsubmit(Config conf, TopologyBuilder builder) Submits the topology with the name taken from the configuration.
- 
Field Details- 
conf
 
- 
- 
Constructor Details- 
ConfigurableTopologypublic ConfigurableTopology()
 
- 
- 
Method Details- 
start
- 
loadConf- Throws:
- FileNotFoundException
 
- 
getConf
- 
run- Throws:
- Exception
 
- 
submitSubmits the topology with the name taken from the configuration.
- 
submitSubmits the topology under a specific name.
 
-