Installing Spark and Scala

Source: Internet
Author: User

Tag: Spark installs Scala

1. Download Spark

Http://mirrors.cnnic.cn/apache/spark/spark-1.3.0/spark-1.3.0-bin-hadoop2.3.tgz


2. Download Scala

Http://www.scala-lang.org/download/2.10.5.html


3. Install Scala

Mkdir/usr/lib/scala

TAR–ZXVF scala-2.10.5.tgz

MV Scala-2.10.5/usr/lib/scala


4. Set Scala path

Vim/etc/bashrc

Export scala_home=/usr/lib/scala/scala-2.10.5

Export path= $SCALA _home/bin: $PATH

Source/etc/bashrc

Scala–version


5. Distribution

Scp-r/usr/lib/scala/hd2:/usr/lib/scala

Scp-r/usr/lib/scala/hd3:/usr/lib/scala

Scp-r/usr/lib/scala/hd4:/usr/lib/scala

Scp-r/usr/lib/scala/hd5:/usr/lib/scala

SCP/ETC/BASHRC HD2:/ETC/BASHRC

SCP/ETC/BASHRC HD3:/ETC/BASHRC

SCP/ETC/BASHRC HD4:/ETC/BASHRC

SCP/ETC/BASHRC HD5:/ETC/BASHRC


6. Install Spark

TAR-ZXVF spark-1.3.0-bin-hadoop2.3.tgz

Mkdir/usr/local/spark

MV Spark-1.3.0-bin-hadoop2.3/usr/local/spark


Vim/etc/bashrc

Export spark_home=/usr/local/spark/spark-1.3.0-bin-hadoop2.3

Export path= $SCALA _home/bin: $SPARK _home/bin: $PATH


Source/etc/bashrc

cd/usr/local/spark/spark-1.3.0-bin-hadoop2.3/conf/

CP Spark-env.sh.template spark-env.sh


Vim spark-env.sh

Export Java_home=/java

Export scala_home=/usr/lib/scala/scala-2.10.5

Export spark_home=/usr/local/spark/spark-1.3.0-bin-hadoop2.3

Export spark_master_ip=192.168.137.101

Export SPARK_WORKER_MEMORY=1G

Export Hadoop_conf_dir=/home/hadoop/hadoop/etc/hadoop

Export Spark_library_path= $SPARK _home/lib

Export Scala_library_path= $SPARK _library_path


CP Slaves.template Slaves


Vim Slaves

Hd1

hd2

Hd3

Hd4

Hd5


7. Distribution

SCP/ETC/BASHRC hd2:/etc

SCP/ETC/BASHRC hd3:/etc

SCP/ETC/BASHRC hd4:/etc

SCP/ETC/BASHRC hd5:/etc

Scp-r/usr/local/spark/spark-1.3.0-bin-hadoop2.3 hd2:/usr/local/spark/

Scp-r/usr/local/spark/spark-1.3.0-bin-hadoop2.3 hd3:/usr/local/spark/

Scp-r/usr/local/spark/spark-1.3.0-bin-hadoop2.3 hd4:/usr/local/spark/

Scp-r/usr/local/spark/spark-1.3.0-bin-hadoop2.3 hd5:/usr/local/spark/


7. Start

In HD1, start

CD $SPARK _home/sbin

./start-all.sh


Installing Spark and Scala

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.