Amazon Elastic MapReduce
Developer Guide (API Version 2009-11-30)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Terminate a Job Flow

This section describes the methods to terminate a job flow. You can terminate job flows in the STARTING, RUNNING, or WAITING states. A job flow in the WAITING state must be terminated or it runs indefinitely, generating charges to your account. You can terminate a job flow that fails to leave the STARTING state or is unable to complete a step.

Depending on the configuration of the job flow, it may take up to 5-20 minutes for the job flow to completely terminate and release allocated resources, such as Amazon E2 instances.

Amazon EMR Console

You can terminate a job flow using the Amazon EMR console.

To terminate a job flow

  1. Sign in to the AWS Management Console and open the Amazon Elastic MapReduce console at https://console.aws.amazon.com/elasticmapreduce/.

  2. Select the job flow you want to terminate.

  3. Click Terminate.

    The Terminate Job Flow(s) confirmation dialog box appears.

  4. Click Yes, Terminate.

    Amazon Elastic MapReduce (Amazon EMR) terminates the instances in the cluster and stops saving log data.

using the CLI

To terminate a job flow, use the --terminate parameter and specify the job flow to terminate. The example that follows uses job flow j-C019299B1X.

To terminate a job flow

  • If you are using Enter the following...
    Linux or UNIX
    & ./elastic-mapreduce --terminate j-C019299B1X 
    Microsoft Windows
    c:\ruby elastic-mapreduce --terminate j-C019299B1X 

    The response is similar to the following:

    Terminated job flow j-C019299B1X

API

The TerminateJobFlows operation ends step processing, uploads any log data from Amazon EC2 to Amazon S3 (if configured), and terminates the Hadoop cluster. A job flow also terminates automatically if you set KeepJobAliveWhenNoSteps to False in a RunJobFlows request.

You can use this action to terminate either a single job flow or a list of job flows by their job flow IDs.

The following request shows how to terminate a job flow using a <JobFlowID>.

To terminate a job flow

  • Issue a request similar to the following. In this example, three job flows are terminated.

    https://elasticmapreduce.amazonaws.com?
    JobFlowIds.member.1=j-3UN6SOUERO2AG,j-3UN6WX5RR438r7,j-3UN6DUER23849&
    Operation=TerminateJobFlows&
    AWSAccessKeyId=AccessKeyID&
    SignatureVersion=2&
    SignatureMethod=HmacSHA256&
    Timestamp=2009-01-28T21%3A53%3A50.000Z&
    Signature=calculated value

    The response contains the request ID.

For more information about the input parameters unique to TerminateJobFlows, go to TerminateJobFlows. For more information about the generic parameters in the request, see Common Request Parameters.