All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.elasticmapreduce.model.JobFlowInstancesConfig Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EMR module holds the client classes that are used for communicating with Amazon Elastic MapReduce Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2017-2022 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 javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A description of the Amazon EC2 instance on which the cluster (job flow) runs. A valid JobFlowInstancesConfig must * contain either InstanceGroups or InstanceFleets. They cannot be used together. You may also have MasterInstanceType, * SlaveInstanceType, and InstanceCount (all three must be present), but we don't recommend this configuration. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class JobFlowInstancesConfig implements Serializable, Cloneable, StructuredPojo { /** *

* The EC2 instance type of the master node. *

*/ private String masterInstanceType; /** *

* The EC2 instance type of the core and task nodes. *

*/ private String slaveInstanceType; /** *

* The number of EC2 instances in the cluster. *

*/ private Integer instanceCount; /** *

* Configuration for the instance groups in a cluster. *

*/ private com.amazonaws.internal.SdkInternalList instanceGroups; /** * *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

*
*

* Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration. *

*/ private com.amazonaws.internal.SdkInternalList instanceFleets; /** *

* The name of the EC2 key pair that can be used to connect to the master node using SSH as the user called * "hadoop." *

*/ private String ec2KeyName; /** *

* The Availability Zone in which the cluster runs. *

*/ private PlacementType placement; /** *

* Specifies whether the cluster should remain available after completing all steps. Defaults to true. * For more information about configuring cluster termination, see Control Cluster * Termination in the EMR Management Guide. *

*/ private Boolean keepJobFlowAliveWhenNoSteps; /** *

* Specifies whether to lock the cluster 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; /** *

* Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs * are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "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. *

*/ private String hadoopVersion; /** *

* Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual * Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the * cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches * in EC2-Classic. *

*/ private String ec2SubnetId; /** *

* Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, Amazon * EMR evaluates them and launches instances in the optimal subnet. *

* *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

*
*/ private com.amazonaws.internal.SdkInternalList ec2SubnetIds; /** *

* The identifier of the Amazon EC2 security group for the master node. If you specify * EmrManagedMasterSecurityGroup, you must also specify EmrManagedSlaveSecurityGroup. *

*/ private String emrManagedMasterSecurityGroup; /** *

* The identifier of the Amazon EC2 security group for the core and task nodes. If you specify * EmrManagedSlaveSecurityGroup, you must also specify EmrManagedMasterSecurityGroup. *

*/ private String emrManagedSlaveSecurityGroup; /** *

* The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private * subnets. *

*/ private String serviceAccessSecurityGroup; /** *

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

*/ private com.amazonaws.internal.SdkInternalList additionalMasterSecurityGroups; /** *

* A list of additional Amazon EC2 security group IDs for the core and task nodes. *

*/ private com.amazonaws.internal.SdkInternalList additionalSlaveSecurityGroups; /** *

* The EC2 instance type of the master node. *

* * @param masterInstanceType * The EC2 instance type of the master node. */ public void setMasterInstanceType(String masterInstanceType) { this.masterInstanceType = masterInstanceType; } /** *

* The EC2 instance type of the master node. *

* * @return The EC2 instance type of the master node. */ public String getMasterInstanceType() { return this.masterInstanceType; } /** *

* The EC2 instance type of the master node. *

* * @param masterInstanceType * The EC2 instance type of the master node. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withMasterInstanceType(String masterInstanceType) { setMasterInstanceType(masterInstanceType); return this; } /** *

* The EC2 instance type of the core and task nodes. *

* * @param slaveInstanceType * The EC2 instance type of the core and task nodes. */ public void setSlaveInstanceType(String slaveInstanceType) { this.slaveInstanceType = slaveInstanceType; } /** *

* The EC2 instance type of the core and task nodes. *

* * @return The EC2 instance type of the core and task nodes. */ public String getSlaveInstanceType() { return this.slaveInstanceType; } /** *

* The EC2 instance type of the core and task nodes. *

* * @param slaveInstanceType * The EC2 instance type of the core and task nodes. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withSlaveInstanceType(String slaveInstanceType) { setSlaveInstanceType(slaveInstanceType); return this; } /** *

* The number of EC2 instances in the cluster. *

* * @param instanceCount * The number of EC2 instances in the cluster. */ public void setInstanceCount(Integer instanceCount) { this.instanceCount = instanceCount; } /** *

* The number of EC2 instances in the cluster. *

* * @return The number of EC2 instances in the cluster. */ public Integer getInstanceCount() { return this.instanceCount; } /** *

* The number of EC2 instances in the cluster. *

* * @param instanceCount * The number of EC2 instances in the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withInstanceCount(Integer instanceCount) { setInstanceCount(instanceCount); return this; } /** *

* Configuration for the instance groups in a cluster. *

* * @return Configuration for the instance groups in a cluster. */ public java.util.List getInstanceGroups() { if (instanceGroups == null) { instanceGroups = new com.amazonaws.internal.SdkInternalList(); } return instanceGroups; } /** *

* Configuration for the instance groups in a cluster. *

* * @param instanceGroups * Configuration for the instance groups in a cluster. */ public void setInstanceGroups(java.util.Collection instanceGroups) { if (instanceGroups == null) { this.instanceGroups = null; return; } this.instanceGroups = new com.amazonaws.internal.SdkInternalList(instanceGroups); } /** *

* Configuration for the instance groups in a cluster. *

*

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

* * @param instanceGroups * Configuration for the instance groups in a cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withInstanceGroups(InstanceGroupConfig... instanceGroups) { if (this.instanceGroups == null) { setInstanceGroups(new com.amazonaws.internal.SdkInternalList(instanceGroups.length)); } for (InstanceGroupConfig ele : instanceGroups) { this.instanceGroups.add(ele); } return this; } /** *

* Configuration for the instance groups in a cluster. *

* * @param instanceGroups * Configuration for the instance groups in a cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withInstanceGroups(java.util.Collection instanceGroups) { setInstanceGroups(instanceGroups); return this; } /** * *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

*
*

* Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration. *

* * @return

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding * 5.0.x versions. *

* *

* Describes the EC2 instances and instance configurations for clusters that use the instance fleet * configuration. */ public java.util.List getInstanceFleets() { if (instanceFleets == null) { instanceFleets = new com.amazonaws.internal.SdkInternalList(); } return instanceFleets; } /** * *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

* *

* Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration. *

* * @param instanceFleets *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

* *

* Describes the EC2 instances and instance configurations for clusters that use the instance fleet * configuration. */ public void setInstanceFleets(java.util.Collection instanceFleets) { if (instanceFleets == null) { this.instanceFleets = null; return; } this.instanceFleets = new com.amazonaws.internal.SdkInternalList(instanceFleets); } /** * *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

* *

* Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setInstanceFleets(java.util.Collection)} or {@link #withInstanceFleets(java.util.Collection)} if you want * to override the existing values. *

* * @param instanceFleets *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

* *

* Describes the EC2 instances and instance configurations for clusters that use the instance fleet * configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withInstanceFleets(InstanceFleetConfig... instanceFleets) { if (this.instanceFleets == null) { setInstanceFleets(new com.amazonaws.internal.SdkInternalList(instanceFleets.length)); } for (InstanceFleetConfig ele : instanceFleets) { this.instanceFleets.add(ele); } return this; } /** * *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

* *

* Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration. *

* * @param instanceFleets *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

* *

* Describes the EC2 instances and instance configurations for clusters that use the instance fleet * configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withInstanceFleets(java.util.Collection instanceFleets) { setInstanceFleets(instanceFleets); return this; } /** *

* The name of the EC2 key pair that can be used to connect to the master node using SSH as the user called * "hadoop." *

* * @param ec2KeyName * The name of the EC2 key pair that can be used to connect to the master node using SSH as the user called * "hadoop." */ public void setEc2KeyName(String ec2KeyName) { this.ec2KeyName = ec2KeyName; } /** *

* The name of the EC2 key pair that can be used to connect to the master node using SSH as the user called * "hadoop." *

* * @return The name of the EC2 key pair that can be used to connect to the master node using SSH as the user called * "hadoop." */ public String getEc2KeyName() { return this.ec2KeyName; } /** *

* The name of the EC2 key pair that can be used to connect to the master node using SSH as the user called * "hadoop." *

* * @param ec2KeyName * The name of the EC2 key pair that can be used to connect to the master node using SSH as the user called * "hadoop." * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withEc2KeyName(String ec2KeyName) { setEc2KeyName(ec2KeyName); return this; } /** *

* The Availability Zone in which the cluster runs. *

* * @param placement * The Availability Zone in which the cluster runs. */ public void setPlacement(PlacementType placement) { this.placement = placement; } /** *

* The Availability Zone in which the cluster runs. *

* * @return The Availability Zone in which the cluster runs. */ public PlacementType getPlacement() { return this.placement; } /** *

* The Availability Zone in which the cluster runs. *

* * @param placement * The Availability Zone in which the cluster runs. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withPlacement(PlacementType placement) { setPlacement(placement); return this; } /** *

* Specifies whether the cluster should remain available after completing all steps. Defaults to true. * For more information about configuring cluster termination, see Control Cluster * Termination in the EMR Management Guide. *

* * @param keepJobFlowAliveWhenNoSteps * Specifies whether the cluster should remain available after completing all steps. Defaults to * true. For more information about configuring cluster termination, see Control Cluster * Termination in the EMR Management Guide. */ public void setKeepJobFlowAliveWhenNoSteps(Boolean keepJobFlowAliveWhenNoSteps) { this.keepJobFlowAliveWhenNoSteps = keepJobFlowAliveWhenNoSteps; } /** *

* Specifies whether the cluster should remain available after completing all steps. Defaults to true. * For more information about configuring cluster termination, see Control Cluster * Termination in the EMR Management Guide. *

* * @return Specifies whether the cluster should remain available after completing all steps. Defaults to * true. For more information about configuring cluster termination, see Control Cluster * Termination in the EMR Management Guide. */ public Boolean getKeepJobFlowAliveWhenNoSteps() { return this.keepJobFlowAliveWhenNoSteps; } /** *

* Specifies whether the cluster should remain available after completing all steps. Defaults to true. * For more information about configuring cluster termination, see Control Cluster * Termination in the EMR Management Guide. *

* * @param keepJobFlowAliveWhenNoSteps * Specifies whether the cluster should remain available after completing all steps. Defaults to * true. For more information about configuring cluster termination, see Control Cluster * Termination in the EMR Management Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withKeepJobFlowAliveWhenNoSteps(Boolean keepJobFlowAliveWhenNoSteps) { setKeepJobFlowAliveWhenNoSteps(keepJobFlowAliveWhenNoSteps); return this; } /** *

* Specifies whether the cluster should remain available after completing all steps. Defaults to true. * For more information about configuring cluster termination, see Control Cluster * Termination in the EMR Management Guide. *

* * @return Specifies whether the cluster should remain available after completing all steps. Defaults to * true. For more information about configuring cluster termination, see Control Cluster * Termination in the EMR Management Guide. */ public Boolean isKeepJobFlowAliveWhenNoSteps() { return this.keepJobFlowAliveWhenNoSteps; } /** *

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

* * @param terminationProtected * Specifies whether to lock the cluster 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 = terminationProtected; } /** *

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

* * @return Specifies whether to lock the cluster 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 this.terminationProtected; } /** *

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

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

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

* * @return Specifies whether to lock the cluster 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 this.terminationProtected; } /** *

* Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs * are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "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. *

* * @param hadoopVersion * Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid * inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer * maintained), "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 = hadoopVersion; } /** *

* Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs * are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "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. *

* * @return Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid * inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer * maintained), "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 this.hadoopVersion; } /** *

* Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs * are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "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. *

* * @param hadoopVersion * Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid * inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer * maintained), "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. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withHadoopVersion(String hadoopVersion) { setHadoopVersion(hadoopVersion); return this; } /** *

* Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual * Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the * cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches * in EC2-Classic. *

* * @param ec2SubnetId * Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon * Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where * you want the cluster to launch. If you do not specify this value and your account supports EC2-Classic, * the cluster launches in EC2-Classic. */ public void setEc2SubnetId(String ec2SubnetId) { this.ec2SubnetId = ec2SubnetId; } /** *

* Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual * Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the * cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches * in EC2-Classic. *

* * @return Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon * Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where * you want the cluster to launch. If you do not specify this value and your account supports EC2-Classic, * the cluster launches in EC2-Classic. */ public String getEc2SubnetId() { return this.ec2SubnetId; } /** *

* Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual * Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the * cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches * in EC2-Classic. *

* * @param ec2SubnetId * Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon * Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where * you want the cluster to launch. If you do not specify this value and your account supports EC2-Classic, * the cluster launches in EC2-Classic. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withEc2SubnetId(String ec2SubnetId) { setEc2SubnetId(ec2SubnetId); return this; } /** *

* Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, Amazon * EMR evaluates them and launches instances in the optimal subnet. *

* *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

*
* * @return Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are * specified, Amazon EMR evaluates them and launches instances in the optimal subnet.

*

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding * 5.0.x versions. *

*/ public java.util.List getEc2SubnetIds() { if (ec2SubnetIds == null) { ec2SubnetIds = new com.amazonaws.internal.SdkInternalList(); } return ec2SubnetIds; } /** *

* Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, Amazon * EMR evaluates them and launches instances in the optimal subnet. *

* *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

*
* * @param ec2SubnetIds * Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, * Amazon EMR evaluates them and launches instances in the optimal subnet.

*

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

*/ public void setEc2SubnetIds(java.util.Collection ec2SubnetIds) { if (ec2SubnetIds == null) { this.ec2SubnetIds = null; return; } this.ec2SubnetIds = new com.amazonaws.internal.SdkInternalList(ec2SubnetIds); } /** *

* Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, Amazon * EMR evaluates them and launches instances in the optimal subnet. *

* *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

*
*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setEc2SubnetIds(java.util.Collection)} or {@link #withEc2SubnetIds(java.util.Collection)} if you want to * override the existing values. *

* * @param ec2SubnetIds * Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, * Amazon EMR evaluates them and launches instances in the optimal subnet.

*

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

* @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withEc2SubnetIds(String... ec2SubnetIds) { if (this.ec2SubnetIds == null) { setEc2SubnetIds(new com.amazonaws.internal.SdkInternalList(ec2SubnetIds.length)); } for (String ele : ec2SubnetIds) { this.ec2SubnetIds.add(ele); } return this; } /** *

* Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, Amazon * EMR evaluates them and launches instances in the optimal subnet. *

* *

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

*
* * @param ec2SubnetIds * Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, * Amazon EMR evaluates them and launches instances in the optimal subnet.

*

* The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x * versions. *

* @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withEc2SubnetIds(java.util.Collection ec2SubnetIds) { setEc2SubnetIds(ec2SubnetIds); return this; } /** *

* The identifier of the Amazon EC2 security group for the master node. If you specify * EmrManagedMasterSecurityGroup, you must also specify EmrManagedSlaveSecurityGroup. *

* * @param emrManagedMasterSecurityGroup * The identifier of the Amazon EC2 security group for the master node. If you specify * EmrManagedMasterSecurityGroup, you must also specify * EmrManagedSlaveSecurityGroup. */ public void setEmrManagedMasterSecurityGroup(String emrManagedMasterSecurityGroup) { this.emrManagedMasterSecurityGroup = emrManagedMasterSecurityGroup; } /** *

* The identifier of the Amazon EC2 security group for the master node. If you specify * EmrManagedMasterSecurityGroup, you must also specify EmrManagedSlaveSecurityGroup. *

* * @return The identifier of the Amazon EC2 security group for the master node. If you specify * EmrManagedMasterSecurityGroup, you must also specify * EmrManagedSlaveSecurityGroup. */ public String getEmrManagedMasterSecurityGroup() { return this.emrManagedMasterSecurityGroup; } /** *

* The identifier of the Amazon EC2 security group for the master node. If you specify * EmrManagedMasterSecurityGroup, you must also specify EmrManagedSlaveSecurityGroup. *

* * @param emrManagedMasterSecurityGroup * The identifier of the Amazon EC2 security group for the master node. If you specify * EmrManagedMasterSecurityGroup, you must also specify * EmrManagedSlaveSecurityGroup. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withEmrManagedMasterSecurityGroup(String emrManagedMasterSecurityGroup) { setEmrManagedMasterSecurityGroup(emrManagedMasterSecurityGroup); return this; } /** *

* The identifier of the Amazon EC2 security group for the core and task nodes. If you specify * EmrManagedSlaveSecurityGroup, you must also specify EmrManagedMasterSecurityGroup. *

* * @param emrManagedSlaveSecurityGroup * The identifier of the Amazon EC2 security group for the core and task nodes. If you specify * EmrManagedSlaveSecurityGroup, you must also specify * EmrManagedMasterSecurityGroup. */ public void setEmrManagedSlaveSecurityGroup(String emrManagedSlaveSecurityGroup) { this.emrManagedSlaveSecurityGroup = emrManagedSlaveSecurityGroup; } /** *

* The identifier of the Amazon EC2 security group for the core and task nodes. If you specify * EmrManagedSlaveSecurityGroup, you must also specify EmrManagedMasterSecurityGroup. *

* * @return The identifier of the Amazon EC2 security group for the core and task nodes. If you specify * EmrManagedSlaveSecurityGroup, you must also specify * EmrManagedMasterSecurityGroup. */ public String getEmrManagedSlaveSecurityGroup() { return this.emrManagedSlaveSecurityGroup; } /** *

* The identifier of the Amazon EC2 security group for the core and task nodes. If you specify * EmrManagedSlaveSecurityGroup, you must also specify EmrManagedMasterSecurityGroup. *

* * @param emrManagedSlaveSecurityGroup * The identifier of the Amazon EC2 security group for the core and task nodes. If you specify * EmrManagedSlaveSecurityGroup, you must also specify * EmrManagedMasterSecurityGroup. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withEmrManagedSlaveSecurityGroup(String emrManagedSlaveSecurityGroup) { setEmrManagedSlaveSecurityGroup(emrManagedSlaveSecurityGroup); return this; } /** *

* The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private * subnets. *

* * @param serviceAccessSecurityGroup * The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC * private subnets. */ public void setServiceAccessSecurityGroup(String serviceAccessSecurityGroup) { this.serviceAccessSecurityGroup = serviceAccessSecurityGroup; } /** *

* The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private * subnets. *

* * @return The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC * private subnets. */ public String getServiceAccessSecurityGroup() { return this.serviceAccessSecurityGroup; } /** *

* The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private * subnets. *

* * @param serviceAccessSecurityGroup * The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC * private subnets. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withServiceAccessSecurityGroup(String serviceAccessSecurityGroup) { setServiceAccessSecurityGroup(serviceAccessSecurityGroup); return this; } /** *

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

* * @return A list of additional Amazon EC2 security group IDs for the master node. */ public java.util.List getAdditionalMasterSecurityGroups() { if (additionalMasterSecurityGroups == null) { additionalMasterSecurityGroups = new com.amazonaws.internal.SdkInternalList(); } return additionalMasterSecurityGroups; } /** *

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

* * @param additionalMasterSecurityGroups * A list of additional Amazon EC2 security group IDs for the master node. */ public void setAdditionalMasterSecurityGroups(java.util.Collection additionalMasterSecurityGroups) { if (additionalMasterSecurityGroups == null) { this.additionalMasterSecurityGroups = null; return; } this.additionalMasterSecurityGroups = new com.amazonaws.internal.SdkInternalList(additionalMasterSecurityGroups); } /** *

* 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 * {@link #setAdditionalMasterSecurityGroups(java.util.Collection)} or * {@link #withAdditionalMasterSecurityGroups(java.util.Collection)} if you want to override the existing values. *

* * @param additionalMasterSecurityGroups * A list of additional Amazon EC2 security group IDs for the master node. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withAdditionalMasterSecurityGroups(String... additionalMasterSecurityGroups) { if (this.additionalMasterSecurityGroups == null) { setAdditionalMasterSecurityGroups(new com.amazonaws.internal.SdkInternalList(additionalMasterSecurityGroups.length)); } for (String ele : additionalMasterSecurityGroups) { this.additionalMasterSecurityGroups.add(ele); } return this; } /** *

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

* * @param additionalMasterSecurityGroups * A list of additional Amazon EC2 security group IDs for the master node. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withAdditionalMasterSecurityGroups(java.util.Collection additionalMasterSecurityGroups) { setAdditionalMasterSecurityGroups(additionalMasterSecurityGroups); return this; } /** *

* A list of additional Amazon EC2 security group IDs for the core and task nodes. *

* * @return A list of additional Amazon EC2 security group IDs for the core and task nodes. */ public java.util.List getAdditionalSlaveSecurityGroups() { if (additionalSlaveSecurityGroups == null) { additionalSlaveSecurityGroups = new com.amazonaws.internal.SdkInternalList(); } return additionalSlaveSecurityGroups; } /** *

* A list of additional Amazon EC2 security group IDs for the core and task nodes. *

* * @param additionalSlaveSecurityGroups * A list of additional Amazon EC2 security group IDs for the core and task nodes. */ public void setAdditionalSlaveSecurityGroups(java.util.Collection additionalSlaveSecurityGroups) { if (additionalSlaveSecurityGroups == null) { this.additionalSlaveSecurityGroups = null; return; } this.additionalSlaveSecurityGroups = new com.amazonaws.internal.SdkInternalList(additionalSlaveSecurityGroups); } /** *

* A list of additional Amazon EC2 security group IDs for the core and task nodes. *

*

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

* * @param additionalSlaveSecurityGroups * A list of additional Amazon EC2 security group IDs for the core and task nodes. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withAdditionalSlaveSecurityGroups(String... additionalSlaveSecurityGroups) { if (this.additionalSlaveSecurityGroups == null) { setAdditionalSlaveSecurityGroups(new com.amazonaws.internal.SdkInternalList(additionalSlaveSecurityGroups.length)); } for (String ele : additionalSlaveSecurityGroups) { this.additionalSlaveSecurityGroups.add(ele); } return this; } /** *

* A list of additional Amazon EC2 security group IDs for the core and task nodes. *

* * @param additionalSlaveSecurityGroups * A list of additional Amazon EC2 security group IDs for the core and task nodes. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowInstancesConfig withAdditionalSlaveSecurityGroups(java.util.Collection additionalSlaveSecurityGroups) { setAdditionalSlaveSecurityGroups(additionalSlaveSecurityGroups); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getMasterInstanceType() != null) sb.append("MasterInstanceType: ").append(getMasterInstanceType()).append(","); if (getSlaveInstanceType() != null) sb.append("SlaveInstanceType: ").append(getSlaveInstanceType()).append(","); if (getInstanceCount() != null) sb.append("InstanceCount: ").append(getInstanceCount()).append(","); if (getInstanceGroups() != null) sb.append("InstanceGroups: ").append(getInstanceGroups()).append(","); if (getInstanceFleets() != null) sb.append("InstanceFleets: ").append(getInstanceFleets()).append(","); if (getEc2KeyName() != null) sb.append("Ec2KeyName: ").append(getEc2KeyName()).append(","); if (getPlacement() != null) sb.append("Placement: ").append(getPlacement()).append(","); if (getKeepJobFlowAliveWhenNoSteps() != null) sb.append("KeepJobFlowAliveWhenNoSteps: ").append(getKeepJobFlowAliveWhenNoSteps()).append(","); if (getTerminationProtected() != null) sb.append("TerminationProtected: ").append(getTerminationProtected()).append(","); if (getHadoopVersion() != null) sb.append("HadoopVersion: ").append(getHadoopVersion()).append(","); if (getEc2SubnetId() != null) sb.append("Ec2SubnetId: ").append(getEc2SubnetId()).append(","); if (getEc2SubnetIds() != null) sb.append("Ec2SubnetIds: ").append(getEc2SubnetIds()).append(","); if (getEmrManagedMasterSecurityGroup() != null) sb.append("EmrManagedMasterSecurityGroup: ").append(getEmrManagedMasterSecurityGroup()).append(","); if (getEmrManagedSlaveSecurityGroup() != null) sb.append("EmrManagedSlaveSecurityGroup: ").append(getEmrManagedSlaveSecurityGroup()).append(","); if (getServiceAccessSecurityGroup() != null) sb.append("ServiceAccessSecurityGroup: ").append(getServiceAccessSecurityGroup()).append(","); if (getAdditionalMasterSecurityGroups() != null) sb.append("AdditionalMasterSecurityGroups: ").append(getAdditionalMasterSecurityGroups()).append(","); if (getAdditionalSlaveSecurityGroups() != null) sb.append("AdditionalSlaveSecurityGroups: ").append(getAdditionalSlaveSecurityGroups()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof JobFlowInstancesConfig == false) return false; JobFlowInstancesConfig other = (JobFlowInstancesConfig) obj; if (other.getMasterInstanceType() == null ^ this.getMasterInstanceType() == null) return false; if (other.getMasterInstanceType() != null && other.getMasterInstanceType().equals(this.getMasterInstanceType()) == false) return false; if (other.getSlaveInstanceType() == null ^ this.getSlaveInstanceType() == null) return false; if (other.getSlaveInstanceType() != null && other.getSlaveInstanceType().equals(this.getSlaveInstanceType()) == false) return false; if (other.getInstanceCount() == null ^ this.getInstanceCount() == null) return false; if (other.getInstanceCount() != null && other.getInstanceCount().equals(this.getInstanceCount()) == false) return false; if (other.getInstanceGroups() == null ^ this.getInstanceGroups() == null) return false; if (other.getInstanceGroups() != null && other.getInstanceGroups().equals(this.getInstanceGroups()) == false) return false; if (other.getInstanceFleets() == null ^ this.getInstanceFleets() == null) return false; if (other.getInstanceFleets() != null && other.getInstanceFleets().equals(this.getInstanceFleets()) == false) return false; if (other.getEc2KeyName() == null ^ this.getEc2KeyName() == null) return false; if (other.getEc2KeyName() != null && other.getEc2KeyName().equals(this.getEc2KeyName()) == false) return false; if (other.getPlacement() == null ^ this.getPlacement() == null) return false; if (other.getPlacement() != null && other.getPlacement().equals(this.getPlacement()) == false) return false; if (other.getKeepJobFlowAliveWhenNoSteps() == null ^ this.getKeepJobFlowAliveWhenNoSteps() == null) return false; if (other.getKeepJobFlowAliveWhenNoSteps() != null && other.getKeepJobFlowAliveWhenNoSteps().equals(this.getKeepJobFlowAliveWhenNoSteps()) == false) return false; if (other.getTerminationProtected() == null ^ this.getTerminationProtected() == null) return false; if (other.getTerminationProtected() != null && other.getTerminationProtected().equals(this.getTerminationProtected()) == false) return false; if (other.getHadoopVersion() == null ^ this.getHadoopVersion() == null) return false; if (other.getHadoopVersion() != null && other.getHadoopVersion().equals(this.getHadoopVersion()) == false) return false; if (other.getEc2SubnetId() == null ^ this.getEc2SubnetId() == null) return false; if (other.getEc2SubnetId() != null && other.getEc2SubnetId().equals(this.getEc2SubnetId()) == false) return false; if (other.getEc2SubnetIds() == null ^ this.getEc2SubnetIds() == null) return false; if (other.getEc2SubnetIds() != null && other.getEc2SubnetIds().equals(this.getEc2SubnetIds()) == false) return false; if (other.getEmrManagedMasterSecurityGroup() == null ^ this.getEmrManagedMasterSecurityGroup() == null) return false; if (other.getEmrManagedMasterSecurityGroup() != null && other.getEmrManagedMasterSecurityGroup().equals(this.getEmrManagedMasterSecurityGroup()) == false) return false; if (other.getEmrManagedSlaveSecurityGroup() == null ^ this.getEmrManagedSlaveSecurityGroup() == null) return false; if (other.getEmrManagedSlaveSecurityGroup() != null && other.getEmrManagedSlaveSecurityGroup().equals(this.getEmrManagedSlaveSecurityGroup()) == false) return false; if (other.getServiceAccessSecurityGroup() == null ^ this.getServiceAccessSecurityGroup() == null) return false; if (other.getServiceAccessSecurityGroup() != null && other.getServiceAccessSecurityGroup().equals(this.getServiceAccessSecurityGroup()) == false) return false; if (other.getAdditionalMasterSecurityGroups() == null ^ this.getAdditionalMasterSecurityGroups() == null) return false; if (other.getAdditionalMasterSecurityGroups() != null && other.getAdditionalMasterSecurityGroups().equals(this.getAdditionalMasterSecurityGroups()) == false) return false; if (other.getAdditionalSlaveSecurityGroups() == null ^ this.getAdditionalSlaveSecurityGroups() == null) return false; if (other.getAdditionalSlaveSecurityGroups() != null && other.getAdditionalSlaveSecurityGroups().equals(this.getAdditionalSlaveSecurityGroups()) == false) return false; return true; } @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 + ((getInstanceFleets() == null) ? 0 : getInstanceFleets().hashCode()); hashCode = prime * hashCode + ((getEc2KeyName() == null) ? 0 : getEc2KeyName().hashCode()); hashCode = prime * hashCode + ((getPlacement() == null) ? 0 : getPlacement().hashCode()); hashCode = prime * hashCode + ((getKeepJobFlowAliveWhenNoSteps() == null) ? 0 : getKeepJobFlowAliveWhenNoSteps().hashCode()); hashCode = prime * hashCode + ((getTerminationProtected() == null) ? 0 : getTerminationProtected().hashCode()); hashCode = prime * hashCode + ((getHadoopVersion() == null) ? 0 : getHadoopVersion().hashCode()); hashCode = prime * hashCode + ((getEc2SubnetId() == null) ? 0 : getEc2SubnetId().hashCode()); hashCode = prime * hashCode + ((getEc2SubnetIds() == null) ? 0 : getEc2SubnetIds().hashCode()); hashCode = prime * hashCode + ((getEmrManagedMasterSecurityGroup() == null) ? 0 : getEmrManagedMasterSecurityGroup().hashCode()); hashCode = prime * hashCode + ((getEmrManagedSlaveSecurityGroup() == null) ? 0 : getEmrManagedSlaveSecurityGroup().hashCode()); hashCode = prime * hashCode + ((getServiceAccessSecurityGroup() == null) ? 0 : getServiceAccessSecurityGroup().hashCode()); hashCode = prime * hashCode + ((getAdditionalMasterSecurityGroups() == null) ? 0 : getAdditionalMasterSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getAdditionalSlaveSecurityGroups() == null) ? 0 : getAdditionalSlaveSecurityGroups().hashCode()); return hashCode; } @Override public JobFlowInstancesConfig clone() { try { return (JobFlowInstancesConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.elasticmapreduce.model.transform.JobFlowInstancesConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy