storm 入门介绍(持续更新)
2017-10-11 15:08
204 查看
storm的集群表面上看和hadoop的集群非常像。但是在Hadoop上面你运行的是MapReduce的Job, 而在Storm上面你运行的是Topology。 它们是非常不一样的 — 一个关键的区别是: 一个MapReduce Job最终会结束, 而一个Topology运永远运行(除非你显式的杀掉他)。
Config conf = new Config(); //设置work的数量 conf.setNumWorkers(2); //设置Excutor的数量 TopologyBuilder topologyBuilder = new TopologyBuilder(); topologyBuilder.setBolt("blue-spout", new BlueSpot(), 2); topologyBuilder.setBolt("green-bolt", new GreenBolt(), 2).setNumTasks(4).shuffleGrouping("blue-spout"); topologyBuilder.setBolt("yellow-bolt", new YellowBolt(), 6).shuffleGrouping("green-bolt");
命令行重新设置进程和线程个数
//Reconfigure the topology "test" to use 5 worker processes //the spout "blue-spout to use 3 executors and the bolt "yellow-bolt" to use 10 executors." storm rebalance test -n 5 -e blue-spout=3 -e yellow-bolt=10
参考链接
1 storm 原理简介及单机版安装指南 https://my.oschina.net/leejun2005/blog/147607?from=20130804#OSC_h2_1
2 入门源码 https://github.com/nathanmarz/storm-starter
相关文章推荐
- Storm入门(八)Storm实战常见问题总结(持续更新)
- JavaWeb从入门到放弃(10)-web.xml中信息的配置-持续更新
- 暴力之回溯法入门(持续更新)
- OpenGL ES 2.0 入门(持续更新)
- 【持续更新】activiti+boot配置入门各种坑以及出现问题解决
- Masonry介绍与使用实践和各种使用心得,持续更新~
- storm 入门原理介绍
- storm常见问题及解决方法收集【持续更新中】
- storm 入门原理介绍
- Python NumPy入门归纳~持续更新
- Bootstrap3.0入门学习系列规划[持续更新]
- storm 入门原理介绍_AboutYUN
- 00-Linux基础入门-命令总结(持续更新)
- redis&memcached相关介绍(持续更新中)
- HDOJ 入门级深搜DFS 题目汇总,持续更新中,一路打怪升级
- 2-sat入门(例题hdu1814,poj3648)持续更新
- Vertica的这些事<五>—— 关于vertica常用函数介绍(持续更新ing)
- 旗舰版stm32开发板介绍---硬件篇(持续更新)
- 小米手机(MIUI)介绍以及工程机评测 【持续更新】
- 持续集成和jenkins入门介绍