一、启动程序:
1、启动 nimbus
/zywa/storm/bin/storm nimbus &
2、启动 supervisor
/zywa/storm/bin/storm supervisor &
3、启动 ui
/zywa/storm/bin/storm ui &
4、启动任务 Topology
cd /zywa/storm && ./bin/storm jar jar_soft/StormUserPortrayal-1.0-SNAPSHOT.jar com.chigua.storm.user.portaryal.StormUserPortrayalMain StormUserPortrayalMain
cd /zywa/storm && ./bin/storm jar jar_soft/StormUserBehavior-1.0-SNAPSHOT.jar com.chigua.storm.user.behavior.StormWriteHDFSMain StormWriteHDFSMain
5、停止任务
/zywa/storm/bin/storm kill StormUserPortrayalMain
/zywa/storm/bin/storm kill StormWriteHDFSMain
二、配置文件说明:
storm.zookeeper.servers: #单机版可以使用自带zk
- "172.10.4.57"
storm.zookeeper.session.timeout: 14000
storm.zookeeper.connection.timeout: 90000
storm.zookeeper.port: 2181
storm.zookeeper.root: "/storm"
storm.local.dir: "/zywa/storm/status"
ui.port: 8080
nimbus.seeds: ["recommend-storm"] #这里的名字一定要与/etc/hostname一致,切要做hosts解析
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
worker.heap.memory.mb: 1024
worker.childopts: "-Xmx1024m"
topology.message.timeout.secs: 60