截至到当前为止,spark最新版本为1.0.1。本文测试环境的操作系统是CentOS 7.0 x86_64,jdk为1.7.0_51。编译spark和编译hadoop类似,是一个很简单的过程。
1. 下载spark源代码
1 |
wget http://d3kbcqa49mib13.cloudfront.net/spark-1.0.1.tgz |
2. 安装maven或sbt
(1). java-devel是必须要安装的包
1 |
yum -y install java-devel |
(2). 安装maven
1 |
yum -y install maven |
检查maven
1 2 3 4 5 6 7 |
# mvn -v Apache Maven 3.0.5 (Red Hat 3.0.5-16) Maven home: /usr/share/maven Java version: 1.7.0_55, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55-2.4.7.2.el7_0.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-123.4.2.el7.x86_64", arch: "amd64", family: "unix" |