Hadoop 啓動/中止集羣和節點的命令

集羣
啓動/中止Hadoop集羣:start-all.sh    stop-all.shhtml

1) 啓動NameNode, DataNodenode

2) 啓動JournalNode, JournalNode在hdfs-site.xml中指定edits log存儲的位置,主備NameNode共享數據,方便同步shell

3) 啓動DFSZKFailoverController, HA會啓用ZooKeeper Failover Controllerapache

4) 啓動YARN守護進程ResourceManager, NodeManagerssh

啓動/中止HDFS集羣:start-dfs.sh    stop-dfs.shoop

1) 啓動NameNode, DataNode.net

2) 啓動JournalNode, JournalNode在hdfs-site.xml中指定edits log存儲的位置,主備NameNode共享數據,方便同步orm

3) 啓動DFSZKFailoverController, HA會啓用ZooKeeper Failover Controllerxml

啓動/中止YARN集羣:start-yarn.sh    stop-yarn.shhtm

聽說若是ResourceManager和NameNode不在同一臺機器上,那NameNode上沒法直接使用start-yarn.sh啓動ResourceManager,但NodeManager能夠啓動,ResourceManager須要在ResourceManager節點上啓動,這一點待考證

 

節點
啓動NameNode: hadoop-daemon.sh start namenode

啓動DataNode: hadoop-daemon.sh start datanode

啓動JournalNode節點: hadoop-daemon.sh start journalnode

啓動zkfc節點:hadoop-daemon.sh start zkfc

啓動ResourceManager: yarn-daemon.sh start resourcemanager

啓動NodeManager: yarn-daemon.sh start nodemanager

啓動ZooKeeper節點:zkServer.sh start    啓動QuorumPeerMain進程

查看ZooKeeper節點狀態:zkServer.sh status    查看leader和follower狀態

格式化HDFS: hdfs namenode -format

格式化ZKFC:hdfs zkfc -formatZK

查看NameNode和DataNode信息: hdfs dfsadmin -report

查看高可用NameNode狀態: hdfs haadmin -getServiceState nn1 (active/standby)

 

Web界面端口
NameNode 50070

DataNode 50075

ResourceManager 8088

NodeManager 8042

更多端口參考

 

安裝,查看等經常使用命令 

查看進程:jps

kill進程:kill -9 pid

內容追加到文件:echo content > file, 如 echo 1 > myid

SSH拷貝:scp,如scp -r /usr/local/hadoop master:/usr/local

關閉防火牆:

查看狀態systemctl status firewalld

關閉防火牆systemctl stop firewalld

開機禁用防火牆systemctl disable firewalld

配置免登陸:

ssh-keygen -t rsa

ssh-copy-id -i host01

 

Hadoop Shell命令   http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_shell.html 原文連接:https://blog.csdn.net/weixin_42129080/article/details/80738631

相關文章
相關標籤/搜索