fenlan

Everything gonna be fine in the end, if it's not fine, it's not the end.

0%

Storm

安装zookeeper

安装过程查看文章http://fenlan.github.io/2017/11/29/zookeeper-kafka/

安装Storm

  1. 官网下载Storm
  2. 配置storm/conf/storm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
storm.zookeeper.servers:
- "zookeeper-server1"
- "zookeeper-server2"
- "zookeeper-server3"
nimbus.seeds: ["zookeeper-server1"]

storm.local.dir: "/root/Downloads/storm/data"

supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703

每一项配置顶格需要一个空格,所有配置避免使用Tab

  1. 启动nohup bin/storm nimbus &
  2. 启动nohup bin/storm supervisor &
  3. 启动nohup bin/storm ui &
  4. 查看ui: zookeeper-server1:8080
  5. 运行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