public class SqlRetryHandler extends Object
| Constructor and Description |
|---|
SqlRetryHandler(org.apache.hadoop.conf.Configuration conf,
DatabaseProduct databaseProduct) |
| Modifier and Type | Method and Description |
|---|---|
<Result> Result |
executeWithRetry(SqlRetryCallProperties properties,
SqlRetryFunction<Result> function)
Executes the passed
SqlRetryFunction and automatically retries the execution in case of failure. |
static String |
getMessage(Exception ex) |
public SqlRetryHandler(org.apache.hadoop.conf.Configuration conf,
DatabaseProduct databaseProduct)
public <Result> Result executeWithRetry(SqlRetryCallProperties properties, SqlRetryFunction<Result> function) throws org.apache.thrift.TException
SqlRetryFunction and automatically retries the execution in case of failure. If there is
a retry-call upper in the call hierarchy, SqlRetryCallProperties.withRetryPropagation(org.apache.hadoop.hive.metastore.txn.retry.RetryPropagation) can be used to
control wether to join it or create a nested retry-call.Result - Type of the resultproperties - SqlRetryCallProperties instance used to fine-tune/alter the execution-mechanism.function - The SqlRetryFunction to execute.SqlRetryFunction.MetaException - Thrown in case of execution error.org.apache.thrift.TExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.