Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.elasticmapreduce.model
Class RunJobFlowRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.elasticmapreduce.model.RunJobFlowRequest
All Implemented Interfaces:
Serializable

public class RunJobFlowRequest
extends AmazonWebServiceRequest
implements Serializable

Container for the parameters to the RunJobFlow operation.

RunJobFlow creates and starts running a new job flow. The job flow will run the steps specified. Once the job flow completes, the cluster is stopped and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3. If the JobFlowInstancesConfig KeepJobFlowAliveWhenNoSteps parameter is set to TRUE , the job flow will transition to the WAITING state rather than shutting down once the steps have completed.

For additional protection, you can set the JobFlowInstancesConfig TerminationProtected parameter to TRUE to lock the job flow and prevent it from being terminated by API call, user intervention, or in the event of a job flow error.

A maximum of 256 steps are allowed in each job flow.

If your job flow is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, go to Add More than 256 Steps to a Job Flow in the Amazon Elastic MapReduce Developer's Guide .

For long running job flows, we recommend that you periodically store your results.

See Also:
AmazonElasticMapReduce.runJobFlow(RunJobFlowRequest), Serialized Form

Constructor Summary
RunJobFlowRequest()
          Default constructor for a new RunJobFlowRequest object.
RunJobFlowRequest(String name, JobFlowInstancesConfig instances)
          Constructs a new RunJobFlowRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getAdditionalInfo()
          A JSON string for selecting additional features.
 String getAmiVersion()
          The version of the Amazon Machine Image (AMI) to use when launching Amazon EC2 instances in the job flow.
 List<BootstrapActionConfig> getBootstrapActions()
          A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.
 JobFlowInstancesConfig getInstances()
          A specification of the number and type of Amazon EC2 instances on which to run the job flow.
 String getJobFlowRole()
          An IAM role for the job flow.
 String getLogUri()
          Specifies the location in Amazon S3 to write the log files of the job flow.
 String getName()
          The name of the job flow.
 List<StepConfig> getSteps()
          A list of steps to be executed by the job flow.
 List<String> getSupportedProducts()
          A list of strings that indicates third-party software to use with the job flow.
 Boolean getVisibleToAllUsers()
          Whether the job flow is visible to all IAM users of the AWS account associated with the job flow.
 int hashCode()
           
 Boolean isVisibleToAllUsers()
          Whether the job flow is visible to all IAM users of the AWS account associated with the job flow.
 void setAdditionalInfo(String additionalInfo)
          A JSON string for selecting additional features.
 void setAmiVersion(String amiVersion)
          The version of the Amazon Machine Image (AMI) to use when launching Amazon EC2 instances in the job flow.
 void setBootstrapActions(Collection<BootstrapActionConfig> bootstrapActions)
          A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.
 void setInstances(JobFlowInstancesConfig instances)
          A specification of the number and type of Amazon EC2 instances on which to run the job flow.
 void setJobFlowRole(String jobFlowRole)
          An IAM role for the job flow.
 void setLogUri(String logUri)
          Specifies the location in Amazon S3 to write the log files of the job flow.
 void setName(String name)
          The name of the job flow.
 void setSteps(Collection<StepConfig> steps)
          A list of steps to be executed by the job flow.
 void setSupportedProducts(Collection<String> supportedProducts)
          A list of strings that indicates third-party software to use with the job flow.
 void setVisibleToAllUsers(Boolean visibleToAllUsers)
          Whether the job flow is visible to all IAM users of the AWS account associated with the job flow.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 RunJobFlowRequest withAdditionalInfo(String additionalInfo)
          A JSON string for selecting additional features.
 RunJobFlowRequest withAmiVersion(String amiVersion)
          The version of the Amazon Machine Image (AMI) to use when launching Amazon EC2 instances in the job flow.
 RunJobFlowRequest withBootstrapActions(BootstrapActionConfig... bootstrapActions)
          A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.
 RunJobFlowRequest withBootstrapActions(Collection<BootstrapActionConfig> bootstrapActions)
          A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.
 RunJobFlowRequest withInstances(JobFlowInstancesConfig instances)
          A specification of the number and type of Amazon EC2 instances on which to run the job flow.
 RunJobFlowRequest withJobFlowRole(String jobFlowRole)
          An IAM role for the job flow.
 RunJobFlowRequest withLogUri(String logUri)
          Specifies the location in Amazon S3 to write the log files of the job flow.
 RunJobFlowRequest withName(String name)
          The name of the job flow.
 RunJobFlowRequest withSteps(Collection<StepConfig> steps)
          A list of steps to be executed by the job flow.
 RunJobFlowRequest withSteps(StepConfig... steps)
          A list of steps to be executed by the job flow.
 RunJobFlowRequest withSupportedProducts(Collection<String> supportedProducts)
          A list of strings that indicates third-party software to use with the job flow.
 RunJobFlowRequest withSupportedProducts(String... supportedProducts)
          A list of strings that indicates third-party software to use with the job flow.
 RunJobFlowRequest withVisibleToAllUsers(Boolean visibleToAllUsers)
          Whether the job flow is visible to all IAM users of the AWS account associated with the job flow.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RunJobFlowRequest

public RunJobFlowRequest()
Default constructor for a new RunJobFlowRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


RunJobFlowRequest

public RunJobFlowRequest(String name,
                         JobFlowInstancesConfig instances)
Constructs a new RunJobFlowRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
name - The name of the job flow.
instances - A specification of the number and type of Amazon EC2 instances on which to run the job flow.
Method Detail

getName

public String getName()
The name of the job flow.

Constraints:
Length: 0 - 256
Pattern: [ -??-??-?\r\n\t]*

Returns:
The name of the job flow.

setName

public void setName(String name)
The name of the job flow.

Constraints:
Length: 0 - 256
Pattern: [ -??-??-?\r\n\t]*

Parameters:
name - The name of the job flow.

withName

public RunJobFlowRequest withName(String name)
The name of the job flow.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 256
Pattern: [ -??-??-?\r\n\t]*

Parameters:
name - The name of the job flow.
Returns:
A reference to this updated object so that method calls can be chained together.

getLogUri

public String getLogUri()
Specifies the location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.

Constraints:
Length: 0 - 10280
Pattern: [ -??-??-?\r\n\t]*

Returns:
Specifies the location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.

setLogUri

public void setLogUri(String logUri)
Specifies the location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.

Constraints:
Length: 0 - 10280
Pattern: [ -??-??-?\r\n\t]*

Parameters:
logUri - Specifies the location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.

withLogUri

public RunJobFlowRequest withLogUri(String logUri)
Specifies the location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10280
Pattern: [ -??-??-?\r\n\t]*

Parameters:
logUri - Specifies the location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.
Returns:
A reference to this updated object so that method calls can be chained together.

getAdditionalInfo

public String getAdditionalInfo()
A JSON string for selecting additional features.

Constraints:
Length: 0 - 10280
Pattern: [ -??-??-?\r\n\t]*

Returns:
A JSON string for selecting additional features.

setAdditionalInfo

public void setAdditionalInfo(String additionalInfo)
A JSON string for selecting additional features.

Constraints:
Length: 0 - 10280
Pattern: [ -??-??-?\r\n\t]*

Parameters:
additionalInfo - A JSON string for selecting additional features.

withAdditionalInfo

public RunJobFlowRequest withAdditionalInfo(String additionalInfo)
A JSON string for selecting additional features.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10280
Pattern: [ -??-??-?\r\n\t]*

Parameters:
additionalInfo - A JSON string for selecting additional features.
Returns:
A reference to this updated object so that method calls can be chained together.

getAmiVersion

public String getAmiVersion()
The version of the Amazon Machine Image (AMI) to use when launching Amazon EC2 instances in the job flow. The following values are valid:

If this value is not specified, the job flow uses the default of (AMI 1.0, Hadoop 0.18).

If the AMI supports multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop 0.18 and 0.20) you can use the JobFlowInstancesConfig HadoopVersion parameter to modify the version of Hadoop from the defaults shown above.

For details about the AMI versions currently supported by Amazon ElasticMapReduce, go to AMI Versions Supported in Elastic MapReduce in the Amazon Elastic MapReduce Developer's Guide.

Constraints:
Length: 0 - 256
Pattern: [ -??-??-?\r\n\t]*

Returns:
The version of the Amazon Machine Image (AMI) to use when launching Amazon EC2 instances in the job flow. The following values are valid:
  • "latest" (uses the latest AMI)
  • The version number of the AMI to use, for example, "2.0"

If this value is not specified, the job flow uses the default of (AMI 1.0, Hadoop 0.18).

If the AMI supports multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop 0.18 and 0.20) you can use the JobFlowInstancesConfig HadoopVersion parameter to modify the version of Hadoop from the defaults shown above.

For details about the AMI versions currently supported by Amazon ElasticMapReduce, go to AMI Versions Supported in Elastic MapReduce in the Amazon Elastic MapReduce Developer's Guide.


setAmiVersion

public void setAmiVersion(String amiVersion)
The version of the Amazon Machine Image (AMI) to use when launching Amazon EC2 instances in the job flow. The following values are valid:

If this value is not specified, the job flow uses the default of (AMI 1.0, Hadoop 0.18).

If the AMI supports multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop 0.18 and 0.20) you can use the JobFlowInstancesConfig HadoopVersion parameter to modify the version of Hadoop from the defaults shown above.

For details about the AMI versions currently supported by Amazon ElasticMapReduce, go to AMI Versions Supported in Elastic MapReduce in the Amazon Elastic MapReduce Developer's Guide.

Constraints:
Length: 0 - 256
Pattern: [ -??-??-?\r\n\t]*

Parameters:
amiVersion - The version of the Amazon Machine Image (AMI) to use when launching Amazon EC2 instances in the job flow. The following values are valid:
  • "latest" (uses the latest AMI)
  • The version number of the AMI to use, for example, "2.0"

If this value is not specified, the job flow uses the default of (AMI 1.0, Hadoop 0.18).

If the AMI supports multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop 0.18 and 0.20) you can use the JobFlowInstancesConfig HadoopVersion parameter to modify the version of Hadoop from the defaults shown above.

For details about the AMI versions currently supported by Amazon ElasticMapReduce, go to AMI Versions Supported in Elastic MapReduce in the Amazon Elastic MapReduce Developer's Guide.


withAmiVersion

public RunJobFlowRequest withAmiVersion(String amiVersion)
The version of the Amazon Machine Image (AMI) to use when launching Amazon EC2 instances in the job flow. The following values are valid:

If this value is not specified, the job flow uses the default of (AMI 1.0, Hadoop 0.18).

If the AMI supports multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop 0.18 and 0.20) you can use the JobFlowInstancesConfig HadoopVersion parameter to modify the version of Hadoop from the defaults shown above.

For details about the AMI versions currently supported by Amazon ElasticMapReduce, go to AMI Versions Supported in Elastic MapReduce in the Amazon Elastic MapReduce Developer's Guide.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 256
Pattern: [ -??-??-?\r\n\t]*

Parameters:
amiVersion - The version of the Amazon Machine Image (AMI) to use when launching Amazon EC2 instances in the job flow. The following values are valid:
  • "latest" (uses the latest AMI)
  • The version number of the AMI to use, for example, "2.0"

If this value is not specified, the job flow uses the default of (AMI 1.0, Hadoop 0.18).

If the AMI supports multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop 0.18 and 0.20) you can use the JobFlowInstancesConfig HadoopVersion parameter to modify the version of Hadoop from the defaults shown above.

For details about the AMI versions currently supported by Amazon ElasticMapReduce, go to AMI Versions Supported in Elastic MapReduce in the Amazon Elastic MapReduce Developer's Guide.

Returns:
A reference to this updated object so that method calls can be chained together.

getInstances

public JobFlowInstancesConfig getInstances()
A specification of the number and type of Amazon EC2 instances on which to run the job flow.

Returns:
A specification of the number and type of Amazon EC2 instances on which to run the job flow.

setInstances

public void setInstances(JobFlowInstancesConfig instances)
A specification of the number and type of Amazon EC2 instances on which to run the job flow.

Parameters:
instances - A specification of the number and type of Amazon EC2 instances on which to run the job flow.

withInstances

public RunJobFlowRequest withInstances(JobFlowInstancesConfig instances)
A specification of the number and type of Amazon EC2 instances on which to run the job flow.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instances - A specification of the number and type of Amazon EC2 instances on which to run the job flow.
Returns:
A reference to this updated object so that method calls can be chained together.

getSteps

public List<StepConfig> getSteps()
A list of steps to be executed by the job flow.

Returns:
A list of steps to be executed by the job flow.

setSteps

public void setSteps(Collection<StepConfig> steps)
A list of steps to be executed by the job flow.

Parameters:
steps - A list of steps to be executed by the job flow.

withSteps

public RunJobFlowRequest withSteps(StepConfig... steps)
A list of steps to be executed by the job flow.

Returns a reference to this object so that method calls can be chained together.

Parameters:
steps - A list of steps to be executed by the job flow.
Returns:
A reference to this updated object so that method calls can be chained together.

withSteps

public RunJobFlowRequest withSteps(Collection<StepConfig> steps)
A list of steps to be executed by the job flow.

Returns a reference to this object so that method calls can be chained together.

Parameters:
steps - A list of steps to be executed by the job flow.
Returns:
A reference to this updated object so that method calls can be chained together.

getBootstrapActions

public List<BootstrapActionConfig> getBootstrapActions()
A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.

Returns:
A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.

setBootstrapActions

public void setBootstrapActions(Collection<BootstrapActionConfig> bootstrapActions)
A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.

Parameters:
bootstrapActions - A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.

withBootstrapActions

public RunJobFlowRequest withBootstrapActions(BootstrapActionConfig... bootstrapActions)
A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.

Returns a reference to this object so that method calls can be chained together.

Parameters:
bootstrapActions - A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.
Returns:
A reference to this updated object so that method calls can be chained together.

withBootstrapActions

public RunJobFlowRequest withBootstrapActions(Collection<BootstrapActionConfig> bootstrapActions)
A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.

Returns a reference to this object so that method calls can be chained together.

Parameters:
bootstrapActions - A list of bootstrap actions that will be run before Hadoop is started on the cluster nodes.
Returns:
A reference to this updated object so that method calls can be chained together.

getSupportedProducts

public List<String> getSupportedProducts()
A list of strings that indicates third-party software to use with the job flow. For more information, go to Use Third Party Applications with Amazon EMR. Currently supported values are:

Returns:
A list of strings that indicates third-party software to use with the job flow. For more information, go to Use Third Party Applications with Amazon EMR. Currently supported values are:
  • "karmasphere-enterprise-utility" - tag the job flow for management by Karmasphere.
  • "mapr-m3" - launch the job flow using MapR M3 Edition.
  • "mapr-m5" - launch the job flow using MapR M5 Edition.

setSupportedProducts

public void setSupportedProducts(Collection<String> supportedProducts)
A list of strings that indicates third-party software to use with the job flow. For more information, go to Use Third Party Applications with Amazon EMR. Currently supported values are:

Parameters:
supportedProducts - A list of strings that indicates third-party software to use with the job flow. For more information, go to Use Third Party Applications with Amazon EMR. Currently supported values are:
  • "karmasphere-enterprise-utility" - tag the job flow for management by Karmasphere.
  • "mapr-m3" - launch the job flow using MapR M3 Edition.
  • "mapr-m5" - launch the job flow using MapR M5 Edition.

withSupportedProducts

public RunJobFlowRequest withSupportedProducts(String... supportedProducts)
A list of strings that indicates third-party software to use with the job flow. For more information, go to Use Third Party Applications with Amazon EMR. Currently supported values are:

Returns a reference to this object so that method calls can be chained together.

Parameters:
supportedProducts - A list of strings that indicates third-party software to use with the job flow. For more information, go to Use Third Party Applications with Amazon EMR. Currently supported values are:
  • "karmasphere-enterprise-utility" - tag the job flow for management by Karmasphere.
  • "mapr-m3" - launch the job flow using MapR M3 Edition.
  • "mapr-m5" - launch the job flow using MapR M5 Edition.
Returns:
A reference to this updated object so that method calls can be chained together.

withSupportedProducts

public RunJobFlowRequest withSupportedProducts(Collection<String> supportedProducts)
A list of strings that indicates third-party software to use with the job flow. For more information, go to Use Third Party Applications with Amazon EMR. Currently supported values are:

Returns a reference to this object so that method calls can be chained together.

Parameters:
supportedProducts - A list of strings that indicates third-party software to use with the job flow. For more information, go to Use Third Party Applications with Amazon EMR. Currently supported values are:
  • "karmasphere-enterprise-utility" - tag the job flow for management by Karmasphere.
  • "mapr-m3" - launch the job flow using MapR M3 Edition.
  • "mapr-m5" - launch the job flow using MapR M5 Edition.
Returns:
A reference to this updated object so that method calls can be chained together.

isVisibleToAllUsers

public Boolean isVisibleToAllUsers()
Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the job flow. If it is set to false, only the IAM user that created the job flow can view and manage it.

Returns:
Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the job flow. If it is set to false, only the IAM user that created the job flow can view and manage it.

setVisibleToAllUsers

public void setVisibleToAllUsers(Boolean visibleToAllUsers)
Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the job flow. If it is set to false, only the IAM user that created the job flow can view and manage it.

Parameters:
visibleToAllUsers - Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the job flow. If it is set to false, only the IAM user that created the job flow can view and manage it.

withVisibleToAllUsers

public RunJobFlowRequest withVisibleToAllUsers(Boolean visibleToAllUsers)
Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the job flow. If it is set to false, only the IAM user that created the job flow can view and manage it.

Returns a reference to this object so that method calls can be chained together.

Parameters:
visibleToAllUsers - Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the job flow. If it is set to false, only the IAM user that created the job flow can view and manage it.
Returns:
A reference to this updated object so that method calls can be chained together.

getVisibleToAllUsers

public Boolean getVisibleToAllUsers()
Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the job flow. If it is set to false, only the IAM user that created the job flow can view and manage it.

Returns:
Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the job flow. If it is set to false, only the IAM user that created the job flow can view and manage it.

getJobFlowRole

public String getJobFlowRole()
An IAM role for the job flow. The EC2 instances of the job flow assume this role. The default role is EMRJobflowDefault. In order to use the default role, you must have already created it using the CLI.

Constraints:
Length: 0 - 10280
Pattern: [ -??-??-?\r\n\t]*

Returns:
An IAM role for the job flow. The EC2 instances of the job flow assume this role. The default role is EMRJobflowDefault. In order to use the default role, you must have already created it using the CLI.

setJobFlowRole

public void setJobFlowRole(String jobFlowRole)
An IAM role for the job flow. The EC2 instances of the job flow assume this role. The default role is EMRJobflowDefault. In order to use the default role, you must have already created it using the CLI.

Constraints:
Length: 0 - 10280
Pattern: [ -??-??-?\r\n\t]*

Parameters:
jobFlowRole - An IAM role for the job flow. The EC2 instances of the job flow assume this role. The default role is EMRJobflowDefault. In order to use the default role, you must have already created it using the CLI.

withJobFlowRole

public RunJobFlowRequest withJobFlowRole(String jobFlowRole)
An IAM role for the job flow. The EC2 instances of the job flow assume this role. The default role is EMRJobflowDefault. In order to use the default role, you must have already created it using the CLI.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10280
Pattern: [ -??-??-?\r\n\t]*

Parameters:
jobFlowRole - An IAM role for the job flow. The EC2 instances of the job flow assume this role. The default role is EMRJobflowDefault. In order to use the default role, you must have already created it using the CLI.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.