页面树结构

2017-11-09 ApacheCN 开源组织,第二期邀请成员活动,一起走的更远 : http://www.apachecn.org/member/209.html


MachineLearning 优酷地址 : http://i.youku.com/apachecn

转至元数据结尾
转至元数据起始

1.配置storm

mkdir -p /data/storm/storm-local /data/storm/healthchecks

vim conf/storm.yaml

storm.local.dir: "/data/storm/storm-local"
storm.health.check.dir: "/data/storm/healthchecks"
storm.health.check.timeout.ms: 5000
storm.cluster.mode: "distributed"
storm.zookeeper.servers:
    - apachecn.org-19
    - apachecn.org-20
    - apachecn.org-21
storm.zookeeper.port: 2181
storm.zookeeper.root: "/storm"
nimbus.seeds: []


supervisor.slots.ports:
    - 6701
    - 6702
    - 6703
    - 6704
    - 6705


ui.host: apachecn.org-16
ui.port: 8080


nimbus.childopts: "-Xmx1024m"
supervisor.childopts: "-Xmx1024m"
worker.childopts: "-Xmx768m"

 

2.权限分配

# 同步软件
pscp -A -h ~/apachecn/ip_slave.txt -t 0 -e ./error/ -l root -r /opt/storm /opt
# 同步日志
pscp -A -h ~/apachecn/ip_slave.txt -t 0 -e ./error/ -l root -r /data/storm /data
# 分配权限
pssh -A -h ~/apachecn/ip_list.txt -e ./error/ -l root "chown -R hadoopuser.hadoopuser /opt/storm;chown -R hadoopuser.hadoopuser /data/storm"

 

3.批启动脚本:
sh start_storm_all.sh
sh start_storm_master.sh
sh start_storm_slave.sh
vim start_storm_master.sh
# 启动master
pssh -h ~/apachecn/ip_master.txt -e ./error/ "/opt/storm/bin/storm nimbus >/dev/null 2>&1 &"
# 启动slave
pssh -h ~/apachecn/ip_slave.txt -e ./error/ "/opt/storm/bin/storm supervisor >/dev/null 2>&1 &"
# 启动logviewer
pssh -h ~/apachecn/ip_list.txt -e ./error/ "/opt/storm/bin/storm logviewer >/dev/null 2>&1 &"
# 启动ui
pssh -h ~/apachecn/ip_ui.txt -e ./error/ "/opt/storm/bin/storm ui >/dev/null 2>&1 &"

vim stop_storm_all.sh
pssh -h ~/apachecn/ip_list.txt -t 0 -e ./error/ -P "kill `ps -ef | egrep '(storm.daemon.nimbus)|(storm.ui.core)|(storm.daemon.logviewer)|(storm.daemon.supervisor)'| grep -v grep | awk '{print $2}'`"

pssh -h ~/apachecn/ip_list.txt -t 0 -e ./error/ -P "ps -ef | egrep '(storm.daemon.nimbus)|(storm.ui.core)|(storm.daemon.logviewer)|(storm.daemon.supervisor)'| grep -v grep | awk '{print $2}' | xargs kill"

pnuke -h ~/apachecn/ip_list.txt -t 0 -e ./error/ "ps -ef | egrep '(storm\.daemon\.nimbus)|(storm\.ui\.core)|(storm\.daemon\.logviewer)|(storm\.daemon\.supervisor)'| grep -v grep | awk '{print $2}'"

 

  • 无标签