16/09/19 01:40:29 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
stopping yarn daemons
stopping resourcemanager
slavenode2: stopping nodemanager
masternode: stopping nodemanager
slavenode3: stopping nodemanager
no proxyserver to stop
[root@slavenode1 hadoop-2.7.2]# ldd lib/native/libhadoop.so.1.0.0
lib/native/libhadoop.so.1.0.0: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by lib/native/libhadoop.so.1.0.0)
linux-vdso.so.1 => (0x00007fff63bff000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fc1127c5000)
libc.so.6 => /lib64/libc.so.6 (0x00007fc112430000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc112bef000)
[root@slavenode1 hadoop-2.7.2]# ldd --version
ldd (GNU libc) 2.12
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
原来系统预装的glibc库是2.12版本,而hadoop期望是2.14版本,所以打印警告信息。
现在有两个办法,重新编译glibc.2.14版本,安装后专门给hadoop使用,这个有点危险。
第二个办法直接在log4j日志中去除告警信息。
[root@slavenode1 hadoop-2.7.2]# vi etc/hadoop/log4j.properties
log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR
9.验证hadoop
(1)验证方法一:用"jps"命令
在Master上用 java自带的小工具jps查看进程。
[root@masternodehadoop-2.7.2]# jps
19495 Jps
18849 NameNode
19051 SecondaryNameNode
19228 ResourceManager
[root@masternode centos]# jps
11664 Jps
11418 DataNode
11519 NodeManager
2)必须要关闭防火墙
[root@masternode hadoop-2.7.2]# service iptables stop
:50070/dfshealth.html#tab-datanode
3)禁用selinux
编辑 "/etc/selinux/config"文件,设置"SELINUX=disabled"
或者setenforce 0
10.网页查看集群
(1)访问"http://10.10.10.3.88:50070" 或者:50070
Hadoop安装完成之后,会有两个web管理界面,可以分别通过下面的url查看。 在浏览器中输入10.10.10.4:8088/,网址为master的ip:
在浏览器中输入:10.10.10.4:50070/,网址为master结点所对应的IP:
11.HDFS的使用
11.1 帮助
如果配置好了环境变量,直接运行hdfs命令,不加任何参数就能得到hdfs的帮助。也可以用hdfs –help得到HDFS的帮助。
[root@masternode hadoop]# hdfs -help
Usage: hdfs [--config confdir] [--loglevel loglevel] COMMAND
where COMMAND is one of:
dfs run a filesystem command on the file systems supported in Hadoop.
classpath prints the classpath