环境准备
1、kafka、zk
2、安装storm
修改conf/storm.yaml,有笔记。 这个配置文件,空格 对齐 很重要
启动storm
bin/storm nimbus【仅一台】 storm nimbus >/dev/null 2>&1 &
bin/storm supervisor storm supervisor >/dev/null 2>&1 &
bin/storm ui【仅一台】 bin/storm ui >/dev/null 2>&1 &
浏览器打开: http://localhost:8080 查看集群的运行状态
3、安装pip
下载–解压–cd pip-7.1.2 python setup.py install
可能会报错:ImportError: No module named setuptools
解决方案:
下载setuptools-19.1.1.tar.gz
解压
cd setuptools-19.1.1
python setup.py build
python setup.py install
4、安装pyleus
注意版本:Pyleus 0.3.0 is not compatible with Storm 0.9.2 or older. Use Pyleus 0.2.4 for older versions of Storm.
pyleus local exclamation_topology.jar
后台运行
例子
下面来尝试数单词,这个例子word_count
https://yelp.github.io/pyleus/tutorial.html my_first_topology
kaf