Spark Standalone Mode
It is very easy to install a Spark cluster (Standalone mode). In my example, I used three machines.
All machines run a OS of ubuntu 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, every nodes (machines) should the same user name.
1. On every node: Install Java and set Java environment in ~/.bashrc as:
#set java environment
export JAVA_HOME=/usr/local/jdk1.7.0_67
export JRE_HOME=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
Note that in my example, I used Java jdk1.7.0_67 and put it under /usr/local.
2. On every node: Install Scala and set corresponding environment variables in ~/.bashrc as:
export SCALA_HOME=/usr/local/scala-2.10.4
export PATH=$SCALA_HOME/bin:$PATH
Note that in my example, I used Scala scala-2.10.4 and put it under /usr/local.
3. On every node: Install Spark.
Download any version of Spark from http://spark.apache.org/downloads.html , in my example, I
chose spark-1.1.0-bin-hadoop2.4.tgz and extract it to /usr/local.
Set in ~/.bashrc:
export SPARK_HOME=/usr/local/spark-1.1.0-bin-hadoop2.4
4. Set up ssh such that every two nodes in the cluster can ssh each other without password. This step
is also needed when you set up a hadoop cluster, there are abundant tutorials on the Internet, so
the details is omitted here.
5. On every node:
$ sudo vim /etc/hosts
and set the IP address of the nodes in the network. For example, I set the hosts file on every node to:
127.0.0.1 localhost
223.3.86.xxx master
223.3.81.xxx node01
223.3.70.xxx node02
6. On master node: Enter the root folder of Spark, and edit con/slaves. In my example:
$ cd /usr/local/spark-1.1.0-bin-hadoop2.4
$ sudo vim conf/slaves
Edit slaves file to:
master
node01
node02
7. On master node: Enter the root folder of Spark and start spark cluster.
$ cd /usr/local/spark-1.1.0-bin-hadoop2.4
$ sbin/start-all.sh
8. Open http://master:8080/ using your web browser to monitoring the cluster.
9. Run Spark examples:
Locally:
$ MASTER=local[4] $SPARK_HOME/bin/run-example SparkLR
On cluster:
$ MASTER=spark://master:7077 $SPARK_HOME/bin/run-example SparkLR
For any questions, feel free to contact me. Email: wuzimian2006@163.com QQ: 726590906
Spark Standalone Mode的更多相关文章
- spark standalone ha spark submit
when you build a spark standalone ha cluster, when you submit your app, you should send it to the l ...
- Spark standalone HA
配置Spark standalone HA 主机:node1,node2,node3 master: node1,node2 slave:node2,node3 修改配置文件: node1,node3 ...
- spark standalone zookeeper HA部署方式
虽然spark master挂掉的几率很低,不过还是被我遇到了一次.以前在spark standalone的文章中也介绍过standalone的ha,现在详细说下部署流程,其实也比较简单. 一.机器 ...
- Windows下IntelliJ IDEA中运行Spark Standalone
ZHUAN http://www.cnblogs.com/one--way/archive/2016/08/29/5818989.html http://www.cnblogs.com/one--wa ...
- (二)win7下用Intelij IDEA 远程调试spark standalone 集群
关于这个spark的环境搭建了好久,踩了一堆坑,今天 环境: WIN7笔记本 spark 集群(4个虚拟机搭建的) Intelij IDEA15 scala-2.10.4 java-1.7.0 版本 ...
- 【原】Spark Standalone模式
Spark Standalone模式 安装Spark Standalone集群 手动启动集群 集群创建脚本 提交应用到集群 创建Spark应用 资源调度及分配 监控与日志 与Hadoop共存 配置网络 ...
- Spark standalone安装(最小化集群部署)
Spark standalone安装-最小化集群部署(Spark官方建议使用Standalone模式) 集群规划: 主机 IP ...
- Spark Standalone模式应用程序开发
作者:过往记忆 | 新浪微博:左手牵右手TEL | 能够转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明博客地址:http://www.iteblog.com/文章标题:<Spar ...
- Spark Standalone Mode Configuration
For currently popular distributed framework Spark, here is the intro and step to configure the spark ...
- Spark Standalone spark-env.sh
export JAVA_HOME=/app/jdk export SPARK_MASTER_PORT=7077 export SPARK_MASTER_WEBUI_PORT=8080 export S ...
随机推荐
- POJ1182--食物链(经典并查集)并查集看不出来系列2
食物链 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 65906 Accepted: 19437 Description ...
- jquery_api事件(二)
1.hover 一个模仿悬停事件的方法.它为频繁使用的任务提供了一种“保持在其中”的状态. 当鼠标移动到一个匹配的元素上面时,会触发指定的第一个函数.当鼠标移出这个元素时,会触发指定的第二个函数.而且 ...
- pur-ftpd在ubuntu上的安装
1.安装 apt-get install pure-ftpd 2.建立ftp目录 /var/ftp/public 3.建立ftp用户组 groupadd ftpgroup 4.建立ftp非系统用户 u ...
- (转).net下Selenium2使用方法总结
一.Selenium简介 1.Selenium1(Selenium RC) Selenium2(Selenium WebDriver) Selenium2.0 = Selenium1.0 + W ...
- HDU 3691 Nubulsa Expo
无向图的最小割.套了个模板. #include<iostream> #include<cstdio> #include<cstring> #include<a ...
- USACO Section 1.3 Ski Course Design 解题报告
题目 题目描述 有N座山,每座山都有一个高度,现在由于农夫想避税,所以想把这些山的高度进行一些改变,使得最高的山与最低的山之间的高度差不超过17.每座山最多只能改变一次高度,每次改变高度都会产生一定的 ...
- Android Studio的使用(十一)--每次打开时选择项目,而不是直接进入上次项目
1.打开的时候选择打开哪一个项目 2.需要在设置System Setting,不要勾选Reopen last project on startup项.
- CNS数据库网站只用mysql自带的fulltext index功能就可实现了。
1)编辑脚本script.sql如下 ALTER TABLE `table_name` ADD FULLTEXT (`column_name`) 2)在mysql console下输入命令 SOURC ...
- zf-关于公司框架的时间字段的格式转换问题。。
<ww:date value="" format="yyyy-MM-dd">
- 页面加载完毕执行多个JS函数
通常我们需要在打开页面时加载脚本,这些脚本必须在页面加载完毕后才可以执行,因为这时候DOM才完整,可以利用window.onload确保这一点,如:window.onload=firstFunctio ...