com.amazonaws.services.athena.model.EngineConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-athena Show documentation
/*
* Copyright 2019-2024 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.athena.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Contains data processing unit (DPU) configuration settings and parameter mappings for a notebook engine.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class EngineConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates processing
* work and manages other executors in a notebook session. The default is 1.
*
*/
private Integer coordinatorDpuSize;
/**
*
* The maximum number of DPUs that can run concurrently.
*
*/
private Integer maxConcurrentDpus;
/**
*
* The default number of DPUs to use for executors. An executor is the smallest unit of compute that a notebook
* session can request from Athena. The default is 1.
*
*/
private Integer defaultExecutorDpuSize;
/**
*
* Contains additional notebook engine MAP<string, string>
parameter mappings in the form of
* key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify a value
* for the StartSessionRequest$NotebookVersion field, and then add a key named NotebookId
to
* AdditionalConfigs
that has the value of the Athena notebook ID.
*
*/
private java.util.Map additionalConfigs;
/**
*
* Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and general
* Spark tuning.
*
*/
private java.util.Map sparkProperties;
/**
*
* The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates processing
* work and manages other executors in a notebook session. The default is 1.
*
*
* @param coordinatorDpuSize
* The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates
* processing work and manages other executors in a notebook session. The default is 1.
*/
public void setCoordinatorDpuSize(Integer coordinatorDpuSize) {
this.coordinatorDpuSize = coordinatorDpuSize;
}
/**
*
* The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates processing
* work and manages other executors in a notebook session. The default is 1.
*
*
* @return The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates
* processing work and manages other executors in a notebook session. The default is 1.
*/
public Integer getCoordinatorDpuSize() {
return this.coordinatorDpuSize;
}
/**
*
* The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates processing
* work and manages other executors in a notebook session. The default is 1.
*
*
* @param coordinatorDpuSize
* The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates
* processing work and manages other executors in a notebook session. The default is 1.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EngineConfiguration withCoordinatorDpuSize(Integer coordinatorDpuSize) {
setCoordinatorDpuSize(coordinatorDpuSize);
return this;
}
/**
*
* The maximum number of DPUs that can run concurrently.
*
*
* @param maxConcurrentDpus
* The maximum number of DPUs that can run concurrently.
*/
public void setMaxConcurrentDpus(Integer maxConcurrentDpus) {
this.maxConcurrentDpus = maxConcurrentDpus;
}
/**
*
* The maximum number of DPUs that can run concurrently.
*
*
* @return The maximum number of DPUs that can run concurrently.
*/
public Integer getMaxConcurrentDpus() {
return this.maxConcurrentDpus;
}
/**
*
* The maximum number of DPUs that can run concurrently.
*
*
* @param maxConcurrentDpus
* The maximum number of DPUs that can run concurrently.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EngineConfiguration withMaxConcurrentDpus(Integer maxConcurrentDpus) {
setMaxConcurrentDpus(maxConcurrentDpus);
return this;
}
/**
*
* The default number of DPUs to use for executors. An executor is the smallest unit of compute that a notebook
* session can request from Athena. The default is 1.
*
*
* @param defaultExecutorDpuSize
* The default number of DPUs to use for executors. An executor is the smallest unit of compute that a
* notebook session can request from Athena. The default is 1.
*/
public void setDefaultExecutorDpuSize(Integer defaultExecutorDpuSize) {
this.defaultExecutorDpuSize = defaultExecutorDpuSize;
}
/**
*
* The default number of DPUs to use for executors. An executor is the smallest unit of compute that a notebook
* session can request from Athena. The default is 1.
*
*
* @return The default number of DPUs to use for executors. An executor is the smallest unit of compute that a
* notebook session can request from Athena. The default is 1.
*/
public Integer getDefaultExecutorDpuSize() {
return this.defaultExecutorDpuSize;
}
/**
*
* The default number of DPUs to use for executors. An executor is the smallest unit of compute that a notebook
* session can request from Athena. The default is 1.
*
*
* @param defaultExecutorDpuSize
* The default number of DPUs to use for executors. An executor is the smallest unit of compute that a
* notebook session can request from Athena. The default is 1.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EngineConfiguration withDefaultExecutorDpuSize(Integer defaultExecutorDpuSize) {
setDefaultExecutorDpuSize(defaultExecutorDpuSize);
return this;
}
/**
*
* Contains additional notebook engine MAP<string, string>
parameter mappings in the form of
* key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify a value
* for the StartSessionRequest$NotebookVersion field, and then add a key named NotebookId
to
* AdditionalConfigs
that has the value of the Athena notebook ID.
*
*
* @return Contains additional notebook engine MAP<string, string>
parameter mappings in the form
* of key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve,
* specify a value for the StartSessionRequest$NotebookVersion field, and then add a key named
* NotebookId
to AdditionalConfigs
that has the value of the Athena notebook ID.
*/
public java.util.Map getAdditionalConfigs() {
return additionalConfigs;
}
/**
*
* Contains additional notebook engine MAP<string, string>
parameter mappings in the form of
* key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify a value
* for the StartSessionRequest$NotebookVersion field, and then add a key named NotebookId
to
* AdditionalConfigs
that has the value of the Athena notebook ID.
*
*
* @param additionalConfigs
* Contains additional notebook engine MAP<string, string>
parameter mappings in the form
* of key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify
* a value for the StartSessionRequest$NotebookVersion field, and then add a key named
* NotebookId
to AdditionalConfigs
that has the value of the Athena notebook ID.
*/
public void setAdditionalConfigs(java.util.Map additionalConfigs) {
this.additionalConfigs = additionalConfigs;
}
/**
*
* Contains additional notebook engine MAP<string, string>
parameter mappings in the form of
* key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify a value
* for the StartSessionRequest$NotebookVersion field, and then add a key named NotebookId
to
* AdditionalConfigs
that has the value of the Athena notebook ID.
*
*
* @param additionalConfigs
* Contains additional notebook engine MAP<string, string>
parameter mappings in the form
* of key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify
* a value for the StartSessionRequest$NotebookVersion field, and then add a key named
* NotebookId
to AdditionalConfigs
that has the value of the Athena notebook ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EngineConfiguration withAdditionalConfigs(java.util.Map additionalConfigs) {
setAdditionalConfigs(additionalConfigs);
return this;
}
/**
* Add a single AdditionalConfigs entry
*
* @see EngineConfiguration#withAdditionalConfigs
* @returns a reference to this object so that method calls can be chained together.
*/
public EngineConfiguration addAdditionalConfigsEntry(String key, String value) {
if (null == this.additionalConfigs) {
this.additionalConfigs = new java.util.HashMap();
}
if (this.additionalConfigs.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.additionalConfigs.put(key, value);
return this;
}
/**
* Removes all the entries added into AdditionalConfigs.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EngineConfiguration clearAdditionalConfigsEntries() {
this.additionalConfigs = null;
return this;
}
/**
*
* Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and general
* Spark tuning.
*
*
* @return Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and
* general Spark tuning.
*/
public java.util.Map getSparkProperties() {
return sparkProperties;
}
/**
*
* Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and general
* Spark tuning.
*
*
* @param sparkProperties
* Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and
* general Spark tuning.
*/
public void setSparkProperties(java.util.Map sparkProperties) {
this.sparkProperties = sparkProperties;
}
/**
*
* Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and general
* Spark tuning.
*
*
* @param sparkProperties
* Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and
* general Spark tuning.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EngineConfiguration withSparkProperties(java.util.Map sparkProperties) {
setSparkProperties(sparkProperties);
return this;
}
/**
* Add a single SparkProperties entry
*
* @see EngineConfiguration#withSparkProperties
* @returns a reference to this object so that method calls can be chained together.
*/
public EngineConfiguration addSparkPropertiesEntry(String key, String value) {
if (null == this.sparkProperties) {
this.sparkProperties = new java.util.HashMap();
}
if (this.sparkProperties.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.sparkProperties.put(key, value);
return this;
}
/**
* Removes all the entries added into SparkProperties.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EngineConfiguration clearSparkPropertiesEntries() {
this.sparkProperties = null;
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 (getCoordinatorDpuSize() != null)
sb.append("CoordinatorDpuSize: ").append(getCoordinatorDpuSize()).append(",");
if (getMaxConcurrentDpus() != null)
sb.append("MaxConcurrentDpus: ").append(getMaxConcurrentDpus()).append(",");
if (getDefaultExecutorDpuSize() != null)
sb.append("DefaultExecutorDpuSize: ").append(getDefaultExecutorDpuSize()).append(",");
if (getAdditionalConfigs() != null)
sb.append("AdditionalConfigs: ").append(getAdditionalConfigs()).append(",");
if (getSparkProperties() != null)
sb.append("SparkProperties: ").append(getSparkProperties());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof EngineConfiguration == false)
return false;
EngineConfiguration other = (EngineConfiguration) obj;
if (other.getCoordinatorDpuSize() == null ^ this.getCoordinatorDpuSize() == null)
return false;
if (other.getCoordinatorDpuSize() != null && other.getCoordinatorDpuSize().equals(this.getCoordinatorDpuSize()) == false)
return false;
if (other.getMaxConcurrentDpus() == null ^ this.getMaxConcurrentDpus() == null)
return false;
if (other.getMaxConcurrentDpus() != null && other.getMaxConcurrentDpus().equals(this.getMaxConcurrentDpus()) == false)
return false;
if (other.getDefaultExecutorDpuSize() == null ^ this.getDefaultExecutorDpuSize() == null)
return false;
if (other.getDefaultExecutorDpuSize() != null && other.getDefaultExecutorDpuSize().equals(this.getDefaultExecutorDpuSize()) == false)
return false;
if (other.getAdditionalConfigs() == null ^ this.getAdditionalConfigs() == null)
return false;
if (other.getAdditionalConfigs() != null && other.getAdditionalConfigs().equals(this.getAdditionalConfigs()) == false)
return false;
if (other.getSparkProperties() == null ^ this.getSparkProperties() == null)
return false;
if (other.getSparkProperties() != null && other.getSparkProperties().equals(this.getSparkProperties()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCoordinatorDpuSize() == null) ? 0 : getCoordinatorDpuSize().hashCode());
hashCode = prime * hashCode + ((getMaxConcurrentDpus() == null) ? 0 : getMaxConcurrentDpus().hashCode());
hashCode = prime * hashCode + ((getDefaultExecutorDpuSize() == null) ? 0 : getDefaultExecutorDpuSize().hashCode());
hashCode = prime * hashCode + ((getAdditionalConfigs() == null) ? 0 : getAdditionalConfigs().hashCode());
hashCode = prime * hashCode + ((getSparkProperties() == null) ? 0 : getSparkProperties().hashCode());
return hashCode;
}
@Override
public EngineConfiguration clone() {
try {
return (EngineConfiguration) 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.athena.model.transform.EngineConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}