4. hadoop启动脚本分析

4. hadoop启动脚本分析

1. hadoop的端口

```  
50070		//namenode http port
50075		//datanode http port
50090		//2namenode	http port
8020		 //namenode rpc port
50010		//datanode rpc port

2. 脚本分析

  1. 首先进入/soft/hadoop/sbin/目录下

  2. cat 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

    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

    1. libexec/yarn-config.sh
    2. sbin/yarn-daemon.sh start resourcemanager
    3. sbin/yarn-daemons.sh start nodemanager
  6. cat sbin/hadoop-daemons.sh

    1. libexec/hadoop-config.sh
    2. salves
    3. sbin/hadoop-daemon.sh
  7. cat sbin/hadoop-daemon.sh


    1. libexec/hadoop-config.sh
    2. bin/hdfs ..
  8. cat sbin/yarn-daemon.sh

    1. libexec/yarn-config.sh
    2. bin/yarn

3. bin下相关脚本分析

  1. cat bin/hadoop


  2. hadoop dfs 与 fs 的区别


  3. cat bin/hdfs

posted @ 2017-06-24 00:04  刘耀  阅读(706)  评论(0编辑  收藏  举报