This shows how to override the retry policies for bigquery_storage_v1::BigQueryReadClient:
.
set<google::cloud::bigquery_storage_v1::
BigQueryReadConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
BigQueryReadRetryPolicyOption>(
BigQueryReadLimitedErrorCountRetryPolicy(3)
.clone())
BigQueryReadBackoffPolicyOption>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
auto connection =
connection,
.
set<google::cloud::bigquery_storage_v1::
BigQueryReadRetryPolicyOption>(
.clone()));
Options & set(ValueTypeT< T > v)
BigQuery Read API.
Definition: bigquery_read_client.h:63
Definition: bigquery_read_client.h:32
std::shared_ptr< BigQueryReadConnection > MakeBigQueryReadConnection(Options options={})
A factory function to construct an object of type BigQueryReadConnection.
::google::cloud::internal::LimitedTimeRetryPolicy< bigquery_storage_v1_internal::BigQueryReadRetryTraits > BigQueryReadLimitedTimeRetryPolicy
Definition: bigquery_read_connection.h:43
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy
Assuming you have created a custom idempotency policy. Such as:
BigQueryReadConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::bigquery_storage_v1::
BigQueryReadConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
};