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. 脚本分析
-
首先进入/soft/hadoop/sbin/目录下
-
cat start-all.sh
- libexec/hadoop-config.sh
- start-dfs.sh
- start-yarn.sh
-
cat libexec/hadoop-config.sh
hadoop_conf_dir =etc/hadoop
-
cat sbin/start-dfs.sh
- libexec/hadoop-config.sh
- sbin/hadoop-daemons.sh --config .. --hostname .. start namenode ...
- sbin/hadoop-daemons.sh --config .. --hostname .. start datanode ...
- sbin/hadoop-daemons.sh --config .. --hostname .. start sescondarynamenode ...
- sbin/hadoop-daemons.sh --config .. --hostname .. start zkfc ...
-
cat sbin/start-yarn.sh
- libexec/yarn-config.sh
- sbin/yarn-daemon.sh start resourcemanager
- sbin/yarn-daemons.sh start nodemanager
-
cat sbin/hadoop-daemons.sh
- libexec/hadoop-config.sh
- salves
- sbin/hadoop-daemon.sh
-
cat sbin/hadoop-daemon.sh
- libexec/hadoop-config.sh
- bin/hdfs ..
-
cat sbin/yarn-daemon.sh
- libexec/yarn-config.sh
- bin/yarn
3. bin下相关脚本分析
-
cat bin/hadoop
-
hadoop dfs 与 fs 的区别
-
cat bin/hdfs