hadoop启动脚本分析及常见命令

Posted 一只宅男的自我修养

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hadoop启动脚本分析及常见命令相关的知识,希望对你有一定的参考价值。

进程
------------------
[hdfs]start-dfs.sh
NameNode NN
DataNode DN
SecondaryNamenode 2NN

[yarn]start-yarn.sh
ResourceMananger RM
NodeManager NM


脚本分析
-------------------
sbin/start-all.sh
--------------
  libexec/hadoop-config.sh
  start-dfs.sh
  start-yarn.sh

  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 ... //

sbin/start-yarn.sh
--------------
  libexec/yarn-config.sh
  bin/yarn-daemon.sh start resourcemanager
  bin/yarn-daemons.sh start nodemanager

 

sbin/hadoop-daemons.sh
----------------------
  libexec/hadoop-config.sh

  slaves

  hadoop-daemon.sh

 

sbin/hadoop-daemon.sh
-----------------------
  libexec/hadoop-config.sh
  bin/hdfs ....

 

sbin/yarn-daemon.sh
-----------------------
  libexec/yarn-config.sh
  bin/yarn


bin/hadoop
------------------------
  hadoop verion //版本
  hadoop fs //文件系统客户端.
  hadoop jar //
  hadoop classpath
  hadoop checknative


bin/hdfs
------------------------
dfs // === hadoop fs
classpath
namenode -format
secondarynamenode
namenode
journalnode
zkfc
datanode
dfsadmin
haadmin
fsck
balancer
jmxget
mover

oiv
oiv_legacy
oev
fetchdt
getconf
groups
snapshotDiff

lsSnapshottableDir

portmap
nfs3
cacheadmin
crypto
storagepolicies
version

hdfs常用命令
--------------------
$>hdfs dfs -mkdir /user/centos/hadoop
$>hdfs dfs -ls -r /user/centos/hadoop
$>hdfs dfs -lsr /user/centos/hadoop
$>hdfs dfs -put index.html /user/centos/hadoop
$>hdfs dfs -get /user/centos/hadoop/index.html a.html
$>hdfs dfs -rm -r -f /user/centos/hadoop



















































































以上是关于hadoop启动脚本分析及常见命令的主要内容,如果未能解决你的问题,请参考以下文章

Hadoop日志分析系统启动脚本

hadoop 集群启动命令shell脚本

脚本启动集群 zookeeper , hadoop

脚本启动集群 zookeeper , hadoop

Hadoop

android init进程分析 init脚本解析和处理