storm - study notes

来源:互联网 发布:美颜软件哪个好 编辑:程序博客网 时间:2024/05/13 07:33

Study storm
Topology is a Thrift service, has
Spout - IRichSpout;
Tuple
Bolt - IRichBolt; BaseRichBolt

Data model is
Tuple (in stream format)

 

/*== start-up java codes ==*/
TopologyBuilder builder = new TopologyBuilder();       
builder.setSpout("words", new TestWordSpout(), 10);       
builder.setBolt("exclaim1", new ExclamationBolt(), 3).shuffleGrouping("words");
builder.setBolt("exclaim2", new ExclamationBolt(), 2).shuffleGrouping("exclaim1");

/*== Here's the code that runs ExclamationTopology in local mode ==*/
Config conf = new Config();
conf.setDebug(true);
conf.setNumWorkers(2);
LocalCluster cluster = new LocalCluster();
cluster.submitTopology("test", conf, builder.createTopology());
Utils.sleep(10000);
cluster.killTopology("test");
cluster.shutdown();

 

==Install storm==

 http://blog.csdn.net/blue_jjw/article/details/9264131

Better one:

http://www.cnblogs.com/XjChenny/p/3214039.html

 

==Issue resolution when run storm in local mode under windows==

java.net.SocketException: Address family not supported by protocol family                    

http://blog.csdn.net/myemail_sl/article/details/11074017

Fix for file delete problem on Windows         https://github.com/dkincaid/storm/commit/34244038f7ca79e5c8138142f39d827c4338a205


==Architecture diagram from my understanding (as of 23Sep2013)==



原创粉丝点击