在执行bin/hadoop checknative 命令时
刚装的hadoop2.2的集群,在执行bin/hadoop checknative 命令时,出现如下警告:
bizip2的的本地压缩支持无效,整个编译过程,并没有出现任何错误,或异常,而且去cenots下的lib64位目录下,查看libbz2的so文件,发现也正常
[root@ph2 hadoop-2.2.0]# ll /lib64/libb* lrwxrwxrwx. 1 root root 17 7月 16 01:49 /lib64/libblkid.so.1 -> libblkid.so.1.1.0 -rwxr-xr-x. 1 root root 136136 11月 22 2013 /lib64/libblkid.so.1.1.0 lrwxrwxrwx. 1 root root 15 7月 16 01:49 /lib64/libbz2.so.1 -> libbz2.so.1.0.4 -rwxr-xr-x. 1 root root 67592 6月 25 2011 /lib64/libbz2.so.1.0.4 [root@ph2 hadoop-2.2.0]#
[root@ph2 hadoop-2.2.0]# ll /lib64/libb* lrwxrwxrwx. 1 root root 17 7月 16 01:49 /lib64/libblkid.so.1 -> libblkid.so.1.1.0 -rwxr-xr-x. 1 root root 136136 11月 22 2013 /lib64/libblkid.so.1.1.0 lrwxrwxrwx. 1 root root 15 7月 16 01:49 /lib64/libbz2.so.1 -> libbz2.so.1.0.4 -rwxr-xr-x. 1 root root 67592 6月 25 2011 /lib64/libbz2.so.1.0.4 [root@ph2 hadoop-2.2.0]#
那么问题出现在哪里呢? 经google查找,发现这是hadoop2.3之前版本都有的一个问题,具体的原因,请点击此处问题的具体原因,就是因为在编译hadoop时,由于centos系统没有安装bzip2-devel库文件,导致的,然后,散仙在本机上使用命令:
rpm -qa bzip2-devel
rpm -qa bzip2-devel
查询是否安装这个库,结果,果然没有安装,知道原因后,解决就很简单了,使用
yum install -y bzip2-devel命令,安装bzip2-devel库支持,然后重新编译我们的hadoop即可。
编译完成后,再次执行bin/hadoop checknative命令后,发现已经支持bzip2,压缩:
[root@ph2 hadoop-2.2.0]# bin/hadoop checknative 14/12/17 02:04:56 INFO bzip2.Bzip2Factory: Successfully loaded & initialized native-bzip2 library system-native 14/12/17 02:04:56 INFO zlib.ZlibFactory: Successfully loaded & initialized native-zlib library Native library checking: hadoop: true /root/hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0/lib/native/libhadoop.so.1.0.0 zlib: true /lib64/libz.so.1 snappy: false lz4: true revision:43 bzip2: true /lib64/libbz2.so.1 [root@ph2 hadoop-2.2.0]#
[root@ph2 hadoop-2.2.0]# bin/hadoop checknative 14/12/17 02:04:56 INFO bzip2.Bzip2Factory: Successfully loaded & initialized native-bzip2 library system-native 14/12/17 02:04:56 INFO zlib.ZlibFactory: Successfully loaded & initialized native-zlib library Native library checking: hadoop: true /root/hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0/lib/native/libhadoop.so.1.0.0 zlib: true /lib64/libz.so.1 snappy: false lz4: true revision:43 bzip2: true /lib64/libbz2.so.1 [root@ph2 hadoop-2.2.0]#
相关推荐
changjiang 2020-11-16
minerd 2020-10-28
WeiHHH 2020-09-23
Aleks 2020-08-19
WeiHHH 2020-08-17
飞鸿踏雪0 2020-07-26
tomli 2020-07-26
deyu 2020-07-21
strongyoung 2020-07-19
eternityzzy 2020-07-19
Elmo 2020-07-19
飞鸿踏雪0 2020-07-09
飞鸿踏雪0 2020-07-04
xieting 2020-07-04
WeiHHH 2020-06-28
genshengxiao 2020-06-26
Hhanwen 2020-06-25