安装zookeeper
安装Storm
- 官网下载Storm
- 配置
storm/conf/storm.yaml
1 | storm.zookeeper.servers: |
每一项配置顶格需要一个空格,所有配置避免使用Tab
- 启动
nohup bin/storm nimbus &
- 启动
nohup bin/storm supervisor &
- 启动
nohup bin/storm ui &
- 查看
ui
: zookeeper-server1:8080 - 运行
WordCount
- 下载maven :
wget http://www-eu.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
tar -zxf apache-maven-3.5.2-bin.tar.gz
- 初始化安装storm所需依赖:
mvn clean install -DskipTests=true
- 使用Maven打包storm拓扑:
mvn package
- 运行
WordCount
:bin/storm jar storm-starter-1.1.1.jar org.apache.storm.starter.WordCountTopology wordcount
- 下载maven :