Install SparkR

SparkR on EC2

Shivaram Venkataraman edited this page on 19 Feb 2015 · 7 revisions

 Pages 6

Clone this wiki locally

 Clone in Desktop

This page describes steps to use SparkR on EC2.

Cluster launch

First, launch an EC2 cluster using Spark's EC2 scripts. Note that you should use EC2 scripts which ship with Spark >= 0.9.0 for SparkR to work correctly.

Installing dependencies

Next login to the EC2 cluster by running ./spark-ec2 -k <keypair> -i <key-file> login <cluster-name>.

Install SparkR

Now we are ready to install SparkR on EC2 cluster. To do this we need to build SparkR with the same Spark version that is running on the cluster. (You can find this by running cat /root/spark/RELEASE). To install SparkR on all your machines you can run:

cd /root
git clone https://github.com/amplab-extras/SparkR-pkg.git
cd SparkR-pkg
SPARK_VERSION=1.2.1 ./install-dev.sh
cp -a /root/SparkR-pkg/lib/SparkR /usr/share/R/library/
/root/spark-ec2/copy-dir /root/SparkR-pkg
/root/spark/sbin/slaves.sh cp -a /root/SparkR-pkg/lib/SparkR /usr/share/R/library/

Launch SparkR

Finally to launch SparkR and connect to the Spark EC2 cluster, we run

MASTER=spark://<master_hostname>:7077 ./sparkR

where <master_hostname> can be queried using:

cat /root/spark-ec2/cluster-url

You can check if you are using the EC2 cluster using Spark's Web UI athttp://<master_hostname>:8080.

转载于:https://my.oschina.net/thomas2/blog/605561

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值