com.amazonaws.services.athena.model.QueryExecutionStatistics 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;
/**
*
* The amount of data scanned during the query execution and the amount of time that it took to execute, and the type of
* statement that was run.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class QueryExecutionStatistics implements Serializable, Cloneable, StructuredPojo {
/**
*
* The number of milliseconds that the query took to execute.
*
*/
private Long engineExecutionTimeInMillis;
/**
*
* The number of bytes in the data that was queried.
*
*/
private Long dataScannedInBytes;
/**
*
* The location and file name of a data manifest file. The manifest file is saved to the Athena query results
* location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the query fails, the
* manifest file also tracks files that the query intended to write. The manifest is useful for identifying orphaned
* files resulting from a failed query. For more information, see Working with Query Results, Output Files, and
* Query History in the Amazon Athena User Guide.
*
*/
private String dataManifestLocation;
/**
*
* The number of milliseconds that Athena took to run the query.
*
*/
private Long totalExecutionTimeInMillis;
/**
*
* The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient
* errors occur, Athena might automatically add the query back to the queue.
*
*/
private Long queryQueueTimeInMillis;
/**
*
* The number of milliseconds that Athena took to preprocess the query before submitting the query to the query
* engine.
*
*/
private Long servicePreProcessingTimeInMillis;
/**
*
* The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent
* retrieving table partitions from the data source. Note that because the query engine performs the query planning,
* query planning time is a subset of engine processing time.
*
*/
private Long queryPlanningTimeInMillis;
/**
*
* The number of milliseconds that Athena took to finalize and publish the query results after the query engine
* finished running the query.
*
*/
private Long serviceProcessingTimeInMillis;
/**
*
* Contains information about whether previous query results were reused for the query.
*
*/
private ResultReuseInformation resultReuseInformation;
/**
*
* The number of milliseconds that the query took to execute.
*
*
* @param engineExecutionTimeInMillis
* The number of milliseconds that the query took to execute.
*/
public void setEngineExecutionTimeInMillis(Long engineExecutionTimeInMillis) {
this.engineExecutionTimeInMillis = engineExecutionTimeInMillis;
}
/**
*
* The number of milliseconds that the query took to execute.
*
*
* @return The number of milliseconds that the query took to execute.
*/
public Long getEngineExecutionTimeInMillis() {
return this.engineExecutionTimeInMillis;
}
/**
*
* The number of milliseconds that the query took to execute.
*
*
* @param engineExecutionTimeInMillis
* The number of milliseconds that the query took to execute.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryExecutionStatistics withEngineExecutionTimeInMillis(Long engineExecutionTimeInMillis) {
setEngineExecutionTimeInMillis(engineExecutionTimeInMillis);
return this;
}
/**
*
* The number of bytes in the data that was queried.
*
*
* @param dataScannedInBytes
* The number of bytes in the data that was queried.
*/
public void setDataScannedInBytes(Long dataScannedInBytes) {
this.dataScannedInBytes = dataScannedInBytes;
}
/**
*
* The number of bytes in the data that was queried.
*
*
* @return The number of bytes in the data that was queried.
*/
public Long getDataScannedInBytes() {
return this.dataScannedInBytes;
}
/**
*
* The number of bytes in the data that was queried.
*
*
* @param dataScannedInBytes
* The number of bytes in the data that was queried.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryExecutionStatistics withDataScannedInBytes(Long dataScannedInBytes) {
setDataScannedInBytes(dataScannedInBytes);
return this;
}
/**
*
* The location and file name of a data manifest file. The manifest file is saved to the Athena query results
* location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the query fails, the
* manifest file also tracks files that the query intended to write. The manifest is useful for identifying orphaned
* files resulting from a failed query. For more information, see Working with Query Results, Output Files, and
* Query History in the Amazon Athena User Guide.
*
*
* @param dataManifestLocation
* The location and file name of a data manifest file. The manifest file is saved to the Athena query results
* location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the query
* fails, the manifest file also tracks files that the query intended to write. The manifest is useful for
* identifying orphaned files resulting from a failed query. For more information, see Working with Query Results, Output
* Files, and Query History in the Amazon Athena User Guide.
*/
public void setDataManifestLocation(String dataManifestLocation) {
this.dataManifestLocation = dataManifestLocation;
}
/**
*
* The location and file name of a data manifest file. The manifest file is saved to the Athena query results
* location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the query fails, the
* manifest file also tracks files that the query intended to write. The manifest is useful for identifying orphaned
* files resulting from a failed query. For more information, see Working with Query Results, Output Files, and
* Query History in the Amazon Athena User Guide.
*
*
* @return The location and file name of a data manifest file. The manifest file is saved to the Athena query
* results location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the
* query fails, the manifest file also tracks files that the query intended to write. The manifest is useful
* for identifying orphaned files resulting from a failed query. For more information, see Working with Query Results, Output
* Files, and Query History in the Amazon Athena User Guide.
*/
public String getDataManifestLocation() {
return this.dataManifestLocation;
}
/**
*
* The location and file name of a data manifest file. The manifest file is saved to the Athena query results
* location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the query fails, the
* manifest file also tracks files that the query intended to write. The manifest is useful for identifying orphaned
* files resulting from a failed query. For more information, see Working with Query Results, Output Files, and
* Query History in the Amazon Athena User Guide.
*
*
* @param dataManifestLocation
* The location and file name of a data manifest file. The manifest file is saved to the Athena query results
* location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the query
* fails, the manifest file also tracks files that the query intended to write. The manifest is useful for
* identifying orphaned files resulting from a failed query. For more information, see Working with Query Results, Output
* Files, and Query History in the Amazon Athena User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryExecutionStatistics withDataManifestLocation(String dataManifestLocation) {
setDataManifestLocation(dataManifestLocation);
return this;
}
/**
*
* The number of milliseconds that Athena took to run the query.
*
*
* @param totalExecutionTimeInMillis
* The number of milliseconds that Athena took to run the query.
*/
public void setTotalExecutionTimeInMillis(Long totalExecutionTimeInMillis) {
this.totalExecutionTimeInMillis = totalExecutionTimeInMillis;
}
/**
*
* The number of milliseconds that Athena took to run the query.
*
*
* @return The number of milliseconds that Athena took to run the query.
*/
public Long getTotalExecutionTimeInMillis() {
return this.totalExecutionTimeInMillis;
}
/**
*
* The number of milliseconds that Athena took to run the query.
*
*
* @param totalExecutionTimeInMillis
* The number of milliseconds that Athena took to run the query.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryExecutionStatistics withTotalExecutionTimeInMillis(Long totalExecutionTimeInMillis) {
setTotalExecutionTimeInMillis(totalExecutionTimeInMillis);
return this;
}
/**
*
* The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient
* errors occur, Athena might automatically add the query back to the queue.
*
*
* @param queryQueueTimeInMillis
* The number of milliseconds that the query was in your query queue waiting for resources. Note that if
* transient errors occur, Athena might automatically add the query back to the queue.
*/
public void setQueryQueueTimeInMillis(Long queryQueueTimeInMillis) {
this.queryQueueTimeInMillis = queryQueueTimeInMillis;
}
/**
*
* The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient
* errors occur, Athena might automatically add the query back to the queue.
*
*
* @return The number of milliseconds that the query was in your query queue waiting for resources. Note that if
* transient errors occur, Athena might automatically add the query back to the queue.
*/
public Long getQueryQueueTimeInMillis() {
return this.queryQueueTimeInMillis;
}
/**
*
* The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient
* errors occur, Athena might automatically add the query back to the queue.
*
*
* @param queryQueueTimeInMillis
* The number of milliseconds that the query was in your query queue waiting for resources. Note that if
* transient errors occur, Athena might automatically add the query back to the queue.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryExecutionStatistics withQueryQueueTimeInMillis(Long queryQueueTimeInMillis) {
setQueryQueueTimeInMillis(queryQueueTimeInMillis);
return this;
}
/**
*
* The number of milliseconds that Athena took to preprocess the query before submitting the query to the query
* engine.
*
*
* @param servicePreProcessingTimeInMillis
* The number of milliseconds that Athena took to preprocess the query before submitting the query to the
* query engine.
*/
public void setServicePreProcessingTimeInMillis(Long servicePreProcessingTimeInMillis) {
this.servicePreProcessingTimeInMillis = servicePreProcessingTimeInMillis;
}
/**
*
* The number of milliseconds that Athena took to preprocess the query before submitting the query to the query
* engine.
*
*
* @return The number of milliseconds that Athena took to preprocess the query before submitting the query to the
* query engine.
*/
public Long getServicePreProcessingTimeInMillis() {
return this.servicePreProcessingTimeInMillis;
}
/**
*
* The number of milliseconds that Athena took to preprocess the query before submitting the query to the query
* engine.
*
*
* @param servicePreProcessingTimeInMillis
* The number of milliseconds that Athena took to preprocess the query before submitting the query to the
* query engine.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryExecutionStatistics withServicePreProcessingTimeInMillis(Long servicePreProcessingTimeInMillis) {
setServicePreProcessingTimeInMillis(servicePreProcessingTimeInMillis);
return this;
}
/**
*
* The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent
* retrieving table partitions from the data source. Note that because the query engine performs the query planning,
* query planning time is a subset of engine processing time.
*
*
* @param queryPlanningTimeInMillis
* The number of milliseconds that Athena took to plan the query processing flow. This includes the time
* spent retrieving table partitions from the data source. Note that because the query engine performs the
* query planning, query planning time is a subset of engine processing time.
*/
public void setQueryPlanningTimeInMillis(Long queryPlanningTimeInMillis) {
this.queryPlanningTimeInMillis = queryPlanningTimeInMillis;
}
/**
*
* The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent
* retrieving table partitions from the data source. Note that because the query engine performs the query planning,
* query planning time is a subset of engine processing time.
*
*
* @return The number of milliseconds that Athena took to plan the query processing flow. This includes the time
* spent retrieving table partitions from the data source. Note that because the query engine performs the
* query planning, query planning time is a subset of engine processing time.
*/
public Long getQueryPlanningTimeInMillis() {
return this.queryPlanningTimeInMillis;
}
/**
*
* The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent
* retrieving table partitions from the data source. Note that because the query engine performs the query planning,
* query planning time is a subset of engine processing time.
*
*
* @param queryPlanningTimeInMillis
* The number of milliseconds that Athena took to plan the query processing flow. This includes the time
* spent retrieving table partitions from the data source. Note that because the query engine performs the
* query planning, query planning time is a subset of engine processing time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryExecutionStatistics withQueryPlanningTimeInMillis(Long queryPlanningTimeInMillis) {
setQueryPlanningTimeInMillis(queryPlanningTimeInMillis);
return this;
}
/**
*
* The number of milliseconds that Athena took to finalize and publish the query results after the query engine
* finished running the query.
*
*
* @param serviceProcessingTimeInMillis
* The number of milliseconds that Athena took to finalize and publish the query results after the query
* engine finished running the query.
*/
public void setServiceProcessingTimeInMillis(Long serviceProcessingTimeInMillis) {
this.serviceProcessingTimeInMillis = serviceProcessingTimeInMillis;
}
/**
*
* The number of milliseconds that Athena took to finalize and publish the query results after the query engine
* finished running the query.
*
*
* @return The number of milliseconds that Athena took to finalize and publish the query results after the query
* engine finished running the query.
*/
public Long getServiceProcessingTimeInMillis() {
return this.serviceProcessingTimeInMillis;
}
/**
*
* The number of milliseconds that Athena took to finalize and publish the query results after the query engine
* finished running the query.
*
*
* @param serviceProcessingTimeInMillis
* The number of milliseconds that Athena took to finalize and publish the query results after the query
* engine finished running the query.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryExecutionStatistics withServiceProcessingTimeInMillis(Long serviceProcessingTimeInMillis) {
setServiceProcessingTimeInMillis(serviceProcessingTimeInMillis);
return this;
}
/**
*
* Contains information about whether previous query results were reused for the query.
*
*
* @param resultReuseInformation
* Contains information about whether previous query results were reused for the query.
*/
public void setResultReuseInformation(ResultReuseInformation resultReuseInformation) {
this.resultReuseInformation = resultReuseInformation;
}
/**
*
* Contains information about whether previous query results were reused for the query.
*
*
* @return Contains information about whether previous query results were reused for the query.
*/
public ResultReuseInformation getResultReuseInformation() {
return this.resultReuseInformation;
}
/**
*
* Contains information about whether previous query results were reused for the query.
*
*
* @param resultReuseInformation
* Contains information about whether previous query results were reused for the query.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryExecutionStatistics withResultReuseInformation(ResultReuseInformation resultReuseInformation) {
setResultReuseInformation(resultReuseInformation);
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 (getEngineExecutionTimeInMillis() != null)
sb.append("EngineExecutionTimeInMillis: ").append(getEngineExecutionTimeInMillis()).append(",");
if (getDataScannedInBytes() != null)
sb.append("DataScannedInBytes: ").append(getDataScannedInBytes()).append(",");
if (getDataManifestLocation() != null)
sb.append("DataManifestLocation: ").append(getDataManifestLocation()).append(",");
if (getTotalExecutionTimeInMillis() != null)
sb.append("TotalExecutionTimeInMillis: ").append(getTotalExecutionTimeInMillis()).append(",");
if (getQueryQueueTimeInMillis() != null)
sb.append("QueryQueueTimeInMillis: ").append(getQueryQueueTimeInMillis()).append(",");
if (getServicePreProcessingTimeInMillis() != null)
sb.append("ServicePreProcessingTimeInMillis: ").append(getServicePreProcessingTimeInMillis()).append(",");
if (getQueryPlanningTimeInMillis() != null)
sb.append("QueryPlanningTimeInMillis: ").append(getQueryPlanningTimeInMillis()).append(",");
if (getServiceProcessingTimeInMillis() != null)
sb.append("ServiceProcessingTimeInMillis: ").append(getServiceProcessingTimeInMillis()).append(",");
if (getResultReuseInformation() != null)
sb.append("ResultReuseInformation: ").append(getResultReuseInformation());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof QueryExecutionStatistics == false)
return false;
QueryExecutionStatistics other = (QueryExecutionStatistics) obj;
if (other.getEngineExecutionTimeInMillis() == null ^ this.getEngineExecutionTimeInMillis() == null)
return false;
if (other.getEngineExecutionTimeInMillis() != null && other.getEngineExecutionTimeInMillis().equals(this.getEngineExecutionTimeInMillis()) == false)
return false;
if (other.getDataScannedInBytes() == null ^ this.getDataScannedInBytes() == null)
return false;
if (other.getDataScannedInBytes() != null && other.getDataScannedInBytes().equals(this.getDataScannedInBytes()) == false)
return false;
if (other.getDataManifestLocation() == null ^ this.getDataManifestLocation() == null)
return false;
if (other.getDataManifestLocation() != null && other.getDataManifestLocation().equals(this.getDataManifestLocation()) == false)
return false;
if (other.getTotalExecutionTimeInMillis() == null ^ this.getTotalExecutionTimeInMillis() == null)
return false;
if (other.getTotalExecutionTimeInMillis() != null && other.getTotalExecutionTimeInMillis().equals(this.getTotalExecutionTimeInMillis()) == false)
return false;
if (other.getQueryQueueTimeInMillis() == null ^ this.getQueryQueueTimeInMillis() == null)
return false;
if (other.getQueryQueueTimeInMillis() != null && other.getQueryQueueTimeInMillis().equals(this.getQueryQueueTimeInMillis()) == false)
return false;
if (other.getServicePreProcessingTimeInMillis() == null ^ this.getServicePreProcessingTimeInMillis() == null)
return false;
if (other.getServicePreProcessingTimeInMillis() != null
&& other.getServicePreProcessingTimeInMillis().equals(this.getServicePreProcessingTimeInMillis()) == false)
return false;
if (other.getQueryPlanningTimeInMillis() == null ^ this.getQueryPlanningTimeInMillis() == null)
return false;
if (other.getQueryPlanningTimeInMillis() != null && other.getQueryPlanningTimeInMillis().equals(this.getQueryPlanningTimeInMillis()) == false)
return false;
if (other.getServiceProcessingTimeInMillis() == null ^ this.getServiceProcessingTimeInMillis() == null)
return false;
if (other.getServiceProcessingTimeInMillis() != null
&& other.getServiceProcessingTimeInMillis().equals(this.getServiceProcessingTimeInMillis()) == false)
return false;
if (other.getResultReuseInformation() == null ^ this.getResultReuseInformation() == null)
return false;
if (other.getResultReuseInformation() != null && other.getResultReuseInformation().equals(this.getResultReuseInformation()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEngineExecutionTimeInMillis() == null) ? 0 : getEngineExecutionTimeInMillis().hashCode());
hashCode = prime * hashCode + ((getDataScannedInBytes() == null) ? 0 : getDataScannedInBytes().hashCode());
hashCode = prime * hashCode + ((getDataManifestLocation() == null) ? 0 : getDataManifestLocation().hashCode());
hashCode = prime * hashCode + ((getTotalExecutionTimeInMillis() == null) ? 0 : getTotalExecutionTimeInMillis().hashCode());
hashCode = prime * hashCode + ((getQueryQueueTimeInMillis() == null) ? 0 : getQueryQueueTimeInMillis().hashCode());
hashCode = prime * hashCode + ((getServicePreProcessingTimeInMillis() == null) ? 0 : getServicePreProcessingTimeInMillis().hashCode());
hashCode = prime * hashCode + ((getQueryPlanningTimeInMillis() == null) ? 0 : getQueryPlanningTimeInMillis().hashCode());
hashCode = prime * hashCode + ((getServiceProcessingTimeInMillis() == null) ? 0 : getServiceProcessingTimeInMillis().hashCode());
hashCode = prime * hashCode + ((getResultReuseInformation() == null) ? 0 : getResultReuseInformation().hashCode());
return hashCode;
}
@Override
public QueryExecutionStatistics clone() {
try {
return (QueryExecutionStatistics) 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.QueryExecutionStatisticsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}