一、机器
lwj-s0
lwj-s1
lwj-s2
二、配置storm.yaml
storm.zookeeper.servers:- "lwj-s0" - "lwj-s1" - "lwj-s2" 配置zookeeper服务地址
storm.zookeeper.port: 2181 zookeeper端口号
storm.zookeeper.root: "/storm" zookeeper服务 /storm
storm.local.dir: "./storm"
storm.local.mode.zmq: false
ui.port: 8090
storm.cluster.mode: "distributed"
nimbus.host: "lwj-s0"
master.thrift.port: 6500 主节点(Nimbus)Thrift的端口号
master.initial-num-supervisors: 2
master.container.priority: 0
master.container.size-mb: 800
nimbus.childopts: "-server -Xmx512m -Xms512m -Xmn196m -XX:MaxPermSize=128m -XX:PermSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC "
drpc.childopts: "-Xmx256m"
supervisor.childopts: "-server -Xmx512m -Xms512m -Xmn196m -XX:MaxPermSize=128m -XX:PermSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC "
ui.childopts: "-server -Xmx128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC "
worker.childopts: "-server -Xmx512m -Xms512m -Xmn196m -XX:MaxPermSize=128m -XX:PermSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC "
master.heartbeat.interval.millis: 1000
master.timeout.secs: 1000
yarn.report.wait.millis: 10000
nimbusui.startup.ms: 10000
storm.messaging.transport: "backtype.storm.messaging.netty.Context"
storm.messaging.netty.buffer_size: 1048576
storm.messaging.netty.max_retries: 100
storm.messaging.netty.min_wait_ms: 1000
storm.messaging.netty.max_wait_ms: 5000
三、如上两步骤 就搭建好了
四、启动方式
bin/storm nimbus >/dev/null 2>&1 & 启动nimbus后台运行进程
bin/storm supervisor >/dev/null 2>&1 & 启动supervisor 进程
bin/storm ui >/dev/null 2>&1 & 启动UI后台运行程序,可以检测worker资源的使用情况等
五、注意事项
启动storm后台进程时候,需要对conf/storm.yarm配置文件设置的storm.local.dir目录具有写权限
启动storm后台进程的时候,将在storm安装部署目录下logs/子目录下生成各个进程的日志文件
stormUI和nimbus部署在同一台机器上,否则UI无法正常运行