准备

1、三台虚拟机

  192.168.1.128  Nimbus

  192.168.1.131  Supervisor

  192.168.1.132  Supervisor

2、JDK1.8

3、Zookeeper3.4.10

4、Storm-1.1.1

步骤

1、配置Storm(PS:三台机器的配置都是这样的)

storm.zookeeper.servers:
    - "192.168.1.128"
nimbus.seeds: ["192.168.1.128"]
storm.local.dir: "/usr/local/data/storm"
supervisor.slots.ports:
    - 6700
    - 6701
    - 6702
storm.health.check.dir: "healthchecks"
storm.health.check.timeout.ms: 5000

2、启动

192.168.1.128
[root@localhost zookeeper-3.4.10]# bin/zkServer.sh start
[root@localhost apache-storm-1.1.1]# bin/storm nimbus
[root@localhost apache-storm-1.1.1]# bin/storm ui

192.168.1.131
[root@localhost apache-storm-1.1.1]# bin/storm supervisor

192.168.1.132
[root@localhost apache-storm-1.1.1]# bin/storm supervisor

操作演示

到这里,可以看到集群已经启动成功了。接下来,将WordCount程序在集群中运行,只需做如下改动。

mvn clean package打成jar包上传,并运行

 

参考

http://storm.apache.org/releases/1.1.1/Setting-up-a-Storm-cluster.html

http://storm.apache.org/releases/1.1.1/Running-topologies-on-a-production-cluster.html

http://storm.apache.org/releases/1.1.1/Command-line-client.html

 

版权声明:本文为cjsblog原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/cjsblog/p/8398379.html