Spark standalone Mode

Source: Internet
Author: User

It is very easy to install a spark cluster (StandaloneMode). In my example, I usedThreeMachines.

All machines run a OSUbuntu 12.04 32bit. One machine is named"Master", The other two are

Named"Node01"And"Node02"Respectively. The name of a machine can be set in:/Etc/hostname.

Further more, on every node (MACHINE), I useSameUser name.

 

1. On every node: install Java and setjava environment in ~ /. Bashrc:

# Set Java environment

Exportjava_home =/usr/local/jdk1.7.0 _ 67

Export jre_home = $ java_home/JRE

Export Path = $ java_home/bin: $ path

Exportclasspath =.: $ java_home/lib: $ jre_home/lib

Note that in my example, I usedjavaJdk1.7.0 _ 67And put it under /Usr/local.

2. On every node: Install spark.

Download any version of spark fromhttp: // spark.apache.org/downloads.html, in my example, I

ChoseSpark-1.1.0-bin-hadoop2.4.tgzAnd extract it/Usr/local.

3. Set upSSHSuch that every two nodesin the cluster can SSH each other without password. This step

Is also needed when you set up ahadoop cluster, there are abundant tutorials on the Internet, so

The details is omitted here.

4. On every node:

$ Sudo Vim/etc/hosts

And set the IP address of the nodesin the network. For example, I set the hosts file on every node:

127.0.0.1 localhost

223.3.86.xxx master

223.3.81.xxx node01

223.3.70.xxx node02

5. OnMasterNode: Enter the rootfolder of spark, and editCon/slaves. In my example:

$ CD/usr/local/spark-1.1.0-bin-hadoop2.4

$ Sudo Vim CONF/slaves

Edit slaves file:

Master

Node01

Node02

6. OnMasterNode: Enter the rootfolder of spark and start spark cluster.

$ CD/usr/local/spark-1.1.0-bin-hadoop2.4

$ Sbin/start-all.sh

7. Open http: // master: 8080/using your web browser to monitoring the cluster.

Spark standalone Mode

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.