You can use the --auto-shutdown option to automatically terminate a cluster at a specified number of minutes after launch. This is useful for short-lived clusters where the jobs complete in a known amount of time.
To configure the automatic shutdown (for example, 50 minutes after launch):
hadoop-ec2 launch-cluster --auto-shutdown 50 my-hadoop-cluster 2
You can also use the configuration property auto_shutdown in the configuration file; for example, to shut down 50 minutes after launch, you would use auto_shutdown=50.
To cancel the automatic shutdown:
% hadoop-ec2 exec my-hadoop-cluster shutdown -c % hadoop-ec2 update-slaves-file my-hadoop-cluster % hadoop-ec2 exec my-hadoop-cluster /usr/lib/hadoop/bin/slaves.sh shutdown -c