Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright 2010-2015 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;
  

A description of the Amazon EC2 instance running the job flow. A valid JobFlowInstancesConfig must contain at least InstanceGroups, which is the recommended configuration. However, a valid alternative is to have MasterInstanceType, SlaveInstanceType, and InstanceCount (all three must be present).

  
  public class JobFlowInstancesConfig implements SerializableCloneable {

    
The EC2 instance type of the master node.

Constraints:
Length: 1 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String masterInstanceType;

    
The EC2 instance type of the slave nodes.

Constraints:
Length: 1 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String slaveInstanceType;

    
The number of Amazon EC2 instances used to execute the job flow.
  
      private Integer instanceCount;

    
Configuration for the job flow's instance groups.
  
The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String ec2KeyName;

    
The Availability Zone the job flow will run in.
  
      private PlacementType placement;

    
Specifies whether the job flow should terminate after completing all steps.
  
      private Boolean keepJobFlowAliveWhenNoSteps;

    
Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error.
  
      private Boolean terminationProtected;

    
The Hadoop version for the job flow. Valid inputs are "0.18", "0.20", "0.20.205", "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String hadoopVersion;

    
To launch the job flow in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the job flow to launch. If you do not specify this value, the job flow is launched in the normal Amazon Web Services cloud, outside of an Amazon VPC.

Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in a Amazon VPC.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String ec2SubnetId;

    
The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the master node.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String emrManagedMasterSecurityGroup;

    
The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the slave nodes.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String emrManagedSlaveSecurityGroup;

    
A list of additional Amazon EC2 security group IDs for the master node.
 
A list of additional Amazon EC2 security group IDs for the slave nodes.
 
Default constructor for a new JobFlowInstancesConfig object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public JobFlowInstancesConfig() {}
    
    
The EC2 instance type of the master node.

Constraints:
Length: 1 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The EC2 instance type of the master node.
 
     public String getMasterInstanceType() {
         return ;
     }
    
    
The EC2 instance type of the master node.

Constraints:
Length: 1 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
masterInstanceType The EC2 instance type of the master node.
 
     public void setMasterInstanceType(String masterInstanceType) {
         this. = masterInstanceType;
     }
    
    
The EC2 instance type of the master node.

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

Constraints:
Length: 1 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
masterInstanceType The EC2 instance type of the master node.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withMasterInstanceType(String masterInstanceType) {
         this. = masterInstanceType;
         return this;
     }

    
The EC2 instance type of the slave nodes.

Constraints:
Length: 1 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The EC2 instance type of the slave nodes.
 
     public String getSlaveInstanceType() {
         return ;
     }
    
    
The EC2 instance type of the slave nodes.

Constraints:
Length: 1 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
slaveInstanceType The EC2 instance type of the slave nodes.
 
     public void setSlaveInstanceType(String slaveInstanceType) {
         this. = slaveInstanceType;
     }
    
    
The EC2 instance type of the slave nodes.

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

Constraints:
Length: 1 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
slaveInstanceType The EC2 instance type of the slave nodes.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withSlaveInstanceType(String slaveInstanceType) {
         this. = slaveInstanceType;
         return this;
     }

    
The number of Amazon EC2 instances used to execute the job flow.

Returns:
The number of Amazon EC2 instances used to execute the job flow.
 
     public Integer getInstanceCount() {
         return ;
     }
    
    
The number of Amazon EC2 instances used to execute the job flow.

Parameters:
instanceCount The number of Amazon EC2 instances used to execute the job flow.
 
     public void setInstanceCount(Integer instanceCount) {
         this. = instanceCount;
     }
    
    
The number of Amazon EC2 instances used to execute the job flow.

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

Parameters:
instanceCount The number of Amazon EC2 instances used to execute the job flow.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withInstanceCount(Integer instanceCount) {
         this. = instanceCount;
         return this;
     }

    
Configuration for the job flow's instance groups.

Returns:
Configuration for the job flow's instance groups.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
Configuration for the job flow's instance groups.

Parameters:
instanceGroups Configuration for the job flow's instance groups.
 
     public void setInstanceGroups(java.util.Collection<InstanceGroupConfiginstanceGroups) {
         if (instanceGroups == null) {
             this. = null;
             return;
         }
         instanceGroupsCopy.addAll(instanceGroups);
         this. = instanceGroupsCopy;
     }
    
    
Configuration for the job flow's instance groups.

NOTE: This method appends the values to the existing list (if any). Use setInstanceGroups(java.util.Collection) or withInstanceGroups(java.util.Collection) if you want to override the existing values.

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

Parameters:
instanceGroups Configuration for the job flow's instance groups.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withInstanceGroups(InstanceGroupConfig... instanceGroups) {
         if (getInstanceGroups() == nullsetInstanceGroups(new java.util.ArrayList<InstanceGroupConfig>(instanceGroups.length));
         for (InstanceGroupConfig value : instanceGroups) {
             getInstanceGroups().add(value);
         }
         return this;
     }
    
    
Configuration for the job flow's instance groups.

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

Parameters:
instanceGroups Configuration for the job flow's instance groups.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         if (instanceGroups == null) {
             this. = null;
         } else {
             instanceGroupsCopy.addAll(instanceGroups);
             this. = instanceGroupsCopy;
         }
 
         return this;
     }

    
The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."
 
     public String getEc2KeyName() {
         return ;
     }
    
    
The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
ec2KeyName The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."
 
     public void setEc2KeyName(String ec2KeyName) {
         this. = ec2KeyName;
     }
    
    
The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."

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]*

Parameters:
ec2KeyName The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withEc2KeyName(String ec2KeyName) {
         this. = ec2KeyName;
         return this;
     }

    
The Availability Zone the job flow will run in.

Returns:
The Availability Zone the job flow will run in.
 
     public PlacementType getPlacement() {
         return ;
     }
    
    
The Availability Zone the job flow will run in.

Parameters:
placement The Availability Zone the job flow will run in.
 
     public void setPlacement(PlacementType placement) {
         this. = placement;
     }
    
    
The Availability Zone the job flow will run in.

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

Parameters:
placement The Availability Zone the job flow will run in.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withPlacement(PlacementType placement) {
         this. = placement;
         return this;
     }

    
Specifies whether the job flow should terminate after completing all steps.

Returns:
Specifies whether the job flow should terminate after completing all steps.
 
         return ;
     }
    
    
Specifies whether the job flow should terminate after completing all steps.

Parameters:
keepJobFlowAliveWhenNoSteps Specifies whether the job flow should terminate after completing all steps.
 
     public void setKeepJobFlowAliveWhenNoSteps(Boolean keepJobFlowAliveWhenNoSteps) {
         this. = keepJobFlowAliveWhenNoSteps;
     }
    
    
Specifies whether the job flow should terminate after completing all steps.

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

Parameters:
keepJobFlowAliveWhenNoSteps Specifies whether the job flow should terminate after completing all steps.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withKeepJobFlowAliveWhenNoSteps(Boolean keepJobFlowAliveWhenNoSteps) {
         this. = keepJobFlowAliveWhenNoSteps;
         return this;
     }

    
Specifies whether the job flow should terminate after completing all steps.

Returns:
Specifies whether the job flow should terminate after completing all steps.
 
         return ;
     }

    
Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error.

Returns:
Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error.
 
     public Boolean isTerminationProtected() {
         return ;
     }
    
    
Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error.

Parameters:
terminationProtected Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error.
 
     public void setTerminationProtected(Boolean terminationProtected) {
         this. = terminationProtected;
     }
    
    
Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error.

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

Parameters:
terminationProtected Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withTerminationProtected(Boolean terminationProtected) {
         this. = terminationProtected;
         return this;
     }

    
Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error.

Returns:
Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error.
 
     public Boolean getTerminationProtected() {
         return ;
     }

    
The Hadoop version for the job flow. Valid inputs are "0.18", "0.20", "0.20.205", "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The Hadoop version for the job flow. Valid inputs are "0.18", "0.20", "0.20.205", "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.
 
     public String getHadoopVersion() {
         return ;
     }
    
    
The Hadoop version for the job flow. Valid inputs are "0.18", "0.20", "0.20.205", "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
hadoopVersion The Hadoop version for the job flow. Valid inputs are "0.18", "0.20", "0.20.205", "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.
 
     public void setHadoopVersion(String hadoopVersion) {
         this. = hadoopVersion;
     }
    
    
The Hadoop version for the job flow. Valid inputs are "0.18", "0.20", "0.20.205", "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.

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]*

Parameters:
hadoopVersion The Hadoop version for the job flow. Valid inputs are "0.18", "0.20", "0.20.205", "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withHadoopVersion(String hadoopVersion) {
         this. = hadoopVersion;
         return this;
     }

    
To launch the job flow in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the job flow to launch. If you do not specify this value, the job flow is launched in the normal Amazon Web Services cloud, outside of an Amazon VPC.

Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in a Amazon VPC.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
To launch the job flow in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the job flow to launch. If you do not specify this value, the job flow is launched in the normal Amazon Web Services cloud, outside of an Amazon VPC.

Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in a Amazon VPC.

 
     public String getEc2SubnetId() {
         return ;
     }
    
    
To launch the job flow in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the job flow to launch. If you do not specify this value, the job flow is launched in the normal Amazon Web Services cloud, outside of an Amazon VPC.

Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in a Amazon VPC.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
ec2SubnetId To launch the job flow in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the job flow to launch. If you do not specify this value, the job flow is launched in the normal Amazon Web Services cloud, outside of an Amazon VPC.

Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in a Amazon VPC.

 
     public void setEc2SubnetId(String ec2SubnetId) {
         this. = ec2SubnetId;
     }
    
    
To launch the job flow in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the job flow to launch. If you do not specify this value, the job flow is launched in the normal Amazon Web Services cloud, outside of an Amazon VPC.

Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in a Amazon VPC.

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]*

Parameters:
ec2SubnetId To launch the job flow in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the job flow to launch. If you do not specify this value, the job flow is launched in the normal Amazon Web Services cloud, outside of an Amazon VPC.

Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in a Amazon VPC.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withEc2SubnetId(String ec2SubnetId) {
         this. = ec2SubnetId;
         return this;
     }

    
The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the master node.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the master node.
 
         return ;
     }
    
    
The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the master node.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
emrManagedMasterSecurityGroup The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the master node.
 
     public void setEmrManagedMasterSecurityGroup(String emrManagedMasterSecurityGroup) {
         this. = emrManagedMasterSecurityGroup;
     }
    
    
The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the master node.

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]*

Parameters:
emrManagedMasterSecurityGroup The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the master node.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withEmrManagedMasterSecurityGroup(String emrManagedMasterSecurityGroup) {
         this. = emrManagedMasterSecurityGroup;
         return this;
     }

    
The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the slave nodes.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the slave nodes.
 
         return ;
     }
    
    
The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the slave nodes.

Constraints:
Length: 0 - 256
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
emrManagedSlaveSecurityGroup The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the slave nodes.
 
     public void setEmrManagedSlaveSecurityGroup(String emrManagedSlaveSecurityGroup) {
         this. = emrManagedSlaveSecurityGroup;
     }
    
    
The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the slave nodes.

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]*

Parameters:
emrManagedSlaveSecurityGroup The identifier of the Amazon EC2 security group (managed by Amazon ElasticMapReduce) for the slave nodes.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withEmrManagedSlaveSecurityGroup(String emrManagedSlaveSecurityGroup) {
         this. = emrManagedSlaveSecurityGroup;
         return this;
     }

    
A list of additional Amazon EC2 security group IDs for the master node.

Returns:
A list of additional Amazon EC2 security group IDs for the master node.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A list of additional Amazon EC2 security group IDs for the master node.

Parameters:
additionalMasterSecurityGroups A list of additional Amazon EC2 security group IDs for the master node.
 
     public void setAdditionalMasterSecurityGroups(java.util.Collection<StringadditionalMasterSecurityGroups) {
         if (additionalMasterSecurityGroups == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringadditionalMasterSecurityGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(additionalMasterSecurityGroups.size());
         additionalMasterSecurityGroupsCopy.addAll(additionalMasterSecurityGroups);
         this. = additionalMasterSecurityGroupsCopy;
     }
    
    
A list of additional Amazon EC2 security group IDs for the master node.

NOTE: This method appends the values to the existing list (if any). Use setAdditionalMasterSecurityGroups(java.util.Collection) or withAdditionalMasterSecurityGroups(java.util.Collection) if you want to override the existing values.

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

Parameters:
additionalMasterSecurityGroups A list of additional Amazon EC2 security group IDs for the master node.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withAdditionalMasterSecurityGroups(String... additionalMasterSecurityGroups) {
         if (getAdditionalMasterSecurityGroups() == nullsetAdditionalMasterSecurityGroups(new java.util.ArrayList<String>(additionalMasterSecurityGroups.length));
         for (String value : additionalMasterSecurityGroups) {
             getAdditionalMasterSecurityGroups().add(value);
         }
         return this;
     }
    
    
A list of additional Amazon EC2 security group IDs for the master node.

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

Parameters:
additionalMasterSecurityGroups A list of additional Amazon EC2 security group IDs for the master node.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withAdditionalMasterSecurityGroups(java.util.Collection<StringadditionalMasterSecurityGroups) {
         if (additionalMasterSecurityGroups == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringadditionalMasterSecurityGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(additionalMasterSecurityGroups.size());
             additionalMasterSecurityGroupsCopy.addAll(additionalMasterSecurityGroups);
             this. = additionalMasterSecurityGroupsCopy;
         }
 
         return this;
     }

    
A list of additional Amazon EC2 security group IDs for the slave nodes.

Returns:
A list of additional Amazon EC2 security group IDs for the slave nodes.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A list of additional Amazon EC2 security group IDs for the slave nodes.

Parameters:
additionalSlaveSecurityGroups A list of additional Amazon EC2 security group IDs for the slave nodes.
 
     public void setAdditionalSlaveSecurityGroups(java.util.Collection<StringadditionalSlaveSecurityGroups) {
         if (additionalSlaveSecurityGroups == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringadditionalSlaveSecurityGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(additionalSlaveSecurityGroups.size());
         additionalSlaveSecurityGroupsCopy.addAll(additionalSlaveSecurityGroups);
         this. = additionalSlaveSecurityGroupsCopy;
     }
    
    
A list of additional Amazon EC2 security group IDs for the slave nodes.

NOTE: This method appends the values to the existing list (if any). Use setAdditionalSlaveSecurityGroups(java.util.Collection) or withAdditionalSlaveSecurityGroups(java.util.Collection) if you want to override the existing values.

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

Parameters:
additionalSlaveSecurityGroups A list of additional Amazon EC2 security group IDs for the slave nodes.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withAdditionalSlaveSecurityGroups(String... additionalSlaveSecurityGroups) {
         if (getAdditionalSlaveSecurityGroups() == nullsetAdditionalSlaveSecurityGroups(new java.util.ArrayList<String>(additionalSlaveSecurityGroups.length));
         for (String value : additionalSlaveSecurityGroups) {
             getAdditionalSlaveSecurityGroups().add(value);
         }
         return this;
     }
    
    
A list of additional Amazon EC2 security group IDs for the slave nodes.

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

Parameters:
additionalSlaveSecurityGroups A list of additional Amazon EC2 security group IDs for the slave nodes.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public JobFlowInstancesConfig withAdditionalSlaveSecurityGroups(java.util.Collection<StringadditionalSlaveSecurityGroups) {
         if (additionalSlaveSecurityGroups == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringadditionalSlaveSecurityGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(additionalSlaveSecurityGroups.size());
             additionalSlaveSecurityGroupsCopy.addAll(additionalSlaveSecurityGroups);
             this. = additionalSlaveSecurityGroupsCopy;
         }
 
         return this;
     }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
 
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
         sb.append("{");
         if (getMasterInstanceType() != nullsb.append("MasterInstanceType: " + getMasterInstanceType() + ",");
         if (getSlaveInstanceType() != nullsb.append("SlaveInstanceType: " + getSlaveInstanceType() + ",");
         if (getInstanceCount() != nullsb.append("InstanceCount: " + getInstanceCount() + ",");
         if (getInstanceGroups() != nullsb.append("InstanceGroups: " + getInstanceGroups() + ",");
         if (getEc2KeyName() != nullsb.append("Ec2KeyName: " + getEc2KeyName() + ",");
         if (getPlacement() != nullsb.append("Placement: " + getPlacement() + ",");
         if (isKeepJobFlowAliveWhenNoSteps() != nullsb.append("KeepJobFlowAliveWhenNoSteps: " + isKeepJobFlowAliveWhenNoSteps() + ",");
         if (isTerminationProtected() != nullsb.append("TerminationProtected: " + isTerminationProtected() + ",");
         if (getHadoopVersion() != nullsb.append("HadoopVersion: " + getHadoopVersion() + ",");
         if (getEc2SubnetId() != nullsb.append("Ec2SubnetId: " + getEc2SubnetId() + ",");
         if (getEmrManagedMasterSecurityGroup() != nullsb.append("EmrManagedMasterSecurityGroup: " + getEmrManagedMasterSecurityGroup() + ",");
         if (getEmrManagedSlaveSecurityGroup() != nullsb.append("EmrManagedSlaveSecurityGroup: " + getEmrManagedSlaveSecurityGroup() + ",");
         if (getAdditionalMasterSecurityGroups() != nullsb.append("AdditionalMasterSecurityGroups: " + getAdditionalMasterSecurityGroups() + ",");
         if (getAdditionalSlaveSecurityGroups() != nullsb.append("AdditionalSlaveSecurityGroups: " + getAdditionalSlaveSecurityGroups() );
         sb.append("}");
         return sb.toString();
     }
     
     @Override
     public int hashCode() {
         final int prime = 31;
         int hashCode = 1;
         
         hashCode = prime * hashCode + ((getMasterInstanceType() == null) ? 0 : getMasterInstanceType().hashCode()); 
         hashCode = prime * hashCode + ((getSlaveInstanceType() == null) ? 0 : getSlaveInstanceType().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceCount() == null) ? 0 : getInstanceCount().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceGroups() == null) ? 0 : getInstanceGroups().hashCode()); 
        hashCode = prime * hashCode + ((getEc2KeyName() == null) ? 0 : getEc2KeyName().hashCode()); 
        hashCode = prime * hashCode + ((getPlacement() == null) ? 0 : getPlacement().hashCode()); 
        hashCode = prime * hashCode + ((isKeepJobFlowAliveWhenNoSteps() == null) ? 0 : isKeepJobFlowAliveWhenNoSteps().hashCode()); 
        hashCode = prime * hashCode + ((isTerminationProtected() == null) ? 0 : isTerminationProtected().hashCode()); 
        hashCode = prime * hashCode + ((getHadoopVersion() == null) ? 0 : getHadoopVersion().hashCode()); 
        hashCode = prime * hashCode + ((getEc2SubnetId() == null) ? 0 : getEc2SubnetId().hashCode()); 
        hashCode = prime * hashCode + ((getEmrManagedMasterSecurityGroup() == null) ? 0 : getEmrManagedMasterSecurityGroup().hashCode()); 
        hashCode = prime * hashCode + ((getEmrManagedSlaveSecurityGroup() == null) ? 0 : getEmrManagedSlaveSecurityGroup().hashCode()); 
        hashCode = prime * hashCode + ((getAdditionalMasterSecurityGroups() == null) ? 0 : getAdditionalMasterSecurityGroups().hashCode()); 
        hashCode = prime * hashCode + ((getAdditionalSlaveSecurityGroups() == null) ? 0 : getAdditionalSlaveSecurityGroups().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof JobFlowInstancesConfig == falsereturn false;
        JobFlowInstancesConfig other = (JobFlowInstancesConfig)obj;
        
        if (other.getMasterInstanceType() == null ^ this.getMasterInstanceType() == nullreturn false;
        if (other.getMasterInstanceType() != null && other.getMasterInstanceType().equals(this.getMasterInstanceType()) == falsereturn false
        if (other.getSlaveInstanceType() == null ^ this.getSlaveInstanceType() == nullreturn false;
        if (other.getSlaveInstanceType() != null && other.getSlaveInstanceType().equals(this.getSlaveInstanceType()) == falsereturn false
        if (other.getInstanceCount() == null ^ this.getInstanceCount() == nullreturn false;
        if (other.getInstanceCount() != null && other.getInstanceCount().equals(this.getInstanceCount()) == falsereturn false
        if (other.getInstanceGroups() == null ^ this.getInstanceGroups() == nullreturn false;
        if (other.getInstanceGroups() != null && other.getInstanceGroups().equals(this.getInstanceGroups()) == falsereturn false
        if (other.getEc2KeyName() == null ^ this.getEc2KeyName() == nullreturn false;
        if (other.getEc2KeyName() != null && other.getEc2KeyName().equals(this.getEc2KeyName()) == falsereturn false
        if (other.getPlacement() == null ^ this.getPlacement() == nullreturn false;
        if (other.getPlacement() != null && other.getPlacement().equals(this.getPlacement()) == falsereturn false
        if (other.isKeepJobFlowAliveWhenNoSteps() == null ^ this.isKeepJobFlowAliveWhenNoSteps() == nullreturn false;
        if (other.isKeepJobFlowAliveWhenNoSteps() != null && other.isKeepJobFlowAliveWhenNoSteps().equals(this.isKeepJobFlowAliveWhenNoSteps()) == falsereturn false
        if (other.isTerminationProtected() == null ^ this.isTerminationProtected() == nullreturn false;
        if (other.isTerminationProtected() != null && other.isTerminationProtected().equals(this.isTerminationProtected()) == falsereturn false
        if (other.getHadoopVersion() == null ^ this.getHadoopVersion() == nullreturn false;
        if (other.getHadoopVersion() != null && other.getHadoopVersion().equals(this.getHadoopVersion()) == falsereturn false
        if (other.getEc2SubnetId() == null ^ this.getEc2SubnetId() == nullreturn false;
        if (other.getEc2SubnetId() != null && other.getEc2SubnetId().equals(this.getEc2SubnetId()) == falsereturn false
        if (other.getEmrManagedMasterSecurityGroup() == null ^ this.getEmrManagedMasterSecurityGroup() == nullreturn false;
        if (other.getEmrManagedMasterSecurityGroup() != null && other.getEmrManagedMasterSecurityGroup().equals(this.getEmrManagedMasterSecurityGroup()) == falsereturn false
        if (other.getEmrManagedSlaveSecurityGroup() == null ^ this.getEmrManagedSlaveSecurityGroup() == nullreturn false;
        if (other.getEmrManagedSlaveSecurityGroup() != null && other.getEmrManagedSlaveSecurityGroup().equals(this.getEmrManagedSlaveSecurityGroup()) == falsereturn false
        if (other.getAdditionalMasterSecurityGroups() == null ^ this.getAdditionalMasterSecurityGroups() == nullreturn false;
        if (other.getAdditionalMasterSecurityGroups() != null && other.getAdditionalMasterSecurityGroups().equals(this.getAdditionalMasterSecurityGroups()) == falsereturn false
        if (other.getAdditionalSlaveSecurityGroups() == null ^ this.getAdditionalSlaveSecurityGroups() == nullreturn false;
        if (other.getAdditionalSlaveSecurityGroups() != null && other.getAdditionalSlaveSecurityGroups().equals(this.getAdditionalSlaveSecurityGroups()) == falsereturn false
        return true;
    }
    
    @Override
    public JobFlowInstancesConfig clone() {
        try {
            return (JobFlowInstancesConfigsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X