- 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.
- Internet接入·網絡安全
- Dreamweaver CS3網頁制作融會貫通
- 反饋系統:多學科視角(原書第2版)
- B2B2C網上商城開發指南
- AWS Certified SysOps Administrator:Associate Guide
- 網絡化分布式系統預測控制
- 數據掘金
- 網絡安全技術及應用
- Unity Multiplayer Games
- INSTANT Puppet 3 Starter
- Mastering Predictive Analytics with scikit:learn and TensorFlow
- 未來學徒:讀懂人工智能飛馳時代
- Creating ELearning Games with Unity
- 中老年人學電腦與上網
- 玩轉PowerPoint