脚本分析start-all.sh
1)首先进入/soft/Hadoop/sbin目录
2)nano start-all.sh
sbin/start-all.sh主要做的事情:
1) libexec/hadoop-config.sh
2) start-dfs.sh
3) start-yarn.sh
3)cat libexec/hadoop-config.sh hadoop_conf_dir =etc/hadoop
4)cat sbin/start-dfs.sh
sbin/start-dfs.sh的作用:
1)libexec/hadoop-config.sh
2)sbin/hadoop-daemons.sh –config .. –hostname .. start namenode …
3)sbin/hadoop-daemons.sh –config .. –hostname .. start datanode …
4)sbin/hadoop-daemons.sh –config .. –hostname .. start sescondarynamenode …
5)sbin/hadoop-daemons.sh –config .. –hostname .. start zkfc …//
5)cat sbin/start-yarn.sh
libexec/yarn-config.sh作用
sbin/yarn-daemon.sh start resourcemanager
sbin/yarn-daemons.sh start nodemanager
6)cat sbin/hadoop-daemons.sh
sbin/hadoop-daemons.sh的作用:
libexec/hadoop-config.sh
slaves
hadoop-daemon.sh
7)cat sbin/hadoop-daemon.sh
sbin/hadoop-daemon.sh的作用
libexec/hadoop-config.sh
bin/hdfs …
8)sbin/yarn-daemon.sh
sbin/yarn-daemon.sh作用
libexec/yarn-config.sh
bin/yarn
Start-all.sh ===config.sh—-start-dfs.sh 和start-yarn.sh
Start-dfs.sh —–config.sh—-(namenode,send,datanode)
Stop-dfs.sh——config—————————————
hadoop-daemon.sh ———–>
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/196161.html