Class JobFlowInstancesConfig
- All Implemented Interfaces:
Serializable
,Cloneable
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).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
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.The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."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.The identifier of the Amazon EC2 security group for the master node.The identifier of the Amazon EC2 security group for the slave nodes.The Hadoop version for the job flow.The number of Amazon EC2 instances used to execute the job flow.Configuration for the job flow's instance groups.Specifies whether the job flow should be kept alive after completing all steps.The EC2 instance type of the master node.The Availability Zone the job flow will run in.The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.The EC2 instance type of the slave nodes.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.int
hashCode()
Specifies whether the job flow should be kept alive after completing all steps.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.void
setAdditionalMasterSecurityGroups
(Collection<String> additionalMasterSecurityGroups) A list of additional Amazon EC2 security group IDs for the master node.void
setAdditionalSlaveSecurityGroups
(Collection<String> additionalSlaveSecurityGroups) A list of additional Amazon EC2 security group IDs for the slave nodes.void
setEc2KeyName
(String ec2KeyName) The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."void
setEc2SubnetId
(String 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.void
setEmrManagedMasterSecurityGroup
(String emrManagedMasterSecurityGroup) The identifier of the Amazon EC2 security group for the master node.void
setEmrManagedSlaveSecurityGroup
(String emrManagedSlaveSecurityGroup) The identifier of the Amazon EC2 security group for the slave nodes.void
setHadoopVersion
(String hadoopVersion) The Hadoop version for the job flow.void
setInstanceCount
(Integer instanceCount) The number of Amazon EC2 instances used to execute the job flow.void
setInstanceGroups
(Collection<InstanceGroupConfig> instanceGroups) Configuration for the job flow's instance groups.void
setKeepJobFlowAliveWhenNoSteps
(Boolean keepJobFlowAliveWhenNoSteps) Specifies whether the job flow should be kept alive after completing all steps.void
setMasterInstanceType
(String masterInstanceType) The EC2 instance type of the master node.void
setPlacement
(PlacementType placement) The Availability Zone the job flow will run in.void
setServiceAccessSecurityGroup
(String serviceAccessSecurityGroup) The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.void
setSlaveInstanceType
(String slaveInstanceType) The EC2 instance type of the slave nodes.void
setTerminationProtected
(Boolean 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.toString()
Returns a string representation of this object; useful for testing and debugging.withAdditionalMasterSecurityGroups
(String... additionalMasterSecurityGroups) A list of additional Amazon EC2 security group IDs for the master node.withAdditionalMasterSecurityGroups
(Collection<String> additionalMasterSecurityGroups) A list of additional Amazon EC2 security group IDs for the master node.withAdditionalSlaveSecurityGroups
(String... additionalSlaveSecurityGroups) A list of additional Amazon EC2 security group IDs for the slave nodes.withAdditionalSlaveSecurityGroups
(Collection<String> additionalSlaveSecurityGroups) A list of additional Amazon EC2 security group IDs for the slave nodes.withEc2KeyName
(String ec2KeyName) The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."withEc2SubnetId
(String 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.withEmrManagedMasterSecurityGroup
(String emrManagedMasterSecurityGroup) The identifier of the Amazon EC2 security group for the master node.withEmrManagedSlaveSecurityGroup
(String emrManagedSlaveSecurityGroup) The identifier of the Amazon EC2 security group for the slave nodes.withHadoopVersion
(String hadoopVersion) The Hadoop version for the job flow.withInstanceCount
(Integer instanceCount) The number of Amazon EC2 instances used to execute the job flow.withInstanceGroups
(InstanceGroupConfig... instanceGroups) Configuration for the job flow's instance groups.withInstanceGroups
(Collection<InstanceGroupConfig> instanceGroups) Configuration for the job flow's instance groups.withKeepJobFlowAliveWhenNoSteps
(Boolean keepJobFlowAliveWhenNoSteps) Specifies whether the job flow should be kept alive after completing all steps.withMasterInstanceType
(String masterInstanceType) The EC2 instance type of the master node.withPlacement
(PlacementType placement) The Availability Zone the job flow will run in.withServiceAccessSecurityGroup
(String serviceAccessSecurityGroup) The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.withSlaveInstanceType
(String slaveInstanceType) The EC2 instance type of the slave nodes.withTerminationProtected
(Boolean 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.
-
Constructor Details
-
JobFlowInstancesConfig
public JobFlowInstancesConfig()
-
-
Method Details
-
setMasterInstanceType
The EC2 instance type of the master node.
- Parameters:
masterInstanceType
- The EC2 instance type of the master node.
-
getMasterInstanceType
The EC2 instance type of the master node.
- Returns:
- The EC2 instance type of the master node.
-
withMasterInstanceType
The EC2 instance type of the master node.
- Parameters:
masterInstanceType
- The EC2 instance type of the master node.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSlaveInstanceType
The EC2 instance type of the slave nodes.
- Parameters:
slaveInstanceType
- The EC2 instance type of the slave nodes.
-
getSlaveInstanceType
The EC2 instance type of the slave nodes.
- Returns:
- The EC2 instance type of the slave nodes.
-
withSlaveInstanceType
The EC2 instance type of the slave nodes.
- Parameters:
slaveInstanceType
- The EC2 instance type of the slave nodes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceCount
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.
-
getInstanceCount
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.
-
withInstanceCount
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getInstanceGroups
Configuration for the job flow's instance groups.
- Returns:
- Configuration for the job flow's instance groups.
-
setInstanceGroups
Configuration for the job flow's instance groups.
- Parameters:
instanceGroups
- Configuration for the job flow's instance groups.
-
withInstanceGroups
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)
orwithInstanceGroups(java.util.Collection)
if you want to override the existing values.- Parameters:
instanceGroups
- Configuration for the job flow's instance groups.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withInstanceGroups
Configuration for the job flow's instance groups.
- Parameters:
instanceGroups
- Configuration for the job flow's instance groups.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEc2KeyName
The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."
- 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."
-
getEc2KeyName
The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."
- Returns:
- The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."
-
withEc2KeyName
The name of the Amazon EC2 key pair that can be used to ssh to the master node as the user called "hadoop."
- 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:
- Returns a reference to this object so that method calls can be chained together.
-
setPlacement
The Availability Zone the job flow will run in.
- Parameters:
placement
- The Availability Zone the job flow will run in.
-
getPlacement
The Availability Zone the job flow will run in.
- Returns:
- The Availability Zone the job flow will run in.
-
withPlacement
The Availability Zone the job flow will run in.
- Parameters:
placement
- The Availability Zone the job flow will run in.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKeepJobFlowAliveWhenNoSteps
Specifies whether the job flow should be kept alive after completing all steps.
- Parameters:
keepJobFlowAliveWhenNoSteps
- Specifies whether the job flow should be kept alive after completing all steps.
-
getKeepJobFlowAliveWhenNoSteps
Specifies whether the job flow should be kept alive after completing all steps.
- Returns:
- Specifies whether the job flow should be kept alive after completing all steps.
-
withKeepJobFlowAliveWhenNoSteps
Specifies whether the job flow should be kept alive after completing all steps.
- Parameters:
keepJobFlowAliveWhenNoSteps
- Specifies whether the job flow should be kept alive after completing all steps.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isKeepJobFlowAliveWhenNoSteps
Specifies whether the job flow should be kept alive after completing all steps.
- Returns:
- Specifies whether the job flow should be kept alive after completing all steps.
-
setTerminationProtected
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.
-
getTerminationProtected
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.
-
withTerminationProtected
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isTerminationProtected
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.
-
setHadoopVersion
The Hadoop version for the job flow. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), "0.20.205" (deprecated), "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.
- Parameters:
hadoopVersion
- The Hadoop version for the job flow. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), "0.20.205" (deprecated), "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.
-
getHadoopVersion
The Hadoop version for the job flow. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), "0.20.205" (deprecated), "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:
- The Hadoop version for the job flow. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), "0.20.205" (deprecated), "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.
-
withHadoopVersion
The Hadoop version for the job flow. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), "0.20.205" (deprecated), "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.
- Parameters:
hadoopVersion
- The Hadoop version for the job flow. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), "0.20.205" (deprecated), "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:
- Returns a reference to this object so that method calls can be chained together.
-
setEc2SubnetId
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.
- 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.
-
getEc2SubnetId
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:
- 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.
-
withEc2SubnetId
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.
- 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:
- Returns a reference to this object so that method calls can be chained together.
-
setEmrManagedMasterSecurityGroup
The identifier of the Amazon EC2 security group for the master node.
- Parameters:
emrManagedMasterSecurityGroup
- The identifier of the Amazon EC2 security group for the master node.
-
getEmrManagedMasterSecurityGroup
The identifier of the Amazon EC2 security group for the master node.
- Returns:
- The identifier of the Amazon EC2 security group for the master node.
-
withEmrManagedMasterSecurityGroup
public JobFlowInstancesConfig withEmrManagedMasterSecurityGroup(String emrManagedMasterSecurityGroup) The identifier of the Amazon EC2 security group for the master node.
- Parameters:
emrManagedMasterSecurityGroup
- The identifier of the Amazon EC2 security group for the master node.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEmrManagedSlaveSecurityGroup
The identifier of the Amazon EC2 security group for the slave nodes.
- Parameters:
emrManagedSlaveSecurityGroup
- The identifier of the Amazon EC2 security group for the slave nodes.
-
getEmrManagedSlaveSecurityGroup
The identifier of the Amazon EC2 security group for the slave nodes.
- Returns:
- The identifier of the Amazon EC2 security group for the slave nodes.
-
withEmrManagedSlaveSecurityGroup
The identifier of the Amazon EC2 security group for the slave nodes.
- Parameters:
emrManagedSlaveSecurityGroup
- The identifier of the Amazon EC2 security group for the slave nodes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setServiceAccessSecurityGroup
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
- Parameters:
serviceAccessSecurityGroup
- The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
-
getServiceAccessSecurityGroup
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
- Returns:
- The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
-
withServiceAccessSecurityGroup
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
- Parameters:
serviceAccessSecurityGroup
- The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getAdditionalMasterSecurityGroups
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.
-
setAdditionalMasterSecurityGroups
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.
-
withAdditionalMasterSecurityGroups
public JobFlowInstancesConfig withAdditionalMasterSecurityGroups(String... 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
setAdditionalMasterSecurityGroups(java.util.Collection)
orwithAdditionalMasterSecurityGroups(java.util.Collection)
if you want to override the existing values.- Parameters:
additionalMasterSecurityGroups
- A list of additional Amazon EC2 security group IDs for the master node.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withAdditionalMasterSecurityGroups
public JobFlowInstancesConfig withAdditionalMasterSecurityGroups(Collection<String> additionalMasterSecurityGroups) 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getAdditionalSlaveSecurityGroups
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.
-
setAdditionalSlaveSecurityGroups
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.
-
withAdditionalSlaveSecurityGroups
public JobFlowInstancesConfig withAdditionalSlaveSecurityGroups(String... additionalSlaveSecurityGroups) 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)
orwithAdditionalSlaveSecurityGroups(java.util.Collection)
if you want to override the existing values.- Parameters:
additionalSlaveSecurityGroups
- A list of additional Amazon EC2 security group IDs for the slave nodes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withAdditionalSlaveSecurityGroups
public JobFlowInstancesConfig withAdditionalSlaveSecurityGroups(Collection<String> additionalSlaveSecurityGroups) 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-