再利用亚马逊的弹性麻preduce实例 [英] Re-use Amazon Elastic MapReduce instance
问题描述
我已经尝试了简单的Map / Reduce使用亚马逊弹性麻preduce
的任务,只花了3分钟,完成任务。是否有可能重新使用相同的实例运行其他任务。
I have tried a simple Map/Reduce task using Amazon Elastic MapReduce
and it took just 3 mins to complete the task. Is it possible to re-use the same instance to run another task.
尽管我刚才使用的实例3分钟亚马逊将收取 1小时
,所以我想用余额57分钟运行其他几个任务。
Even though I have just used the instance for 3 mins Amazon will charge for 1 hr
, so I want to use the balance 57 mins to run several other tasks.
推荐答案
答案是肯定的。
下面是一个使用命令行客户端,你如何做到这一点:
here's how you do it using the command line client:
当你创建一个实例通过 - 活着标志,这告诉EMR保持群集的作业运行后周围
When you create an instance pass the --alive flag, this tells emr to keep the cluster around after your job has run.
然后你可以提交多个任务到集群:
Then you can submit more tasks to the cluster:
elastic-mapreduce --jobflow <job-id> --stream --input <s3dir> --output <s3dir> --mapper <script1> --reducer <script2>
要后终止集群,只需运行:
To terminate the cluster later, simply run:
elastic-mapreduce <jobid> --terminate
尝试运行弹性-MA preduce --help看到所有可以运行的命令。
try running elastic-mapreduce --help to see all the commands you can run.
如果你没有在命令行客户端,得到它这里。
If you don't have the command line client, get it here.
这篇关于再利用亚马逊的弹性麻preduce实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!