/* * Copyright 2018-2023 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; /** *
* This entity represents an instance group, which is a group of instances that have common purpose. For example, CORE * instance group is used for HDFS. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InstanceGroup implements Serializable, Cloneable, StructuredPojo { /** ** The identifier of the instance group. *
*/ private String id; /** ** The name of the instance group. *
*/ private String name; /** ** The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. *
*/ private String market; /** ** The type of the instance group. Valid values are MASTER, CORE or TASK. *
*/ private String instanceGroupType; /** *
* If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to
* pay for Spot Instances. Specify OnDemandPrice
to set the amount equal to the On-Demand price, or
* specify an amount in USD.
*
* The Amazon EC2 instance type for all instances in the instance group. *
*/ private String instanceType; /** ** The target number of instances for the instance group. *
*/ private Integer requestedInstanceCount; /** ** The number of instances currently running in this instance group. *
*/ private Integer runningInstanceCount; /** ** The current status of the instance group. *
*/ private InstanceGroupStatus status; /** ** Amazon EMR releases 4.x or later. *
** The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate * configuration for each instance group (master, core, and task). *
*/ private com.amazonaws.internal.SdkInternalList* The version number of the requested configuration specification for this instance group. *
*/ private Long configurationsVersion; /** ** A list of configurations that were successfully applied for an instance group last time. *
*/ private com.amazonaws.internal.SdkInternalList* The version number of a configuration specification that was successfully applied for an instance group last * time. *
*/ private Long lastSuccessfullyAppliedConfigurationsVersion; /** ** The EBS block devices that are mapped to this instance group. *
*/ private com.amazonaws.internal.SdkInternalList* If the instance group is EBS-optimized. An Amazon EBS-optimized instance uses an optimized configuration stack * and provides additional, dedicated capacity for Amazon EBS I/O. *
*/ private Boolean ebsOptimized; /** ** Policy for customizing shrink operations. *
*/ private ShrinkPolicy shrinkPolicy; /** ** An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The * automatic scaling policy defines how an instance group dynamically adds and terminates Amazon EC2 instances in * response to the value of a CloudWatch metric. See PutAutoScalingPolicy. *
*/ private AutoScalingPolicyDescription autoScalingPolicy; /** ** The custom AMI ID to use for the provisioned instance group. *
*/ private String customAmiId; /** ** The identifier of the instance group. *
* * @param id * The identifier of the instance group. */ public void setId(String id) { this.id = id; } /** ** The identifier of the instance group. *
* * @return The identifier of the instance group. */ public String getId() { return this.id; } /** ** The identifier of the instance group. *
* * @param id * The identifier of the instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroup withId(String id) { setId(id); return this; } /** ** The name of the instance group. *
* * @param name * The name of the instance group. */ public void setName(String name) { this.name = name; } /** ** The name of the instance group. *
* * @return The name of the instance group. */ public String getName() { return this.name; } /** ** The name of the instance group. *
* * @param name * The name of the instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroup withName(String name) { setName(name); return this; } /** ** The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. *
* * @param market * The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. * @see MarketType */ public void setMarket(String market) { this.market = market; } /** ** The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. *
* * @return The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. * @see MarketType */ public String getMarket() { return this.market; } /** ** The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. *
* * @param market * The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. * @return Returns a reference to this object so that method calls can be chained together. * @see MarketType */ public InstanceGroup withMarket(String market) { setMarket(market); return this; } /** ** The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. *
* * @param market * The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. * @see MarketType */ public void setMarket(MarketType market) { withMarket(market); } /** ** The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. *
* * @param market * The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT. * @return Returns a reference to this object so that method calls can be chained together. * @see MarketType */ public InstanceGroup withMarket(MarketType market) { this.market = market.toString(); return this; } /** ** The type of the instance group. Valid values are MASTER, CORE or TASK. *
* * @param instanceGroupType * The type of the instance group. Valid values are MASTER, CORE or TASK. * @see InstanceGroupType */ public void setInstanceGroupType(String instanceGroupType) { this.instanceGroupType = instanceGroupType; } /** ** The type of the instance group. Valid values are MASTER, CORE or TASK. *
* * @return The type of the instance group. Valid values are MASTER, CORE or TASK. * @see InstanceGroupType */ public String getInstanceGroupType() { return this.instanceGroupType; } /** ** The type of the instance group. Valid values are MASTER, CORE or TASK. *
* * @param instanceGroupType * The type of the instance group. Valid values are MASTER, CORE or TASK. * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceGroupType */ public InstanceGroup withInstanceGroupType(String instanceGroupType) { setInstanceGroupType(instanceGroupType); return this; } /** ** The type of the instance group. Valid values are MASTER, CORE or TASK. *
* * @param instanceGroupType * The type of the instance group. Valid values are MASTER, CORE or TASK. * @see InstanceGroupType */ public void setInstanceGroupType(InstanceGroupType instanceGroupType) { withInstanceGroupType(instanceGroupType); } /** ** The type of the instance group. Valid values are MASTER, CORE or TASK. *
* * @param instanceGroupType * The type of the instance group. Valid values are MASTER, CORE or TASK. * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceGroupType */ public InstanceGroup withInstanceGroupType(InstanceGroupType instanceGroupType) { this.instanceGroupType = instanceGroupType.toString(); return this; } /** *
* If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to
* pay for Spot Instances. Specify OnDemandPrice
to set the amount equal to the On-Demand price, or
* specify an amount in USD.
*
OnDemandPrice
to set the amount equal to the
* On-Demand price, or specify an amount in USD.
*/
public void setBidPrice(String bidPrice) {
this.bidPrice = bidPrice;
}
/**
*
* If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to
* pay for Spot Instances. Specify OnDemandPrice
to set the amount equal to the On-Demand price, or
* specify an amount in USD.
*
OnDemandPrice
to set the amount equal to the
* On-Demand price, or specify an amount in USD.
*/
public String getBidPrice() {
return this.bidPrice;
}
/**
*
* If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to
* pay for Spot Instances. Specify OnDemandPrice
to set the amount equal to the On-Demand price, or
* specify an amount in USD.
*
OnDemandPrice
to set the amount equal to the
* On-Demand price, or specify an amount in USD.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceGroup withBidPrice(String bidPrice) {
setBidPrice(bidPrice);
return this;
}
/**
* * The Amazon EC2 instance type for all instances in the instance group. *
* * @param instanceType * The Amazon EC2 instance type for all instances in the instance group. */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** ** The Amazon EC2 instance type for all instances in the instance group. *
* * @return The Amazon EC2 instance type for all instances in the instance group. */ public String getInstanceType() { return this.instanceType; } /** ** The Amazon EC2 instance type for all instances in the instance group. *
* * @param instanceType * The Amazon EC2 instance type for all instances in the instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroup withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** ** The target number of instances for the instance group. *
* * @param requestedInstanceCount * The target number of instances for the instance group. */ public void setRequestedInstanceCount(Integer requestedInstanceCount) { this.requestedInstanceCount = requestedInstanceCount; } /** ** The target number of instances for the instance group. *
* * @return The target number of instances for the instance group. */ public Integer getRequestedInstanceCount() { return this.requestedInstanceCount; } /** ** The target number of instances for the instance group. *
* * @param requestedInstanceCount * The target number of instances for the instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroup withRequestedInstanceCount(Integer requestedInstanceCount) { setRequestedInstanceCount(requestedInstanceCount); return this; } /** ** The number of instances currently running in this instance group. *
* * @param runningInstanceCount * The number of instances currently running in this instance group. */ public void setRunningInstanceCount(Integer runningInstanceCount) { this.runningInstanceCount = runningInstanceCount; } /** ** The number of instances currently running in this instance group. *
* * @return The number of instances currently running in this instance group. */ public Integer getRunningInstanceCount() { return this.runningInstanceCount; } /** ** The number of instances currently running in this instance group. *
* * @param runningInstanceCount * The number of instances currently running in this instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroup withRunningInstanceCount(Integer runningInstanceCount) { setRunningInstanceCount(runningInstanceCount); return this; } /** ** The current status of the instance group. *
* * @param status * The current status of the instance group. */ public void setStatus(InstanceGroupStatus status) { this.status = status; } /** ** The current status of the instance group. *
* * @return The current status of the instance group. */ public InstanceGroupStatus getStatus() { return this.status; } /** ** The current status of the instance group. *
* * @param status * The current status of the instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroup withStatus(InstanceGroupStatus status) { setStatus(status); return this; } /** ** Amazon EMR releases 4.x or later. *
** The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate * configuration for each instance group (master, core, and task). *
* * @return* Amazon EMR releases 4.x or later. *
* *
* The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate
* configuration for each instance group (master, core, and task).
*/
public java.util.List
* Amazon EMR releases 4.x or later.
*
* The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate
* configuration for each instance group (master, core, and task).
*
* Amazon EMR releases 4.x or later.
*
* The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate
* configuration for each instance group (master, core, and task).
*/
public void setConfigurations(java.util.Collection
* Amazon EMR releases 4.x or later.
*
* The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate
* configuration for each instance group (master, core, and task).
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setConfigurations(java.util.Collection)} or {@link #withConfigurations(java.util.Collection)} if you want
* to override the existing values.
*
* Amazon EMR releases 4.x or later.
*
* The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate
* configuration for each instance group (master, core, and task).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceGroup withConfigurations(Configuration... configurations) {
if (this.configurations == null) {
setConfigurations(new com.amazonaws.internal.SdkInternalList
* Amazon EMR releases 4.x or later.
*
* The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate
* configuration for each instance group (master, core, and task).
*
* Amazon EMR releases 4.x or later.
*
* The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate
* configuration for each instance group (master, core, and task).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceGroup withConfigurations(java.util.Collection
* The version number of the requested configuration specification for this instance group.
*
* The version number of the requested configuration specification for this instance group.
*
* The version number of the requested configuration specification for this instance group.
*
* A list of configurations that were successfully applied for an instance group last time.
*
* A list of configurations that were successfully applied for an instance group last time.
*
* A list of configurations that were successfully applied for an instance group last time.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLastSuccessfullyAppliedConfigurations(java.util.Collection)} or
* {@link #withLastSuccessfullyAppliedConfigurations(java.util.Collection)} if you want to override the existing
* values.
*
* A list of configurations that were successfully applied for an instance group last time.
*
* The version number of a configuration specification that was successfully applied for an instance group last
* time.
*
* The version number of a configuration specification that was successfully applied for an instance group last
* time.
*
* The version number of a configuration specification that was successfully applied for an instance group last
* time.
*
* The EBS block devices that are mapped to this instance group.
*
* The EBS block devices that are mapped to this instance group.
*
* The EBS block devices that are mapped to this instance group.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEbsBlockDevices(java.util.Collection)} or {@link #withEbsBlockDevices(java.util.Collection)} if you
* want to override the existing values.
*
* The EBS block devices that are mapped to this instance group.
*
* If the instance group is EBS-optimized. An Amazon EBS-optimized instance uses an optimized configuration stack
* and provides additional, dedicated capacity for Amazon EBS I/O.
*
* If the instance group is EBS-optimized. An Amazon EBS-optimized instance uses an optimized configuration stack
* and provides additional, dedicated capacity for Amazon EBS I/O.
*
* If the instance group is EBS-optimized. An Amazon EBS-optimized instance uses an optimized configuration stack
* and provides additional, dedicated capacity for Amazon EBS I/O.
*
* If the instance group is EBS-optimized. An Amazon EBS-optimized instance uses an optimized configuration stack
* and provides additional, dedicated capacity for Amazon EBS I/O.
*
* Policy for customizing shrink operations.
*
* Policy for customizing shrink operations.
*
* Policy for customizing shrink operations.
*
* An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The
* automatic scaling policy defines how an instance group dynamically adds and terminates Amazon EC2 instances in
* response to the value of a CloudWatch metric. See PutAutoScalingPolicy.
*
* An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The
* automatic scaling policy defines how an instance group dynamically adds and terminates Amazon EC2 instances in
* response to the value of a CloudWatch metric. See PutAutoScalingPolicy.
*
* An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The
* automatic scaling policy defines how an instance group dynamically adds and terminates Amazon EC2 instances in
* response to the value of a CloudWatch metric. See PutAutoScalingPolicy.
*
* The custom AMI ID to use for the provisioned instance group.
*
* The custom AMI ID to use for the provisioned instance group.
*
* The custom AMI ID to use for the provisioned instance group.
*