CentOS 6.7安装Hadoop 2.7.3(2)

在Master服务器启动hadoop,从节点会自动启动,进入/usr/software/hadoop-2.7.3目录
(1)初始化,输入命令,bin/hdfs namenode -format
(2)启动sbin/start-dfs.sh,输出如下内容,则成功

Starting namenodes on [master-01] master-01: starting namenode, logging to /usr/software/hadoop-2.7.3/logs/hadoop-yang-namenode-master-01.out slave-01: starting datanode, logging to /usr/software/hadoop-2.7.3/logs/hadoop-yang-datanode-slave-01.out slave-02: starting datanode, logging to /usr/software/hadoop-2.7.3/logs/hadoop-yang-datanode-slave-02.out Starting secondary namenodes [master-01] master-01: starting secondarynamenode, logging to /usr/software/hadoop-2.7.3/logs/hadoop-yang-secondarynamenode-master-01.out

(3)sbin/start-yarn.sh,如下则成功

[yang@master-01 hadoop-2.7.3]$ ./sbin/start-yarn.sh starting yarn daemons starting resourcemanager, logging to /usr/software/hadoop-2.7.3/logs/yarn-yang-resourcemanager-master-01.out slave-02: starting nodemanager, logging to /usr/software/hadoop-2.7.3/logs/yarn-yang-nodemanager-slave-02.out slave-01: starting nodemanager, logging to /usr/software/hadoop-2.7.3/logs/yarn-yang-nodemanager-slave-01.out

(4)停止的话,输入命令,sbin/stop-dfs.sh,sbin/stop-yarn.sh
(5)输入命令,jps,可以看到相关信息

yang@master-01 hadoop-2.7.3]$ jps 6932 SecondaryNameNode 7384 Jps 6729 NameNode 7118 ResourceManager [yang@master-01 hadoop-2.7.3]$ ./bin/hdfs dfsadmin -report Configured Capacity: 75404550144 (70.23 GB) Present Capacity: 54191501312 (50.47 GB) DFS Remaining: 54191452160 (50.47 GB) DFS Used: 49152 (48 KB) DFS Used%: 0.00% Under replicated blocks: 0 Blocks with corrupt replicas: 0 Missing blocks: 0 Missing blocks (with replication factor 1): 0 ------------------------------------------------- Live datanodes (2): Name: 192.168.197.133:50010 (slave-01) Hostname: slave-01 Decommission Status : Normal Configured Capacity: 37702275072 (35.11 GB) DFS Used: 24576 (24 KB) Non DFS Used: 10606755840 (9.88 GB) DFS Remaining: 27095494656 (25.23 GB) DFS Used%: 0.00% DFS Remaining%: 71.87% Configured Cache Capacity: 0 (0 B) Cache Used: 0 (0 B) Cache Remaining: 0 (0 B) Cache Used%: 100.00% Cache Remaining%: 0.00% Xceivers: 1 Last contact: Tue Sep 27 17:18:44 CST 2016 Name: 192.168.197.134:50010 (slave-02) Hostname: slave-02 Decommission Status : Normal Configured Capacity: 37702275072 (35.11 GB) DFS Used: 24576 (24 KB) Non DFS Used: 10606292992 (9.88 GB) DFS Remaining: 27095957504 (25.24 GB) DFS Used%: 0.00% DFS Remaining%: 71.87% Configured Cache Capacity: 0 (0 B) Cache Used: 0 (0 B) Cache Remaining: 0 (0 B) Cache Used%: 100.00% Cache Remaining%: 0.00% Xceivers: 1 Last contact: Tue Sep 27 17:18:44 CST 2016 Web访问直接关闭防火墙

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/ece42ce32c13aaff7c848768a5ee587f.html