- 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.
- Clojure Data Analysis Cookbook
- Instant Raspberry Pi Gaming
- Unreal Engine:Game Development from A to Z
- 網(wǎng)絡(luò)服務(wù)器架設(shè)(Windows Server+Linux Server)
- Hadoop 2.x Administration Cookbook
- 實(shí)時(shí)流計(jì)算系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)
- 精通Excel VBA
- 嵌入式Linux上的C語(yǔ)言編程實(shí)踐
- 流處理器研究與設(shè)計(jì)
- 讓每張照片都成為佳作的Photoshop后期技法
- Apache源代碼全景分析(第1卷):體系結(jié)構(gòu)與核心模塊
- 青少年VEX IQ機(jī)器人實(shí)訓(xùn)課程(初級(jí))
- 一步步寫嵌入式操作系統(tǒng)
- Xilinx FPGA高級(jí)設(shè)計(jì)及應(yīng)用
- 設(shè)計(jì)模式