4. hadoop启动脚本分析

时间:2024-01-11 08:15:14

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/目录下

    4. hadoop启动脚本分析

  2. cat start-all.sh

    4. hadoop启动脚本分析

    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. hadoop启动脚本分析

  4. cat sbin/start-dfs.sh

    4. hadoop启动脚本分析

    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

    4. hadoop启动脚本分析

    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

    4. hadoop启动脚本分析

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

    4. hadoop启动脚本分析

    4. hadoop启动脚本分析

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

    4. hadoop启动脚本分析

    4. hadoop启动脚本分析

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

3. bin下相关脚本分析

  1. cat bin/hadoop

    4. hadoop启动脚本分析

    4. hadoop启动脚本分析

  2. hadoop dfs 与 fs 的区别

    4. hadoop启动脚本分析

    4. hadoop启动脚本分析

  3. cat bin/hdfs

    4. hadoop启动脚本分析