/* * 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; /** *
* A description of a cluster (job flow). *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class JobFlowDetail implements Serializable, Cloneable, StructuredPojo { /** ** The job flow identifier. *
*/ private String jobFlowId; /** ** The name of the job flow. *
*/ private String name; /** ** The location in Amazon S3 where log files for the job are stored. *
*/ private String logUri; /** ** The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and later, * excluding 6.0.0. *
*/ private String logEncryptionKmsKeyId; /** *
* Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later,
* ReleaseLabel
is used. To specify a custom AMI, use CustomAmiID
.
*
* Describes the execution status of the job flow. *
*/ private JobFlowExecutionStatusDetail executionStatusDetail; /** ** Describes the Amazon EC2 instances of the job flow. *
*/ private JobFlowInstancesDetail instances; /** ** A list of steps run by the job flow. *
*/ private com.amazonaws.internal.SdkInternalList* A list of the bootstrap actions run by the job flow. *
*/ private com.amazonaws.internal.SdkInternalList* A list of strings set by third-party software when the job flow is launched. If you are not using third-party * software to manage the job flow, this value is empty. *
*/ private com.amazonaws.internal.SdkInternalList
* Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the
* cluster. When true
, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster
* actions that their IAM policies allow. When false
, only the IAM principal that created the cluster
* and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions
* policies attached to other IAM principals.
*
* The default value is true
if a value is not provided when creating a cluster using the Amazon EMR
* API RunJobFlow command, the CLI create-cluster command, or
* the Amazon Web Services Management Console.
*
* The IAM role that was specified when the job flow was launched. The Amazon EC2 instances of the job flow assume * this role. *
*/ private String jobFlowRole; /** ** The IAM role that is assumed by the Amazon EMR service to access Amazon Web Services resources on your behalf. *
*/ private String serviceRole; /** *
* An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole
. The IAM
* role provides a way for the automatic scaling feature to get the required permissions it needs to launch and
* terminate Amazon EC2 instances in an instance group.
*
* The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance
* group is resized. TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates nodes at the
* instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is
* only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version.
* TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes to a deny list and drains tasks
* from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either
* behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to
* HDFS corruption. TERMINATE_AT_TASK_COMPLETION
available only in Amazon EMR releases 4.1.0 and later,
* and is the default for releases of Amazon EMR earlier than 5.1.0.
*
* The job flow identifier. *
* * @param jobFlowId * The job flow identifier. */ public void setJobFlowId(String jobFlowId) { this.jobFlowId = jobFlowId; } /** ** The job flow identifier. *
* * @return The job flow identifier. */ public String getJobFlowId() { return this.jobFlowId; } /** ** The job flow identifier. *
* * @param jobFlowId * The job flow identifier. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withJobFlowId(String jobFlowId) { setJobFlowId(jobFlowId); return this; } /** ** The name of the job flow. *
* * @param name * The name of the job flow. */ public void setName(String name) { this.name = name; } /** ** The name of the job flow. *
* * @return The name of the job flow. */ public String getName() { return this.name; } /** ** The name of the job flow. *
* * @param name * The name of the job flow. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withName(String name) { setName(name); return this; } /** ** The location in Amazon S3 where log files for the job are stored. *
* * @param logUri * The location in Amazon S3 where log files for the job are stored. */ public void setLogUri(String logUri) { this.logUri = logUri; } /** ** The location in Amazon S3 where log files for the job are stored. *
* * @return The location in Amazon S3 where log files for the job are stored. */ public String getLogUri() { return this.logUri; } /** ** The location in Amazon S3 where log files for the job are stored. *
* * @param logUri * The location in Amazon S3 where log files for the job are stored. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withLogUri(String logUri) { setLogUri(logUri); return this; } /** ** The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and later, * excluding 6.0.0. *
* * @param logEncryptionKmsKeyId * The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and * later, excluding 6.0.0. */ public void setLogEncryptionKmsKeyId(String logEncryptionKmsKeyId) { this.logEncryptionKmsKeyId = logEncryptionKmsKeyId; } /** ** The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and later, * excluding 6.0.0. *
* * @return The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and * later, excluding 6.0.0. */ public String getLogEncryptionKmsKeyId() { return this.logEncryptionKmsKeyId; } /** ** The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and later, * excluding 6.0.0. *
* * @param logEncryptionKmsKeyId * The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and * later, excluding 6.0.0. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withLogEncryptionKmsKeyId(String logEncryptionKmsKeyId) { setLogEncryptionKmsKeyId(logEncryptionKmsKeyId); return this; } /** *
* Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later,
* ReleaseLabel
is used. To specify a custom AMI, use CustomAmiID
.
*
ReleaseLabel
is used. To specify a custom AMI, use CustomAmiID
.
*/
public void setAmiVersion(String amiVersion) {
this.amiVersion = amiVersion;
}
/**
*
* Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later,
* ReleaseLabel
is used. To specify a custom AMI, use CustomAmiID
.
*
ReleaseLabel
is used. To specify a custom AMI, use CustomAmiID
.
*/
public String getAmiVersion() {
return this.amiVersion;
}
/**
*
* Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later,
* ReleaseLabel
is used. To specify a custom AMI, use CustomAmiID
.
*
ReleaseLabel
is used. To specify a custom AMI, use CustomAmiID
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public JobFlowDetail withAmiVersion(String amiVersion) {
setAmiVersion(amiVersion);
return this;
}
/**
* * Describes the execution status of the job flow. *
* * @param executionStatusDetail * Describes the execution status of the job flow. */ public void setExecutionStatusDetail(JobFlowExecutionStatusDetail executionStatusDetail) { this.executionStatusDetail = executionStatusDetail; } /** ** Describes the execution status of the job flow. *
* * @return Describes the execution status of the job flow. */ public JobFlowExecutionStatusDetail getExecutionStatusDetail() { return this.executionStatusDetail; } /** ** Describes the execution status of the job flow. *
* * @param executionStatusDetail * Describes the execution status of the job flow. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withExecutionStatusDetail(JobFlowExecutionStatusDetail executionStatusDetail) { setExecutionStatusDetail(executionStatusDetail); return this; } /** ** Describes the Amazon EC2 instances of the job flow. *
* * @param instances * Describes the Amazon EC2 instances of the job flow. */ public void setInstances(JobFlowInstancesDetail instances) { this.instances = instances; } /** ** Describes the Amazon EC2 instances of the job flow. *
* * @return Describes the Amazon EC2 instances of the job flow. */ public JobFlowInstancesDetail getInstances() { return this.instances; } /** ** Describes the Amazon EC2 instances of the job flow. *
* * @param instances * Describes the Amazon EC2 instances of the job flow. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withInstances(JobFlowInstancesDetail instances) { setInstances(instances); return this; } /** ** A list of steps run by the job flow. *
* * @return A list of steps run by the job flow. */ public java.util.List* A list of steps run by the job flow. *
* * @param steps * A list of steps run by the job flow. */ public void setSteps(java.util.Collection* A list of steps run by the job flow. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSteps(java.util.Collection)} or {@link #withSteps(java.util.Collection)} if you want to override the * existing values. *
* * @param steps * A list of steps run by the job flow. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withSteps(StepDetail... steps) { if (this.steps == null) { setSteps(new com.amazonaws.internal.SdkInternalList* A list of steps run by the job flow. *
* * @param steps * A list of steps run by the job flow. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withSteps(java.util.Collection* A list of the bootstrap actions run by the job flow. *
* * @return A list of the bootstrap actions run by the job flow. */ public java.util.List* A list of the bootstrap actions run by the job flow. *
* * @param bootstrapActions * A list of the bootstrap actions run by the job flow. */ public void setBootstrapActions(java.util.Collection* A list of the bootstrap actions run by the job flow. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setBootstrapActions(java.util.Collection)} or {@link #withBootstrapActions(java.util.Collection)} if you * want to override the existing values. *
* * @param bootstrapActions * A list of the bootstrap actions run by the job flow. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withBootstrapActions(BootstrapActionDetail... bootstrapActions) { if (this.bootstrapActions == null) { setBootstrapActions(new com.amazonaws.internal.SdkInternalList* A list of the bootstrap actions run by the job flow. *
* * @param bootstrapActions * A list of the bootstrap actions run by the job flow. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withBootstrapActions(java.util.Collection* A list of strings set by third-party software when the job flow is launched. If you are not using third-party * software to manage the job flow, this value is empty. *
* * @return A list of strings set by third-party software when the job flow is launched. If you are not using * third-party software to manage the job flow, this value is empty. */ public java.util.List* A list of strings set by third-party software when the job flow is launched. If you are not using third-party * software to manage the job flow, this value is empty. *
* * @param supportedProducts * A list of strings set by third-party software when the job flow is launched. If you are not using * third-party software to manage the job flow, this value is empty. */ public void setSupportedProducts(java.util.Collection* A list of strings set by third-party software when the job flow is launched. If you are not using third-party * software to manage the job flow, this value is empty. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSupportedProducts(java.util.Collection)} or {@link #withSupportedProducts(java.util.Collection)} if * you want to override the existing values. *
* * @param supportedProducts * A list of strings set by third-party software when the job flow is launched. If you are not using * third-party software to manage the job flow, this value is empty. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withSupportedProducts(String... supportedProducts) { if (this.supportedProducts == null) { setSupportedProducts(new com.amazonaws.internal.SdkInternalList* A list of strings set by third-party software when the job flow is launched. If you are not using third-party * software to manage the job flow, this value is empty. *
* * @param supportedProducts * A list of strings set by third-party software when the job flow is launched. If you are not using * third-party software to manage the job flow, this value is empty. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withSupportedProducts(java.util.Collection
* Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the
* cluster. When true
, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster
* actions that their IAM policies allow. When false
, only the IAM principal that created the cluster
* and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions
* policies attached to other IAM principals.
*
* The default value is true
if a value is not provided when creating a cluster using the Amazon EMR
* API RunJobFlow command, the CLI create-cluster command, or
* the Amazon Web Services Management Console.
*
true
, IAM principals in the Amazon Web Services account can perform
* Amazon EMR cluster actions that their IAM policies allow. When false
, only the IAM principal
* that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions,
* regardless of IAM permissions policies attached to other IAM principals.
*
* The default value is true
if a value is not provided when creating a cluster using the Amazon
* EMR API RunJobFlow command, the CLI create-cluster
* command, or the Amazon Web Services Management Console.
*/
public void setVisibleToAllUsers(Boolean visibleToAllUsers) {
this.visibleToAllUsers = visibleToAllUsers;
}
/**
*
* Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the
* cluster. When true
, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster
* actions that their IAM policies allow. When false
, only the IAM principal that created the cluster
* and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions
* policies attached to other IAM principals.
*
* The default value is true
if a value is not provided when creating a cluster using the Amazon EMR
* API RunJobFlow command, the CLI create-cluster command, or
* the Amazon Web Services Management Console.
*
true
, IAM principals in the Amazon Web Services account can perform
* Amazon EMR cluster actions that their IAM policies allow. When false
, only the IAM principal
* that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions,
* regardless of IAM permissions policies attached to other IAM principals.
*
* The default value is true
if a value is not provided when creating a cluster using the
* Amazon EMR API RunJobFlow command, the CLI create-cluster
* command, or the Amazon Web Services Management Console.
*/
public Boolean getVisibleToAllUsers() {
return this.visibleToAllUsers;
}
/**
*
* Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the
* cluster. When true
, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster
* actions that their IAM policies allow. When false
, only the IAM principal that created the cluster
* and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions
* policies attached to other IAM principals.
*
* The default value is true
if a value is not provided when creating a cluster using the Amazon EMR
* API RunJobFlow command, the CLI create-cluster command, or
* the Amazon Web Services Management Console.
*
true
, IAM principals in the Amazon Web Services account can perform
* Amazon EMR cluster actions that their IAM policies allow. When false
, only the IAM principal
* that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions,
* regardless of IAM permissions policies attached to other IAM principals.
*
* The default value is true
if a value is not provided when creating a cluster using the Amazon
* EMR API RunJobFlow command, the CLI create-cluster
* command, or the Amazon Web Services Management Console.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public JobFlowDetail withVisibleToAllUsers(Boolean visibleToAllUsers) {
setVisibleToAllUsers(visibleToAllUsers);
return this;
}
/**
*
* Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the
* cluster. When true
, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster
* actions that their IAM policies allow. When false
, only the IAM principal that created the cluster
* and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions
* policies attached to other IAM principals.
*
* The default value is true
if a value is not provided when creating a cluster using the Amazon EMR
* API RunJobFlow command, the CLI create-cluster command, or
* the Amazon Web Services Management Console.
*
true
, IAM principals in the Amazon Web Services account can perform
* Amazon EMR cluster actions that their IAM policies allow. When false
, only the IAM principal
* that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions,
* regardless of IAM permissions policies attached to other IAM principals.
*
* The default value is true
if a value is not provided when creating a cluster using the
* Amazon EMR API RunJobFlow command, the CLI create-cluster
* command, or the Amazon Web Services Management Console.
*/
public Boolean isVisibleToAllUsers() {
return this.visibleToAllUsers;
}
/**
*
* The IAM role that was specified when the job flow was launched. The Amazon EC2 instances of the job flow assume * this role. *
* * @param jobFlowRole * The IAM role that was specified when the job flow was launched. The Amazon EC2 instances of the job flow * assume this role. */ public void setJobFlowRole(String jobFlowRole) { this.jobFlowRole = jobFlowRole; } /** ** The IAM role that was specified when the job flow was launched. The Amazon EC2 instances of the job flow assume * this role. *
* * @return The IAM role that was specified when the job flow was launched. The Amazon EC2 instances of the job flow * assume this role. */ public String getJobFlowRole() { return this.jobFlowRole; } /** ** The IAM role that was specified when the job flow was launched. The Amazon EC2 instances of the job flow assume * this role. *
* * @param jobFlowRole * The IAM role that was specified when the job flow was launched. The Amazon EC2 instances of the job flow * assume this role. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withJobFlowRole(String jobFlowRole) { setJobFlowRole(jobFlowRole); return this; } /** ** The IAM role that is assumed by the Amazon EMR service to access Amazon Web Services resources on your behalf. *
* * @param serviceRole * The IAM role that is assumed by the Amazon EMR service to access Amazon Web Services resources on your * behalf. */ public void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } /** ** The IAM role that is assumed by the Amazon EMR service to access Amazon Web Services resources on your behalf. *
* * @return The IAM role that is assumed by the Amazon EMR service to access Amazon Web Services resources on your * behalf. */ public String getServiceRole() { return this.serviceRole; } /** ** The IAM role that is assumed by the Amazon EMR service to access Amazon Web Services resources on your behalf. *
* * @param serviceRole * The IAM role that is assumed by the Amazon EMR service to access Amazon Web Services resources on your * behalf. * @return Returns a reference to this object so that method calls can be chained together. */ public JobFlowDetail withServiceRole(String serviceRole) { setServiceRole(serviceRole); return this; } /** *
* An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole
. The IAM
* role provides a way for the automatic scaling feature to get the required permissions it needs to launch and
* terminate Amazon EC2 instances in an instance group.
*
EMR_AutoScaling_DefaultRole
.
* The IAM role provides a way for the automatic scaling feature to get the required permissions it needs to
* launch and terminate Amazon EC2 instances in an instance group.
*/
public void setAutoScalingRole(String autoScalingRole) {
this.autoScalingRole = autoScalingRole;
}
/**
*
* An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole
. The IAM
* role provides a way for the automatic scaling feature to get the required permissions it needs to launch and
* terminate Amazon EC2 instances in an instance group.
*
EMR_AutoScaling_DefaultRole
.
* The IAM role provides a way for the automatic scaling feature to get the required permissions it needs to
* launch and terminate Amazon EC2 instances in an instance group.
*/
public String getAutoScalingRole() {
return this.autoScalingRole;
}
/**
*
* An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole
. The IAM
* role provides a way for the automatic scaling feature to get the required permissions it needs to launch and
* terminate Amazon EC2 instances in an instance group.
*
EMR_AutoScaling_DefaultRole
.
* The IAM role provides a way for the automatic scaling feature to get the required permissions it needs to
* launch and terminate Amazon EC2 instances in an instance group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public JobFlowDetail withAutoScalingRole(String autoScalingRole) {
setAutoScalingRole(autoScalingRole);
return this;
}
/**
*
* The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance
* group is resized. TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates nodes at the
* instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is
* only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version.
* TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes to a deny list and drains tasks
* from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either
* behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to
* HDFS corruption. TERMINATE_AT_TASK_COMPLETION
available only in Amazon EMR releases 4.1.0 and later,
* and is the default for releases of Amazon EMR earlier than 5.1.0.
*
TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates
* nodes at the instance-hour boundary, regardless of when the request to terminate the instance was
* submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters
* created using that version. TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes
* to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the
* instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks
* instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION
* available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR
* earlier than 5.1.0.
* @see ScaleDownBehavior
*/
public void setScaleDownBehavior(String scaleDownBehavior) {
this.scaleDownBehavior = scaleDownBehavior;
}
/**
*
* The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance
* group is resized. TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates nodes at the
* instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is
* only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version.
* TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes to a deny list and drains tasks
* from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either
* behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to
* HDFS corruption. TERMINATE_AT_TASK_COMPLETION
available only in Amazon EMR releases 4.1.0 and later,
* and is the default for releases of Amazon EMR earlier than 5.1.0.
*
TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates
* nodes at the instance-hour boundary, regardless of when the request to terminate the instance was
* submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters
* created using that version. TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds
* nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless
* of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and
* blocks instance termination if it could lead to HDFS corruption.
* TERMINATE_AT_TASK_COMPLETION
available only in Amazon EMR releases 4.1.0 and later, and is
* the default for releases of Amazon EMR earlier than 5.1.0.
* @see ScaleDownBehavior
*/
public String getScaleDownBehavior() {
return this.scaleDownBehavior;
}
/**
*
* The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance
* group is resized. TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates nodes at the
* instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is
* only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version.
* TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes to a deny list and drains tasks
* from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either
* behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to
* HDFS corruption. TERMINATE_AT_TASK_COMPLETION
available only in Amazon EMR releases 4.1.0 and later,
* and is the default for releases of Amazon EMR earlier than 5.1.0.
*
TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates
* nodes at the instance-hour boundary, regardless of when the request to terminate the instance was
* submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters
* created using that version. TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes
* to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the
* instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks
* instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION
* available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR
* earlier than 5.1.0.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ScaleDownBehavior
*/
public JobFlowDetail withScaleDownBehavior(String scaleDownBehavior) {
setScaleDownBehavior(scaleDownBehavior);
return this;
}
/**
*
* The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance
* group is resized. TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates nodes at the
* instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is
* only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version.
* TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes to a deny list and drains tasks
* from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either
* behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to
* HDFS corruption. TERMINATE_AT_TASK_COMPLETION
available only in Amazon EMR releases 4.1.0 and later,
* and is the default for releases of Amazon EMR earlier than 5.1.0.
*
TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates
* nodes at the instance-hour boundary, regardless of when the request to terminate the instance was
* submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters
* created using that version. TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes
* to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the
* instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks
* instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION
* available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR
* earlier than 5.1.0.
* @see ScaleDownBehavior
*/
public void setScaleDownBehavior(ScaleDownBehavior scaleDownBehavior) {
withScaleDownBehavior(scaleDownBehavior);
}
/**
*
* The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance
* group is resized. TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates nodes at the
* instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is
* only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version.
* TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes to a deny list and drains tasks
* from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either
* behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to
* HDFS corruption. TERMINATE_AT_TASK_COMPLETION
available only in Amazon EMR releases 4.1.0 and later,
* and is the default for releases of Amazon EMR earlier than 5.1.0.
*
TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates
* nodes at the instance-hour boundary, regardless of when the request to terminate the instance was
* submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters
* created using that version. TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes
* to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the
* instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks
* instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION
* available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR
* earlier than 5.1.0.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ScaleDownBehavior
*/
public JobFlowDetail withScaleDownBehavior(ScaleDownBehavior scaleDownBehavior) {
this.scaleDownBehavior = scaleDownBehavior.toString();
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 (getJobFlowId() != null)
sb.append("JobFlowId: ").append(getJobFlowId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getLogUri() != null)
sb.append("LogUri: ").append(getLogUri()).append(",");
if (getLogEncryptionKmsKeyId() != null)
sb.append("LogEncryptionKmsKeyId: ").append(getLogEncryptionKmsKeyId()).append(",");
if (getAmiVersion() != null)
sb.append("AmiVersion: ").append(getAmiVersion()).append(",");
if (getExecutionStatusDetail() != null)
sb.append("ExecutionStatusDetail: ").append(getExecutionStatusDetail()).append(",");
if (getInstances() != null)
sb.append("Instances: ").append(getInstances()).append(",");
if (getSteps() != null)
sb.append("Steps: ").append(getSteps()).append(",");
if (getBootstrapActions() != null)
sb.append("BootstrapActions: ").append(getBootstrapActions()).append(",");
if (getSupportedProducts() != null)
sb.append("SupportedProducts: ").append(getSupportedProducts()).append(",");
if (getVisibleToAllUsers() != null)
sb.append("VisibleToAllUsers: ").append(getVisibleToAllUsers()).append(",");
if (getJobFlowRole() != null)
sb.append("JobFlowRole: ").append(getJobFlowRole()).append(",");
if (getServiceRole() != null)
sb.append("ServiceRole: ").append(getServiceRole()).append(",");
if (getAutoScalingRole() != null)
sb.append("AutoScalingRole: ").append(getAutoScalingRole()).append(",");
if (getScaleDownBehavior() != null)
sb.append("ScaleDownBehavior: ").append(getScaleDownBehavior());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof JobFlowDetail == false)
return false;
JobFlowDetail other = (JobFlowDetail) obj;
if (other.getJobFlowId() == null ^ this.getJobFlowId() == null)
return false;
if (other.getJobFlowId() != null && other.getJobFlowId().equals(this.getJobFlowId()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getLogUri() == null ^ this.getLogUri() == null)
return false;
if (other.getLogUri() != null && other.getLogUri().equals(this.getLogUri()) == false)
return false;
if (other.getLogEncryptionKmsKeyId() == null ^ this.getLogEncryptionKmsKeyId() == null)
return false;
if (other.getLogEncryptionKmsKeyId() != null && other.getLogEncryptionKmsKeyId().equals(this.getLogEncryptionKmsKeyId()) == false)
return false;
if (other.getAmiVersion() == null ^ this.getAmiVersion() == null)
return false;
if (other.getAmiVersion() != null && other.getAmiVersion().equals(this.getAmiVersion()) == false)
return false;
if (other.getExecutionStatusDetail() == null ^ this.getExecutionStatusDetail() == null)
return false;
if (other.getExecutionStatusDetail() != null && other.getExecutionStatusDetail().equals(this.getExecutionStatusDetail()) == false)
return false;
if (other.getInstances() == null ^ this.getInstances() == null)
return false;
if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false)
return false;
if (other.getSteps() == null ^ this.getSteps() == null)
return false;
if (other.getSteps() != null && other.getSteps().equals(this.getSteps()) == false)
return false;
if (other.getBootstrapActions() == null ^ this.getBootstrapActions() == null)
return false;
if (other.getBootstrapActions() != null && other.getBootstrapActions().equals(this.getBootstrapActions()) == false)
return false;
if (other.getSupportedProducts() == null ^ this.getSupportedProducts() == null)
return false;
if (other.getSupportedProducts() != null && other.getSupportedProducts().equals(this.getSupportedProducts()) == false)
return false;
if (other.getVisibleToAllUsers() == null ^ this.getVisibleToAllUsers() == null)
return false;
if (other.getVisibleToAllUsers() != null && other.getVisibleToAllUsers().equals(this.getVisibleToAllUsers()) == false)
return false;
if (other.getJobFlowRole() == null ^ this.getJobFlowRole() == null)
return false;
if (other.getJobFlowRole() != null && other.getJobFlowRole().equals(this.getJobFlowRole()) == false)
return false;
if (other.getServiceRole() == null ^ this.getServiceRole() == null)
return false;
if (other.getServiceRole() != null && other.getServiceRole().equals(this.getServiceRole()) == false)
return false;
if (other.getAutoScalingRole() == null ^ this.getAutoScalingRole() == null)
return false;
if (other.getAutoScalingRole() != null && other.getAutoScalingRole().equals(this.getAutoScalingRole()) == false)
return false;
if (other.getScaleDownBehavior() == null ^ this.getScaleDownBehavior() == null)
return false;
if (other.getScaleDownBehavior() != null && other.getScaleDownBehavior().equals(this.getScaleDownBehavior()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getJobFlowId() == null) ? 0 : getJobFlowId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getLogUri() == null) ? 0 : getLogUri().hashCode());
hashCode = prime * hashCode + ((getLogEncryptionKmsKeyId() == null) ? 0 : getLogEncryptionKmsKeyId().hashCode());
hashCode = prime * hashCode + ((getAmiVersion() == null) ? 0 : getAmiVersion().hashCode());
hashCode = prime * hashCode + ((getExecutionStatusDetail() == null) ? 0 : getExecutionStatusDetail().hashCode());
hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode());
hashCode = prime * hashCode + ((getSteps() == null) ? 0 : getSteps().hashCode());
hashCode = prime * hashCode + ((getBootstrapActions() == null) ? 0 : getBootstrapActions().hashCode());
hashCode = prime * hashCode + ((getSupportedProducts() == null) ? 0 : getSupportedProducts().hashCode());
hashCode = prime * hashCode + ((getVisibleToAllUsers() == null) ? 0 : getVisibleToAllUsers().hashCode());
hashCode = prime * hashCode + ((getJobFlowRole() == null) ? 0 : getJobFlowRole().hashCode());
hashCode = prime * hashCode + ((getServiceRole() == null) ? 0 : getServiceRole().hashCode());
hashCode = prime * hashCode + ((getAutoScalingRole() == null) ? 0 : getAutoScalingRole().hashCode());
hashCode = prime * hashCode + ((getScaleDownBehavior() == null) ? 0 : getScaleDownBehavior().hashCode());
return hashCode;
}
@Override
public JobFlowDetail clone() {
try {
return (JobFlowDetail) 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.JobFlowDetailMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}