使用brew安装的hadoop默认版本使用时总是提示
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
不能忍,简单方法修改hadoop log level,永久方法是 自己重新编译hadoop源码,然后将编译后的native放到brew安装的源码里。
官网给的解释是:
The pre-built 32-bit i386-Linux native hadoop library is available
as part of the hadoop distribution and is located in the lib/native directory.
You can download the hadoop distribution from Hadoop Common Releases.
The native hadoop library is supported on *nix platforms only.
The library does not to work with Cygwin or the Mac OS X platform.
编译之前准备:
安装maven,openssl,cmake, protocbuf2.5.0(一定要用2.5,其他版本不行)
1.brew install maven openssl cmake
2.安装protobuf 2.5
官网上已经找不到2.5的tar.gz包了,从网上找了一份放网盘了链接: https://pan.baidu.com/s/1VoCtXBayeDKc3m7N9Jniiw 提取码: bdvg。安装过程省略
3. 据说编译过程中会在$JAVA_H