Installation. Hadoop 2.2.0 build native code
来源:互联网 发布:淘宝汽车服务指定安装 编辑:程序博客网 时间:2024/05/22 15:12
由于实验室工作
不断地安装了好几次hadoop环境
趁印象还深刻
赶紧mark下先重要步骤
如果不build native code
直接搭建hadoop也是没问题的
只是每次用terminal运行hadoop的时候一定都会在开始有一大堆提示:
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /opt/hadoop-2.2.0/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.13/11/01 10:58:59 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable主要原因是默认提供的是32bits的libhadoop
所以64bits的使用不了,然后只能用Java的code
由于native code是用c写,实际上运行起来的效能肯定会比Java好。
build完native code会生成一个 hadoop-2.2.0.tar.gz
我们再用这个去搭建hadoop环境
而不是使用官方的直接下载。
(为了突显重点就居中好了)步骤如下:
1. 由于是用c写的,所以build native code肯定需要很多c的编译工具,在terminal执行一下语句:
- sudo apt-get install build-essential,
- sudo apt-get install g++ autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev,(中间有空格的)
- sudo apt-get install maven
2. 还要下载一个叫protoco buffer, 从这里下载: protoco buffer下载 , 在terminal执行以下语句: (其实可以在termianl执行 protobuf -version检查是否安装了)
- tar zxvf protobuf-2.5.0.tar.gz
- cd protobuf-2.5.0
- ./config --prefix=/usr
- make
- make check
- sudo make install
3. 从官网上下载hadoop-2.2.0.src.tar.gz. 记着是src!然后解压缩后, 进入到该目录, 用maven执行命令
- tar zxvf hadoop-2.2.0-src.tar.gz
- cd hadoop-2.2.0-src
- mvn package -Pdist,native -DskipTests, -Dtar
PS. 重重的PS, 其它版本的hadoop可以不执行一下步骤, 直接按照上面1,2,3执行, 版本改回去你们相应的版本就好. 但是hadoop-2.2.0的用于必须执行这步才能执行步骤3
- cd hadoop-2.2.0-src/hadoop-common-project/hadoop-auth
- sudo nano pom.xml
- 按下面修改后在执行步骤3
<dependency><groupId>org.mortbay.jetty</groupId>+ <artifactId>jetty-util</artifactId>+ </dependency>+ <scope>test</scope>+ <dependency><artifactId>jetty</artifactId>+ <groupId>org.mortbay.jetty</groupId> <scope>test</scope></dependency>
- 最后看到BUILD SUCCESS后, 在hadoop-2.2.0-src/hadoop-dist/target/ 下找到hadoop-2.2.0.tar.gz
- 我们将使用这个包来进行hadoop完全分布式环境的搭建
0 0
- Installation. Hadoop 2.2.0 build native code
- Hadoop installation. Build native library
- BUILD HADOOP NATIVE LIBRARIES
- Installation. Hadoop-2.2.0 Cluster Setup
- How to build android libcore/luni, native code?
- Hadoop 2.x build native library on Mac os x
- Hadoop 2.x build native library on Mac os x
- FFMPEG Installation compile build
- Native code
- Hadoop 2.0 native lib build failed, Hadoop 2.0 本地库编译失败
- Hadoop installation. Hadoop fully distributed install (2.6.0)
- Hadoop | SequenceFile doesn't work with GzipCodec without native-hadoop code 异常解决
- Hadoop Installation on Linux
- Hadoop Installation - Pseudodistributed Mode
- Hadoop installation on windows
- ARM64 qemu native build
- Postfix Installation From Source Code
- postgresql Installation from Source Code
- Android 客户端访问服务器以及服务器开发
- 解决 ADB端口被占用问题
- chromium进程间通信-ChannelImpl
- 2015阿里巴巴研发笔试题
- 利用XmlTextReader读取XML节点数据
- Installation. Hadoop 2.2.0 build native code
- Git使用教程
- PHP性能优化的五条技巧
- 解决cocos2d-x和android activity互相调用时切换慢的问题
- qt_qtNanomite学习
- 第十周项目一 getch()隐藏字符 输入密码
- Association Rules--FP-growth Algorithm
- STM32小车
- 【游大观园】诗一首