This shows how to override the retry policies for admin::BigtableTableAdminClient:
auto options =
.
set<google::cloud::bigtable_admin::
BigtableTableAdminConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
BigtableTableAdminRetryPolicyOption>(
BigtableTableAdminLimitedErrorCountRetryPolicy(3)
.clone())
BigtableTableAdminBackoffPolicyOption>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
auto connection =
.
set<google::cloud::bigtable_admin::
BigtableTableAdminRetryPolicyOption>(
std::chrono::minutes(5))
.clone()));
Options & set(ValueTypeT< T > v)
Service for creating, configuring, and deleting Cloud Bigtable tables.
Definition: bigtable_table_admin_client.h:68
Definition: bigtable_instance_admin_client.h:35
std::shared_ptr< BigtableTableAdminConnection > MakeBigtableTableAdminConnection(Options options={})
A factory function to construct an object of type BigtableTableAdminConnection.
::google::cloud::internal::LimitedTimeRetryPolicy< bigtable_admin_internal::BigtableTableAdminRetryTraits > BigtableTableAdminLimitedTimeRetryPolicy
Definition: bigtable_table_admin_connection.h:46
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy
Assuming you have created a custom idempotency policy. Such as:
class CustomIdempotencyPolicy
BigtableTableAdminConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::bigtable_admin::
BigtableTableAdminConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
};