- Machine Learning with Spark(Second Edition)
- Rajdeep Dua Manpreet Singh Ghotra Nick Pentreath
- 366字
- 2021-07-09 21:07:43
Getting Spark running on Amazon EC2
The Spark project provides scripts to run a Spark cluster in the cloud on Amazon's EC2 service. These scripts are located in the ec2 directory. You can run the spark-ec2 script contained in this directory with the following command:
>./ec2/spark-ec2
Running it in this way without an argument will show the help output:
Usage: spark-ec2 [options] <action> <cluster_name>
<action> can be: launch, destroy, login, stop, start, get-master
Options:
...
Before creating a Spark EC2 cluster, you will need to ensure that you have an
Amazon account.
The AWS console is available at http://aws.amazon.com/console/.
You will also need to create an Amazon EC2 key pair and retrieve the relevant security credentials. The Spark documentation for EC2 (available at http://spark.apache.org/docs/latest/ec2-scripts.html) explains the requirements:
When creating a key pair, choose a name that is easy to remember. We will simply use the name spark for the key pair. The key pair file itself will be called spark.pem. As mentioned earlier, ensure that the key pair file permissions are set appropriately and that the environment variables for the AWS credentials are exported using the following commands:
$ chmod 600 spark.pem
$ export AWS_ACCESS_KEY_ID="..."
$ export AWS_SECRET_ACCESS_KEY="..."
You should also be careful to keep your downloaded key pair file safe and not lose it, as it can only be downloaded once when it is created!
Note that launching an Amazon EC2 cluster in the following section will incur costs to your AWS account.
- Unreal Engine:Game Development from A to Z
- 現(xiàn)代測(cè)控系統(tǒng)典型應(yīng)用實(shí)例
- Hands-On Internet of Things with MQTT
- 輕松學(xué)Java Web開發(fā)
- Ansible Quick Start Guide
- Practical Data Wrangling
- 反饋系統(tǒng):多學(xué)科視角(原書第2版)
- 計(jì)算機(jī)應(yīng)用復(fù)習(xí)與練習(xí)
- VB語言程序設(shè)計(jì)
- Photoshop CS3特效處理融會(huì)貫通
- 中國戰(zhàn)略性新興產(chǎn)業(yè)研究與發(fā)展·智能制造
- Visual C++編程全能詞典
- 精通數(shù)據(jù)科學(xué)算法
- 人工智能趣味入門:光環(huán)板程序設(shè)計(jì)
- Grome Terrain Modeling with Ogre3D,UDK,and Unity3D