Class Athena2Configuration
- java.lang.Object
-
- org.apache.camel.component.aws2.athena.Athena2Configuration
-
-
Constructor Summary
Constructors Constructor Description Athena2Configuration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Athena2Configuration
copy()
String
getAccessKey()
software.amazon.awssdk.services.athena.AthenaClient
getAmazonAthenaClient()
String
getClientRequestToken()
String
getDatabase()
long
getDelay()
software.amazon.awssdk.services.athena.model.EncryptionOption
getEncryptionOption()
long
getInitialDelay()
String
getKmsKey()
int
getMaxAttempts()
Integer
getMaxResults()
String
getNextToken()
Athena2Operations
getOperation()
String
getOutputLocation()
Athena2OutputType
getOutputType()
String
getProxyHost()
Integer
getProxyPort()
software.amazon.awssdk.core.Protocol
getProxyProtocol()
String
getQueryExecutionId()
String
getQueryString()
String
getRegion()
String
getRetry()
String
getSecretKey()
long
getWaitTimeout()
String
getWorkGroup()
boolean
isIncludeTrace()
boolean
isResetWaitTimeoutOnRetry()
Boolean
isUseDefaultCredentialsProvider()
void
setAccessKey(String accessKey)
Amazon AWS Access Key.void
setAmazonAthenaClient(software.amazon.awssdk.services.athena.AthenaClient amazonAthenaClient)
The AmazonAthena instance to use as the client.void
setClientRequestToken(String clientRequestToken)
A unique string to ensure issues queries are idempotent.void
setDatabase(String database)
The Athena database to use.void
setDelay(long delay)
Milliseconds before the next poll for query execution status.void
setEncryptionOption(software.amazon.awssdk.services.athena.model.EncryptionOption encryptionOption)
The encryption type to use when storing query results in S3.void
setIncludeTrace(boolean includeTrace)
Include useful trace information at the beginning of queries as an SQL comment (prefixed with "--").void
setInitialDelay(long initialDelay)
Milliseconds before the first poll for query execution status.void
setKmsKey(String kmsKey)
For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID.void
setMaxAttempts(int maxAttempts)
Maximum number of times to attempt a query.void
setMaxResults(Integer maxResults)
Max number of results to return for the given operation (if supported by the Athena API endpoint).void
setNextToken(String nextToken)
Pagination token to use in the case where the response from the previous request was truncated.void
setOperation(Athena2Operations operation)
The Athena API function to call.void
setOutputLocation(String outputLocation)
The location in Amazon S3 where query results are stored, such ass3://path/to/query/bucket/
.void
setOutputType(Athena2OutputType outputType)
How query results should be returned.void
setProxyHost(String proxyHost)
To define a proxy host when instantiating the Athena client.void
setProxyPort(Integer proxyPort)
To define a proxy port when instantiating the Athena client.void
setProxyProtocol(software.amazon.awssdk.core.Protocol proxyProtocol)
To define a proxy protocol when instantiating the Athena client.void
setQueryExecutionId(String queryExecutionId)
The unique ID identifying the query execution.void
setQueryString(String queryString)
The SQL query to run.void
setRegion(String region)
The region in which Athena client needs to work.void
setResetWaitTimeoutOnRetry(boolean resetWaitTimeoutOnRetry)
Reset the waitTimeout countdown in the event of a query retry.void
setRetry(String retry)
Optional comma separated list of error types to retry the query for.void
setSecretKey(String secretKey)
Amazon AWS Secret Key.void
setUseDefaultCredentialsProvider(Boolean useDefaultCredentialsProvider)
Set whether the Athena client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.void
setWaitTimeout(long waitTimeout)
Optional max wait time in millis to wait for a successful query completion.void
setWorkGroup(String workGroup)
The workgroup to use for running the query.
-
-
-
Method Detail
-
getAccessKey
public String getAccessKey()
-
setAccessKey
public void setAccessKey(String accessKey)
Amazon AWS Access Key.
-
getSecretKey
public String getSecretKey()
-
setSecretKey
public void setSecretKey(String secretKey)
Amazon AWS Secret Key.
-
getAmazonAthenaClient
public software.amazon.awssdk.services.athena.AthenaClient getAmazonAthenaClient()
-
setAmazonAthenaClient
public void setAmazonAthenaClient(software.amazon.awssdk.services.athena.AthenaClient amazonAthenaClient)
The AmazonAthena instance to use as the client.
-
getProxyProtocol
public software.amazon.awssdk.core.Protocol getProxyProtocol()
-
setProxyProtocol
public void setProxyProtocol(software.amazon.awssdk.core.Protocol proxyProtocol)
To define a proxy protocol when instantiating the Athena client.
-
getProxyHost
public String getProxyHost()
-
setProxyHost
public void setProxyHost(String proxyHost)
To define a proxy host when instantiating the Athena client.
-
getProxyPort
public Integer getProxyPort()
-
setProxyPort
public void setProxyPort(Integer proxyPort)
To define a proxy port when instantiating the Athena client.
-
getRegion
public String getRegion()
-
setRegion
public void setRegion(String region)
The region in which Athena client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1). You'll need to use the name Region.EU_WEST_1.id().
-
getOutputLocation
public String getOutputLocation()
-
setOutputLocation
public void setOutputLocation(String outputLocation)
The location in Amazon S3 where query results are stored, such ass3://path/to/query/bucket/
. Ensure this value ends with a forward slash ('/').
-
getOutputType
public Athena2OutputType getOutputType()
-
setOutputType
public void setOutputType(Athena2OutputType outputType)
How query results should be returned. One ofStreamList
(default - return aGetQueryResultsIterable
that can page through all results),SelectList
(returns at most 1,000 rows at a time, plus a NextToken value as a header than can be used for manual pagination of results),S3Pointer
(return an S3 path pointing to the results).
-
getOperation
public Athena2Operations getOperation()
-
setOperation
public void setOperation(Athena2Operations operation)
The Athena API function to call.
-
getDatabase
public String getDatabase()
-
setDatabase
public void setDatabase(String database)
The Athena database to use.
-
getQueryExecutionId
public String getQueryExecutionId()
-
setQueryExecutionId
public void setQueryExecutionId(String queryExecutionId)
The unique ID identifying the query execution.
-
getWorkGroup
public String getWorkGroup()
-
setWorkGroup
public void setWorkGroup(String workGroup)
The workgroup to use for running the query.
-
getMaxResults
public Integer getMaxResults()
-
setMaxResults
public void setMaxResults(Integer maxResults)
Max number of results to return for the given operation (if supported by the Athena API endpoint). If not set, will use the Athena API default for the given operation.
-
getNextToken
public String getNextToken()
-
setNextToken
public void setNextToken(String nextToken)
Pagination token to use in the case where the response from the previous request was truncated.
-
getClientRequestToken
public String getClientRequestToken()
-
setClientRequestToken
public void setClientRequestToken(String clientRequestToken)
A unique string to ensure issues queries are idempotent. It is unlikely you will need to set this.
-
getEncryptionOption
public software.amazon.awssdk.services.athena.model.EncryptionOption getEncryptionOption()
-
setEncryptionOption
public void setEncryptionOption(software.amazon.awssdk.services.athena.model.EncryptionOption encryptionOption)
The encryption type to use when storing query results in S3. One ofSSE_S3
,SSE_KMS
, orCSE_KMS
.
-
getKmsKey
public String getKmsKey()
-
setKmsKey
public void setKmsKey(String kmsKey)
For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID.
-
getQueryString
public String getQueryString()
-
setQueryString
public void setQueryString(String queryString)
The SQL query to run. Except for simple queries, prefer setting this as thebody
of the Exchange or as a header usingAthena2Constants.QUERY_STRING
to avoid having to deal with URL encoding issues.
-
getInitialDelay
public long getInitialDelay()
-
setInitialDelay
public void setInitialDelay(long initialDelay)
Milliseconds before the first poll for query execution status. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more.
-
getDelay
public long getDelay()
-
setDelay
public void setDelay(long delay)
Milliseconds before the next poll for query execution status. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more.
-
getWaitTimeout
public long getWaitTimeout()
-
setWaitTimeout
public void setWaitTimeout(long waitTimeout)
Optional max wait time in millis to wait for a successful query completion. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more.
-
getRetry
public String getRetry()
-
setRetry
public void setRetry(String retry)
Optional comma separated list of error types to retry the query for. Use "retryable" to retry all retryable failure conditions (e.g. generic errors and resources exhausted), "generic" to retry "GENERIC_INTERNAL_ERROR" failures, "exhausted" to retry queries that have exhausted resource limits, "always" to always retry regardless of failure condition, or "never" or null to never retry (default). See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more.
-
getMaxAttempts
public int getMaxAttempts()
-
setMaxAttempts
public void setMaxAttempts(int maxAttempts)
Maximum number of times to attempt a query. Set to 1 to disable retries. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more.
-
isResetWaitTimeoutOnRetry
public boolean isResetWaitTimeoutOnRetry()
-
setResetWaitTimeoutOnRetry
public void setResetWaitTimeoutOnRetry(boolean resetWaitTimeoutOnRetry)
Reset the waitTimeout countdown in the event of a query retry. If set to true, potential max time spent waiting for queries is equal to waitTimeout x maxAttempts. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more.
-
isIncludeTrace
public boolean isIncludeTrace()
-
setIncludeTrace
public void setIncludeTrace(boolean includeTrace)
Include useful trace information at the beginning of queries as an SQL comment (prefixed with "--").
-
setUseDefaultCredentialsProvider
public void setUseDefaultCredentialsProvider(Boolean useDefaultCredentialsProvider)
Set whether the Athena client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.
-
isUseDefaultCredentialsProvider
public Boolean isUseDefaultCredentialsProvider()
-
copy
public Athena2Configuration copy()
-
-