com.amazonaws.services.elasticmapreduce.model.RunJobFlowRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk Show documentation
/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.elasticmapreduce.model;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
* Container for the parameters to the {@link com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduce#runJobFlow(RunJobFlowRequest) 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 com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduce#runJobFlow(RunJobFlowRequest)
*/
public class RunJobFlowRequest extends AmazonWebServiceRequest implements Serializable {
/**
* The name of the job flow.
*
* Constraints:
* Length: 0 - 256
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String name;
/**
* 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String logUri;
/**
* A JSON string for selecting additional features.
*
* Constraints:
* Length: 0 - 10280
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String additionalInfo;
/**
* 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 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 Elastic MapReduce, go to AMI
* Versions Supported in Elastic MapReduce in the Amazon Elastic
* MapReduce Developer's Guide.
*
* Constraints:
* Length: 0 - 256
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String amiVersion;
/**
* A specification of the number and type of Amazon EC2 instances on
* which to run the job flow.
*/
private JobFlowInstancesConfig instances;
/**
* A list of steps to be executed by the job flow.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag steps;
/**
* A list of bootstrap actions that will be run before Hadoop is started
* on the cluster nodes.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag bootstrapActions;
/**
* 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: - "mapr-m3" - launch the job flow using MapR M3
* Edition.
- "mapr-m5" - launch the job flow using MapR M5
* Edition.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag supportedProducts;
/**
* A list of strings that indicates third-party software to use with the
* job flow that accepts a user argument list. EMR accepts and forwards
* the argument list to the corresponding installation script as
* bootstrap action arguments. For more information, see Launch
* a Job Flow on the MapR Distribution for Hadoop. Currently
* supported values are: - "mapr-m3" - launch the job flow using
* MapR M3 Edition.
- "mapr-m5" - launch the job flow using MapR
* M5 Edition.
- "mapr" with the user arguments specifying
* "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3
* or M5 Edition respectively.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag newSupportedProducts;
/**
* 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.
*/
private Boolean visibleToAllUsers;
/**
* 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String jobFlowRole;
/**
* A list of tags to associate with a cluster and propagate to Amazon EC2
* instances.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag tags;
/**
* Default constructor for a new RunJobFlowRequest object. Callers should use the
* setter or fluent setter (with...) methods to initialize this object after creating it.
*/
public RunJobFlowRequest() {}
/**
* Constructs a new RunJobFlowRequest object.
* Callers should use the setter or fluent setter (with...) methods to
* initialize any additional object members.
*
* @param name The name of the job flow.
* @param instances A specification of the number and type of Amazon EC2
* instances on which to run the job flow.
*/
public RunJobFlowRequest(String name, JobFlowInstancesConfig instances) {
setName(name);
setInstances(instances);
}
/**
* The name of the job flow.
*
* Constraints:
* Length: 0 - 256
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return The name of the job flow.
*/
public String getName() {
return name;
}
/**
* The name of the job flow.
*
* Constraints:
* Length: 0 - 256
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param name The name of the job flow.
*/
public void setName(String name) {
this.name = 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param name The name of the job flow.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withName(String name) {
this.name = name;
return this;
}
/**
* 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return The location in Amazon S3 to write the log files of the job flow. If a
* value is not provided, logs are not created.
*/
public String getLogUri() {
return logUri;
}
/**
* 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param logUri The location in Amazon S3 to write the log files of the job flow. If a
* value is not provided, logs are not created.
*/
public void setLogUri(String logUri) {
this.logUri = logUri;
}
/**
* 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param logUri The location in Amazon S3 to write the log files of the job flow. If a
* value is not provided, logs are not created.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withLogUri(String logUri) {
this.logUri = logUri;
return this;
}
/**
* A JSON string for selecting additional features.
*
* Constraints:
* Length: 0 - 10280
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return A JSON string for selecting additional features.
*/
public String getAdditionalInfo() {
return additionalInfo;
}
/**
* A JSON string for selecting additional features.
*
* Constraints:
* Length: 0 - 10280
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param additionalInfo A JSON string for selecting additional features.
*/
public void setAdditionalInfo(String additionalInfo) {
this.additionalInfo = 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param additionalInfo A JSON string for selecting additional features.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withAdditionalInfo(String additionalInfo) {
this.additionalInfo = additionalInfo;
return this;
}
/**
* 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 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 Elastic MapReduce, go to AMI
* Versions Supported in Elastic MapReduce in the Amazon Elastic
* MapReduce Developer's Guide.
*
* Constraints:
* Length: 0 - 256
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return 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 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 Elastic MapReduce, go to AMI
* Versions Supported in Elastic MapReduce in the Amazon Elastic
* MapReduce Developer's Guide.
*/
public String getAmiVersion() {
return 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 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 Elastic MapReduce, go to AMI
* Versions Supported in Elastic MapReduce in the Amazon Elastic
* MapReduce Developer's Guide.
*
* Constraints:
* Length: 0 - 256
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param 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 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 Elastic MapReduce, go to AMI
* Versions Supported in Elastic MapReduce in the Amazon Elastic
* MapReduce Developer's Guide.
*/
public void setAmiVersion(String amiVersion) {
this.amiVersion = 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 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 Elastic MapReduce, 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param 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 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 Elastic MapReduce, go to AMI
* Versions Supported in Elastic MapReduce in the Amazon Elastic
* MapReduce Developer's Guide.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withAmiVersion(String amiVersion) {
this.amiVersion = amiVersion;
return this;
}
/**
* A specification of the number and type of Amazon EC2 instances on
* which to run the job flow.
*
* @return A specification of the number and type of Amazon EC2 instances on
* which to run the job flow.
*/
public JobFlowInstancesConfig getInstances() {
return instances;
}
/**
* A specification of the number and type of Amazon EC2 instances on
* which to run the job flow.
*
* @param instances A specification of the number and type of Amazon EC2 instances on
* which to run the job flow.
*/
public void setInstances(JobFlowInstancesConfig instances) {
this.instances = 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.
*
* @param instances A specification of the number and type of Amazon EC2 instances on
* which to run the job flow.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withInstances(JobFlowInstancesConfig instances) {
this.instances = instances;
return this;
}
/**
* A list of steps to be executed by the job flow.
*
* @return A list of steps to be executed by the job flow.
*/
public java.util.List getSteps() {
if (steps == null) {
steps = new com.amazonaws.internal.ListWithAutoConstructFlag();
steps.setAutoConstruct(true);
}
return steps;
}
/**
* A list of steps to be executed by the job flow.
*
* @param steps A list of steps to be executed by the job flow.
*/
public void setSteps(java.util.Collection steps) {
if (steps == null) {
this.steps = null;
return;
}
com.amazonaws.internal.ListWithAutoConstructFlag stepsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(steps.size());
stepsCopy.addAll(steps);
this.steps = stepsCopy;
}
/**
* 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.
*
* @param steps A list of steps to be executed by the job flow.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withSteps(StepConfig... steps) {
if (getSteps() == null) setSteps(new java.util.ArrayList(steps.length));
for (StepConfig value : steps) {
getSteps().add(value);
}
return this;
}
/**
* 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.
*
* @param steps A list of steps to be executed by the job flow.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withSteps(java.util.Collection steps) {
if (steps == null) {
this.steps = null;
} else {
com.amazonaws.internal.ListWithAutoConstructFlag stepsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(steps.size());
stepsCopy.addAll(steps);
this.steps = stepsCopy;
}
return this;
}
/**
* A list of bootstrap actions that will be run before Hadoop is started
* on the cluster nodes.
*
* @return A list of bootstrap actions that will be run before Hadoop is started
* on the cluster nodes.
*/
public java.util.List getBootstrapActions() {
if (bootstrapActions == null) {
bootstrapActions = new com.amazonaws.internal.ListWithAutoConstructFlag();
bootstrapActions.setAutoConstruct(true);
}
return bootstrapActions;
}
/**
* A list of bootstrap actions that will be run before Hadoop is started
* on the cluster nodes.
*
* @param bootstrapActions A list of bootstrap actions that will be run before Hadoop is started
* on the cluster nodes.
*/
public void setBootstrapActions(java.util.Collection bootstrapActions) {
if (bootstrapActions == null) {
this.bootstrapActions = null;
return;
}
com.amazonaws.internal.ListWithAutoConstructFlag bootstrapActionsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(bootstrapActions.size());
bootstrapActionsCopy.addAll(bootstrapActions);
this.bootstrapActions = bootstrapActionsCopy;
}
/**
* 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.
*
* @param bootstrapActions A list of bootstrap actions that will be run before Hadoop is started
* on the cluster nodes.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withBootstrapActions(BootstrapActionConfig... bootstrapActions) {
if (getBootstrapActions() == null) setBootstrapActions(new java.util.ArrayList(bootstrapActions.length));
for (BootstrapActionConfig value : bootstrapActions) {
getBootstrapActions().add(value);
}
return this;
}
/**
* 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.
*
* @param bootstrapActions A list of bootstrap actions that will be run before Hadoop is started
* on the cluster nodes.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withBootstrapActions(java.util.Collection bootstrapActions) {
if (bootstrapActions == null) {
this.bootstrapActions = null;
} else {
com.amazonaws.internal.ListWithAutoConstructFlag bootstrapActionsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(bootstrapActions.size());
bootstrapActionsCopy.addAll(bootstrapActions);
this.bootstrapActions = bootstrapActionsCopy;
}
return this;
}
/**
* 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: - "mapr-m3" - launch the job flow using MapR M3
* Edition.
- "mapr-m5" - launch the job flow using MapR M5
* Edition.
*
* @return 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: - "mapr-m3" - launch the job flow using MapR M3
* Edition.
- "mapr-m5" - launch the job flow using MapR M5
* Edition.
*/
public java.util.List getSupportedProducts() {
if (supportedProducts == null) {
supportedProducts = new com.amazonaws.internal.ListWithAutoConstructFlag();
supportedProducts.setAutoConstruct(true);
}
return 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: - "mapr-m3" - launch the job flow using MapR M3
* Edition.
- "mapr-m5" - launch the job flow using MapR M5
* Edition.
*
* @param 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: - "mapr-m3" - launch the job flow using MapR M3
* Edition.
- "mapr-m5" - launch the job flow using MapR M5
* Edition.
*/
public void setSupportedProducts(java.util.Collection supportedProducts) {
if (supportedProducts == null) {
this.supportedProducts = null;
return;
}
com.amazonaws.internal.ListWithAutoConstructFlag supportedProductsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(supportedProducts.size());
supportedProductsCopy.addAll(supportedProducts);
this.supportedProducts = supportedProductsCopy;
}
/**
* 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: - "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 object so that method calls can be chained together.
*
* @param 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:
- "mapr-m3" - launch the job flow using MapR M3
* Edition.
- "mapr-m5" - launch the job flow using MapR M5
* Edition.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withSupportedProducts(String... supportedProducts) {
if (getSupportedProducts() == null) setSupportedProducts(new java.util.ArrayList(supportedProducts.length));
for (String value : supportedProducts) {
getSupportedProducts().add(value);
}
return this;
}
/**
* 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: - "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 object so that method calls can be chained together.
*
* @param 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:
- "mapr-m3" - launch the job flow using MapR M3
* Edition.
- "mapr-m5" - launch the job flow using MapR M5
* Edition.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withSupportedProducts(java.util.Collection supportedProducts) {
if (supportedProducts == null) {
this.supportedProducts = null;
} else {
com.amazonaws.internal.ListWithAutoConstructFlag supportedProductsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(supportedProducts.size());
supportedProductsCopy.addAll(supportedProducts);
this.supportedProducts = supportedProductsCopy;
}
return this;
}
/**
* A list of strings that indicates third-party software to use with the
* job flow that accepts a user argument list. EMR accepts and forwards
* the argument list to the corresponding installation script as
* bootstrap action arguments. For more information, see Launch
* a Job Flow on the MapR Distribution for Hadoop. Currently
* supported values are: - "mapr-m3" - launch the job flow using
* MapR M3 Edition.
- "mapr-m5" - launch the job flow using MapR
* M5 Edition.
- "mapr" with the user arguments specifying
* "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3
* or M5 Edition respectively.
*
* @return A list of strings that indicates third-party software to use with the
* job flow that accepts a user argument list. EMR accepts and forwards
* the argument list to the corresponding installation script as
* bootstrap action arguments. For more information, see Launch
* a Job Flow on the MapR Distribution for Hadoop. Currently
* supported values are: - "mapr-m3" - launch the job flow using
* MapR M3 Edition.
- "mapr-m5" - launch the job flow using MapR
* M5 Edition.
- "mapr" with the user arguments specifying
* "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3
* or M5 Edition respectively.
*/
public java.util.List getNewSupportedProducts() {
if (newSupportedProducts == null) {
newSupportedProducts = new com.amazonaws.internal.ListWithAutoConstructFlag();
newSupportedProducts.setAutoConstruct(true);
}
return newSupportedProducts;
}
/**
* A list of strings that indicates third-party software to use with the
* job flow that accepts a user argument list. EMR accepts and forwards
* the argument list to the corresponding installation script as
* bootstrap action arguments. For more information, see Launch
* a Job Flow on the MapR Distribution for Hadoop. Currently
* supported values are: - "mapr-m3" - launch the job flow using
* MapR M3 Edition.
- "mapr-m5" - launch the job flow using MapR
* M5 Edition.
- "mapr" with the user arguments specifying
* "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3
* or M5 Edition respectively.
*
* @param newSupportedProducts A list of strings that indicates third-party software to use with the
* job flow that accepts a user argument list. EMR accepts and forwards
* the argument list to the corresponding installation script as
* bootstrap action arguments. For more information, see Launch
* a Job Flow on the MapR Distribution for Hadoop. Currently
* supported values are: - "mapr-m3" - launch the job flow using
* MapR M3 Edition.
- "mapr-m5" - launch the job flow using MapR
* M5 Edition.
- "mapr" with the user arguments specifying
* "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3
* or M5 Edition respectively.
*/
public void setNewSupportedProducts(java.util.Collection newSupportedProducts) {
if (newSupportedProducts == null) {
this.newSupportedProducts = null;
return;
}
com.amazonaws.internal.ListWithAutoConstructFlag newSupportedProductsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(newSupportedProducts.size());
newSupportedProductsCopy.addAll(newSupportedProducts);
this.newSupportedProducts = newSupportedProductsCopy;
}
/**
* A list of strings that indicates third-party software to use with the
* job flow that accepts a user argument list. EMR accepts and forwards
* the argument list to the corresponding installation script as
* bootstrap action arguments. For more information, see Launch
* a Job Flow on the MapR Distribution for Hadoop. Currently
* supported values are: - "mapr-m3" - launch the job flow using
* MapR M3 Edition.
- "mapr-m5" - launch the job flow using MapR
* M5 Edition.
- "mapr" with the user arguments specifying
* "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3
* or M5 Edition respectively.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param newSupportedProducts A list of strings that indicates third-party software to use with the
* job flow that accepts a user argument list. EMR accepts and forwards
* the argument list to the corresponding installation script as
* bootstrap action arguments. For more information, see Launch
* a Job Flow on the MapR Distribution for Hadoop. Currently
* supported values are:
- "mapr-m3" - launch the job flow using
* MapR M3 Edition.
- "mapr-m5" - launch the job flow using MapR
* M5 Edition.
- "mapr" with the user arguments specifying
* "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3
* or M5 Edition respectively.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withNewSupportedProducts(SupportedProductConfig... newSupportedProducts) {
if (getNewSupportedProducts() == null) setNewSupportedProducts(new java.util.ArrayList(newSupportedProducts.length));
for (SupportedProductConfig value : newSupportedProducts) {
getNewSupportedProducts().add(value);
}
return this;
}
/**
* A list of strings that indicates third-party software to use with the
* job flow that accepts a user argument list. EMR accepts and forwards
* the argument list to the corresponding installation script as
* bootstrap action arguments. For more information, see Launch
* a Job Flow on the MapR Distribution for Hadoop. Currently
* supported values are: - "mapr-m3" - launch the job flow using
* MapR M3 Edition.
- "mapr-m5" - launch the job flow using MapR
* M5 Edition.
- "mapr" with the user arguments specifying
* "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3
* or M5 Edition respectively.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param newSupportedProducts A list of strings that indicates third-party software to use with the
* job flow that accepts a user argument list. EMR accepts and forwards
* the argument list to the corresponding installation script as
* bootstrap action arguments. For more information, see Launch
* a Job Flow on the MapR Distribution for Hadoop. Currently
* supported values are:
- "mapr-m3" - launch the job flow using
* MapR M3 Edition.
- "mapr-m5" - launch the job flow using MapR
* M5 Edition.
- "mapr" with the user arguments specifying
* "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3
* or M5 Edition respectively.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withNewSupportedProducts(java.util.Collection newSupportedProducts) {
if (newSupportedProducts == null) {
this.newSupportedProducts = null;
} else {
com.amazonaws.internal.ListWithAutoConstructFlag newSupportedProductsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(newSupportedProducts.size());
newSupportedProductsCopy.addAll(newSupportedProducts);
this.newSupportedProducts = newSupportedProductsCopy;
}
return this;
}
/**
* 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.
*
* @return 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.
*/
public Boolean isVisibleToAllUsers() {
return 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.
*
* @param 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.
*/
public void setVisibleToAllUsers(Boolean visibleToAllUsers) {
this.visibleToAllUsers = 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.
*
* @param 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.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withVisibleToAllUsers(Boolean visibleToAllUsers) {
this.visibleToAllUsers = visibleToAllUsers;
return this;
}
/**
* 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.
*
* @return 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.
*/
public Boolean getVisibleToAllUsers() {
return visibleToAllUsers;
}
/**
* 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return 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.
*/
public String getJobFlowRole() {
return 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param 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.
*/
public void setJobFlowRole(String jobFlowRole) {
this.jobFlowRole = 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: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param 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.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withJobFlowRole(String jobFlowRole) {
this.jobFlowRole = jobFlowRole;
return this;
}
/**
* A list of tags to associate with a cluster and propagate to Amazon EC2
* instances.
*
* @return A list of tags to associate with a cluster and propagate to Amazon EC2
* instances.
*/
public java.util.List getTags() {
if (tags == null) {
tags = new com.amazonaws.internal.ListWithAutoConstructFlag();
tags.setAutoConstruct(true);
}
return tags;
}
/**
* A list of tags to associate with a cluster and propagate to Amazon EC2
* instances.
*
* @param tags A list of tags to associate with a cluster and propagate to Amazon EC2
* instances.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
com.amazonaws.internal.ListWithAutoConstructFlag tagsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(tags.size());
tagsCopy.addAll(tags);
this.tags = tagsCopy;
}
/**
* A list of tags to associate with a cluster and propagate to Amazon EC2
* instances.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param tags A list of tags to associate with a cluster and propagate to Amazon EC2
* instances.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withTags(Tag... tags) {
if (getTags() == null) setTags(new java.util.ArrayList(tags.length));
for (Tag value : tags) {
getTags().add(value);
}
return this;
}
/**
* A list of tags to associate with a cluster and propagate to Amazon EC2
* instances.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param tags A list of tags to associate with a cluster and propagate to Amazon EC2
* instances.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunJobFlowRequest withTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
} else {
com.amazonaws.internal.ListWithAutoConstructFlag tagsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(tags.size());
tagsCopy.addAll(tags);
this.tags = tagsCopy;
}
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getName() != null) sb.append("Name: " + getName() + ",");
if (getLogUri() != null) sb.append("LogUri: " + getLogUri() + ",");
if (getAdditionalInfo() != null) sb.append("AdditionalInfo: " + getAdditionalInfo() + ",");
if (getAmiVersion() != null) sb.append("AmiVersion: " + getAmiVersion() + ",");
if (getInstances() != null) sb.append("Instances: " + getInstances() + ",");
if (getSteps() != null) sb.append("Steps: " + getSteps() + ",");
if (getBootstrapActions() != null) sb.append("BootstrapActions: " + getBootstrapActions() + ",");
if (getSupportedProducts() != null) sb.append("SupportedProducts: " + getSupportedProducts() + ",");
if (getNewSupportedProducts() != null) sb.append("NewSupportedProducts: " + getNewSupportedProducts() + ",");
if (isVisibleToAllUsers() != null) sb.append("VisibleToAllUsers: " + isVisibleToAllUsers() + ",");
if (getJobFlowRole() != null) sb.append("JobFlowRole: " + getJobFlowRole() + ",");
if (getTags() != null) sb.append("Tags: " + getTags() );
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getLogUri() == null) ? 0 : getLogUri().hashCode());
hashCode = prime * hashCode + ((getAdditionalInfo() == null) ? 0 : getAdditionalInfo().hashCode());
hashCode = prime * hashCode + ((getAmiVersion() == null) ? 0 : getAmiVersion().hashCode());
hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode());
hashCode = prime * hashCode + ((getSteps() == null) ? 0 : getSteps().hashCode());
hashCode = prime * hashCode + ((getBootstrapActions() == null) ? 0 : getBootstrapActions().hashCode());
hashCode = prime * hashCode + ((getSupportedProducts() == null) ? 0 : getSupportedProducts().hashCode());
hashCode = prime * hashCode + ((getNewSupportedProducts() == null) ? 0 : getNewSupportedProducts().hashCode());
hashCode = prime * hashCode + ((isVisibleToAllUsers() == null) ? 0 : isVisibleToAllUsers().hashCode());
hashCode = prime * hashCode + ((getJobFlowRole() == null) ? 0 : getJobFlowRole().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof RunJobFlowRequest == false) return false;
RunJobFlowRequest other = (RunJobFlowRequest)obj;
if (other.getName() == null ^ this.getName() == null) return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false) return false;
if (other.getLogUri() == null ^ this.getLogUri() == null) return false;
if (other.getLogUri() != null && other.getLogUri().equals(this.getLogUri()) == false) return false;
if (other.getAdditionalInfo() == null ^ this.getAdditionalInfo() == null) return false;
if (other.getAdditionalInfo() != null && other.getAdditionalInfo().equals(this.getAdditionalInfo()) == false) return false;
if (other.getAmiVersion() == null ^ this.getAmiVersion() == null) return false;
if (other.getAmiVersion() != null && other.getAmiVersion().equals(this.getAmiVersion()) == false) return false;
if (other.getInstances() == null ^ this.getInstances() == null) return false;
if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false) return false;
if (other.getSteps() == null ^ this.getSteps() == null) return false;
if (other.getSteps() != null && other.getSteps().equals(this.getSteps()) == false) return false;
if (other.getBootstrapActions() == null ^ this.getBootstrapActions() == null) return false;
if (other.getBootstrapActions() != null && other.getBootstrapActions().equals(this.getBootstrapActions()) == false) return false;
if (other.getSupportedProducts() == null ^ this.getSupportedProducts() == null) return false;
if (other.getSupportedProducts() != null && other.getSupportedProducts().equals(this.getSupportedProducts()) == false) return false;
if (other.getNewSupportedProducts() == null ^ this.getNewSupportedProducts() == null) return false;
if (other.getNewSupportedProducts() != null && other.getNewSupportedProducts().equals(this.getNewSupportedProducts()) == false) return false;
if (other.isVisibleToAllUsers() == null ^ this.isVisibleToAllUsers() == null) return false;
if (other.isVisibleToAllUsers() != null && other.isVisibleToAllUsers().equals(this.isVisibleToAllUsers()) == false) return false;
if (other.getJobFlowRole() == null ^ this.getJobFlowRole() == null) return false;
if (other.getJobFlowRole() != null && other.getJobFlowRole().equals(this.getJobFlowRole()) == false) return false;
if (other.getTags() == null ^ this.getTags() == null) return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false;
return true;
}
}