This shows how to override the retry policies for bigquery_biglake_v1::MetastoreServiceClient:
auto options =
.
set<google::cloud::bigquery_biglake_v1::
MetastoreServiceConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
MetastoreServiceRetryPolicyOption>(
MetastoreServiceLimitedErrorCountRetryPolicy(3)
.clone())
MetastoreServiceBackoffPolicyOption>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
auto connection =
options);
auto c1 =
auto c2 =
.
set<google::cloud::bigquery_biglake_v1::
MetastoreServiceRetryPolicyOption>(
std::chrono::minutes(5))
.clone()));
Options & set(ValueTypeT< T > v)
Definition: metastore_client.h:32
::google::cloud::internal::LimitedTimeRetryPolicy< bigquery_biglake_v1_internal::MetastoreServiceRetryTraits > MetastoreServiceLimitedTimeRetryPolicy
Definition: metastore_connection.h:43
std::shared_ptr< MetastoreServiceConnection > MakeMetastoreServiceConnection(Options options={})
A factory function to construct an object of type MetastoreServiceConnection.
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy
Assuming you have created a custom idempotency policy. Such as:
class CustomIdempotencyPolicy
MetastoreServiceConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::bigquery_biglake_v1::
MetastoreServiceConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
};