From daf722d8b6b9e895c6eeb675f2c9cf809736db99 Mon Sep 17 00:00:00 2001 From: dbolduc Date: Tue, 21 Jun 2022 18:03:37 -0400 Subject: [PATCH 1/2] feat(bigtable): introduce `DataConnection` --- google/cloud/bigtable/CMakeLists.txt | 4 +- .../{internal => }/data_connection.cc | 88 +++++++++---------- .../bigtable/{internal => }/data_connection.h | 70 +++++++-------- .../bigtable/google_cloud_cpp_bigtable.bzl | 4 +- .../bigtable/internal/data_connection_impl.h | 4 +- .../bigtable/mocks/mock_data_connection.h | 4 +- google/cloud/bigtable/table.h | 14 +-- .../testing/table_integration_test.cc | 2 +- .../bigtable/testing/table_integration_test.h | 2 +- .../bigtable/tests/data_integration_test.cc | 6 +- .../table_sample_rows_integration_test.cc | 15 ++-- 11 files changed, 100 insertions(+), 113 deletions(-) rename google/cloud/bigtable/{internal => }/data_connection.cc (61%) rename google/cloud/bigtable/{internal => }/data_connection.h (64%) diff --git a/google/cloud/bigtable/CMakeLists.txt b/google/cloud/bigtable/CMakeLists.txt index 87acc6b445039..1caf7146b4812 100644 --- a/google/cloud/bigtable/CMakeLists.txt +++ b/google/cloud/bigtable/CMakeLists.txt @@ -127,6 +127,8 @@ add_library( completion_queue.h data_client.cc data_client.h + data_connection.cc + data_connection.h expr.cc expr.h filters.h @@ -177,8 +179,6 @@ add_library( internal/connection_refresh_state.h internal/convert_policies.cc internal/convert_policies.h - internal/data_connection.cc - internal/data_connection.h internal/data_connection_impl.cc internal/data_connection_impl.h internal/default_row_reader.cc diff --git a/google/cloud/bigtable/internal/data_connection.cc b/google/cloud/bigtable/data_connection.cc similarity index 61% rename from google/cloud/bigtable/internal/data_connection.cc rename to google/cloud/bigtable/data_connection.cc index cd52698bd4c23..7c162ff6a6fb2 100644 --- a/google/cloud/bigtable/internal/data_connection.cc +++ b/google/cloud/bigtable/data_connection.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "google/cloud/bigtable/internal/data_connection.h" +#include "google/cloud/bigtable/data_connection.h" #include "google/cloud/bigtable/internal/bigtable_stub_factory.h" #include "google/cloud/bigtable/internal/data_connection_impl.h" #include "google/cloud/bigtable/internal/defaults.h" @@ -25,16 +25,15 @@ namespace google { namespace cloud { -namespace bigtable_internal { +namespace bigtable { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -std::vector MakeUnimplementedFailedMutations( - std::size_t n) { - std::vector mutations; +std::vector MakeUnimplementedFailedMutations(std::size_t n) { + std::vector mutations; mutations.reserve(n); for (int i = 0; i != static_cast(n); ++i) { - mutations.emplace_back(bigtable::FailedMutation( + mutations.emplace_back(FailedMutation( Status(StatusCode::kUnimplemented, "not implemented"), i)); } return mutations; @@ -46,116 +45,111 @@ DataConnection::~DataConnection() = default; Status DataConnection::Apply( // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::string const&, std::string const&, bigtable::SingleRowMutation) { + std::string const&, std::string const&, SingleRowMutation) { return Status(StatusCode::kUnimplemented, "not implemented"); } future DataConnection::AsyncApply( // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::string const&, std::string const&, bigtable::SingleRowMutation) { + std::string const&, std::string const&, SingleRowMutation) { return make_ready_future( Status(StatusCode::kUnimplemented, "not implemented")); } -std::vector DataConnection::BulkApply( +std::vector DataConnection::BulkApply( // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::string const&, std::string const&, bigtable::BulkMutation mut) { + std::string const&, std::string const&, BulkMutation mut) { return MakeUnimplementedFailedMutations(mut.size()); } -future> DataConnection::AsyncBulkApply( +future> DataConnection::AsyncBulkApply( // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::string const&, std::string const&, bigtable::BulkMutation mut) { + std::string const&, std::string const&, BulkMutation mut) { return make_ready_future(MakeUnimplementedFailedMutations(mut.size())); } -bigtable::RowReader DataConnection::ReadRows( - std::string const&, std::string const&, +RowReader DataConnection::ReadRows( // NOLINTNEXTLINE(performance-unnecessary-value-param) - bigtable::RowSet, std::int64_t, bigtable::Filter) { - return MakeRowReader(std::make_shared( + std::string const&, std::string const&, RowSet, std::int64_t, Filter) { + return MakeRowReader(std::make_shared( Status(StatusCode::kUnimplemented, "not implemented"))); } -StatusOr> DataConnection::ReadRow( +StatusOr> DataConnection::ReadRow( // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::string const&, std::string const&, std::string, bigtable::Filter) { + std::string const&, std::string const&, std::string, Filter) { return Status(StatusCode::kUnimplemented, "not implemented"); } -StatusOr DataConnection::CheckAndMutateRow( - // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::string const&, std::string const&, std::string, bigtable::Filter, +StatusOr DataConnection::CheckAndMutateRow( + std::string const&, std::string const&, // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::vector, std::vector) { + std::string, Filter, std::vector, std::vector) { return Status(StatusCode::kUnimplemented, "not implemented"); } -future> -DataConnection::AsyncCheckAndMutateRow( - // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::string const&, std::string const&, std::string, bigtable::Filter, +future> DataConnection::AsyncCheckAndMutateRow( + std::string const&, std::string const&, // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::vector, std::vector) { - return make_ready_future>( + std::string, Filter, std::vector, std::vector) { + return make_ready_future>( Status(StatusCode::kUnimplemented, "not implemented")); } -StatusOr> DataConnection::SampleRows( +StatusOr> DataConnection::SampleRows( std::string const&, std::string const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } -future>> -DataConnection::AsyncSampleRows(std::string const&, std::string const&) { - return make_ready_future>>( +future>> DataConnection::AsyncSampleRows( + std::string const&, std::string const&) { + return make_ready_future>>( Status(StatusCode::kUnimplemented, "not implemented")); } -StatusOr DataConnection::ReadModifyWriteRow( +StatusOr DataConnection::ReadModifyWriteRow( // NOLINTNEXTLINE(performance-unnecessary-value-param) google::bigtable::v2::ReadModifyWriteRowRequest) { return Status(StatusCode::kUnimplemented, "not implemented"); } -future> DataConnection::AsyncReadModifyWriteRow( +future> DataConnection::AsyncReadModifyWriteRow( // NOLINTNEXTLINE(performance-unnecessary-value-param) google::bigtable::v2::ReadModifyWriteRowRequest) { - return make_ready_future>( + return make_ready_future>( Status(StatusCode::kUnimplemented, "not implemented")); } void DataConnection::AsyncReadRows( std::string const&, std::string const&, // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::function(bigtable::Row)>, - // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::function on_finish, bigtable::RowSet, std::int64_t, + std::function(Row)>, std::function on_finish, // NOLINTNEXTLINE(performance-unnecessary-value-param) - bigtable::Filter) { + RowSet, std::int64_t, Filter) { on_finish(Status(StatusCode::kUnimplemented, "not implemented")); } -future>> DataConnection::AsyncReadRow( +future>> DataConnection::AsyncReadRow( // NOLINTNEXTLINE(performance-unnecessary-value-param) - std::string const&, std::string const&, std::string, bigtable::Filter) { - return make_ready_future>>( + std::string const&, std::string const&, std::string, Filter) { + return make_ready_future>>( Status(StatusCode::kUnimplemented, "not implemented")); } std::shared_ptr MakeDataConnection(Options options) { google::cloud::internal::CheckExpectedOptions< - CommonOptionList, GrpcOptionList, bigtable::DataPolicyOptionList>( - options, __func__); + CommonOptionList, GrpcOptionList, DataPolicyOptionList>(options, + __func__); options = bigtable::internal::DefaultDataOptions(std::move(options)); - auto background = internal::MakeBackgroundThreadsFactory(options)(); + auto background = + google::cloud::internal::MakeBackgroundThreadsFactory(options)(); auto stub = bigtable_internal::CreateBigtableStub(background->cq(), options); return std::make_shared( std::move(background), std::move(stub), std::move(options)); } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal +} // namespace bigtable } // namespace cloud } // namespace google @@ -164,7 +158,7 @@ namespace cloud { namespace bigtable_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -std::shared_ptr MakeDataConnection( +std::shared_ptr MakeDataConnection( std::shared_ptr stub, Options options) { options = bigtable::internal::DefaultDataOptions(std::move(options)); auto background = internal::MakeBackgroundThreadsFactory(options)(); diff --git a/google/cloud/bigtable/internal/data_connection.h b/google/cloud/bigtable/data_connection.h similarity index 64% rename from google/cloud/bigtable/internal/data_connection.h rename to google/cloud/bigtable/data_connection.h index 7c4b67b8b2960..15000e3c7ca28 100644 --- a/google/cloud/bigtable/internal/data_connection.h +++ b/google/cloud/bigtable/data_connection.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_DATA_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_DATA_CONNECTION_H +#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CONNECTION_H +#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CONNECTION_H #include "google/cloud/bigtable/filters.h" #include "google/cloud/bigtable/internal/bigtable_stub.h" @@ -32,8 +32,7 @@ namespace google { namespace cloud { -// TODO(#8860) - Make this class public, when it is ready. -namespace bigtable_internal { +namespace bigtable { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN /** @@ -54,65 +53,60 @@ class DataConnection { virtual Options options() { return Options{}; } virtual Status Apply(std::string const& app_profile_id, - std::string const& table_name, - bigtable::SingleRowMutation mut); + std::string const& table_name, SingleRowMutation mut); virtual future AsyncApply(std::string const& app_profile_id, std::string const& table_name, - bigtable::SingleRowMutation mut); + SingleRowMutation mut); - virtual std::vector BulkApply( + virtual std::vector BulkApply( std::string const& app_profile_id, std::string const& table_name, - bigtable::BulkMutation mut); + BulkMutation mut); - virtual future> AsyncBulkApply( + virtual future> AsyncBulkApply( std::string const& app_profile_id, std::string const& table_name, - bigtable::BulkMutation mut); + BulkMutation mut); - virtual bigtable::RowReader ReadRows(std::string const& app_profile_id, - std::string const& table_name, - bigtable::RowSet row_set, - std::int64_t rows_limit, - bigtable::Filter filter); + virtual RowReader ReadRows(std::string const& app_profile_id, + std::string const& table_name, RowSet row_set, + std::int64_t rows_limit, Filter filter); - virtual StatusOr> ReadRow( + virtual StatusOr> ReadRow( std::string const& app_profile_id, std::string const& table_name, - std::string row_key, bigtable::Filter filter); + std::string row_key, Filter filter); - virtual StatusOr CheckAndMutateRow( + virtual StatusOr CheckAndMutateRow( std::string const& app_profile_id, std::string const& table_name, - std::string row_key, bigtable::Filter filter, - std::vector true_mutations, - std::vector false_mutations); + std::string row_key, Filter filter, std::vector true_mutations, + std::vector false_mutations); - virtual future> AsyncCheckAndMutateRow( + virtual future> AsyncCheckAndMutateRow( std::string const& app_profile_id, std::string const& table_name, - std::string row_key, bigtable::Filter filter, - std::vector true_mutations, - std::vector false_mutations); + std::string row_key, Filter filter, std::vector true_mutations, + std::vector false_mutations); - virtual StatusOr> SampleRows( + virtual StatusOr> SampleRows( std::string const& app_profile_id, std::string const& table_name); - virtual future>> AsyncSampleRows( + virtual future>> AsyncSampleRows( std::string const& app_profile_id, std::string const& table_name); - virtual StatusOr ReadModifyWriteRow( + virtual StatusOr ReadModifyWriteRow( google::bigtable::v2::ReadModifyWriteRowRequest request); - virtual future> AsyncReadModifyWriteRow( + virtual future> AsyncReadModifyWriteRow( google::bigtable::v2::ReadModifyWriteRowRequest request); virtual void AsyncReadRows(std::string const& app_profile_id, std::string const& table_name, - std::function(bigtable::Row)> on_row, + std::function(Row)> on_row, std::function on_finish, - bigtable::RowSet row_set, std::int64_t rows_limit, - bigtable::Filter filter); + RowSet row_set, std::int64_t rows_limit, + Filter filter); - virtual future>> AsyncReadRow( + virtual future>> AsyncReadRow( std::string const& app_profile_id, std::string const& table_name, - std::string row_key, bigtable::Filter filter); + std::string row_key, Filter filter); }; /** @@ -142,7 +136,7 @@ class DataConnection { std::shared_ptr MakeDataConnection(Options options = {}); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal +} // namespace bigtable } // namespace cloud } // namespace google @@ -151,7 +145,7 @@ namespace cloud { namespace bigtable_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -std::shared_ptr MakeDataConnection( +std::shared_ptr MakeDataConnection( std::shared_ptr stub, Options options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END @@ -159,4 +153,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_DATA_CONNECTION_H +#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CONNECTION_H diff --git a/google/cloud/bigtable/google_cloud_cpp_bigtable.bzl b/google/cloud/bigtable/google_cloud_cpp_bigtable.bzl index ee40feb8b662c..1c1d024b9dc65 100644 --- a/google/cloud/bigtable/google_cloud_cpp_bigtable.bzl +++ b/google/cloud/bigtable/google_cloud_cpp_bigtable.bzl @@ -51,6 +51,7 @@ google_cloud_cpp_bigtable_hdrs = [ "column_family.h", "completion_queue.h", "data_client.h", + "data_connection.h", "expr.h", "filters.h", "iam_binding.h", @@ -79,7 +80,6 @@ google_cloud_cpp_bigtable_hdrs = [ "internal/common_client.h", "internal/connection_refresh_state.h", "internal/convert_policies.h", - "internal/data_connection.h", "internal/data_connection_impl.h", "internal/default_row_reader.h", "internal/defaults.h", @@ -145,6 +145,7 @@ google_cloud_cpp_bigtable_srcs = [ "client_options.cc", "cluster_config.cc", "data_client.cc", + "data_connection.cc", "expr.cc", "iam_binding.cc", "iam_policy.cc", @@ -167,7 +168,6 @@ google_cloud_cpp_bigtable_srcs = [ "internal/bulk_mutator.cc", "internal/connection_refresh_state.cc", "internal/convert_policies.cc", - "internal/data_connection.cc", "internal/data_connection_impl.cc", "internal/default_row_reader.cc", "internal/defaults.cc", diff --git a/google/cloud/bigtable/internal/data_connection_impl.h b/google/cloud/bigtable/internal/data_connection_impl.h index add0755366c7b..579f71886fcfc 100644 --- a/google/cloud/bigtable/internal/data_connection_impl.h +++ b/google/cloud/bigtable/internal/data_connection_impl.h @@ -15,8 +15,8 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_DATA_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_DATA_CONNECTION_IMPL_H +#include "google/cloud/bigtable/data_connection.h" #include "google/cloud/bigtable/internal/bigtable_stub.h" -#include "google/cloud/bigtable/internal/data_connection.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" @@ -32,7 +32,7 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN bigtable::Row TransformReadModifyWriteRowResponse( google::bigtable::v2::ReadModifyWriteRowResponse response); -class DataConnectionImpl : public DataConnection { +class DataConnectionImpl : public bigtable::DataConnection { public: ~DataConnectionImpl() override = default; diff --git a/google/cloud/bigtable/mocks/mock_data_connection.h b/google/cloud/bigtable/mocks/mock_data_connection.h index b32dc9764c7ae..d72fe45e222d9 100644 --- a/google/cloud/bigtable/mocks/mock_data_connection.h +++ b/google/cloud/bigtable/mocks/mock_data_connection.h @@ -15,7 +15,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_MOCKS_MOCK_DATA_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_MOCKS_MOCK_DATA_CONNECTION_H -#include "google/cloud/bigtable/internal/data_connection.h" +#include "google/cloud/bigtable/data_connection.h" #include "google/cloud/version.h" #include @@ -34,7 +34,7 @@ namespace internal { * `bigtable::Table` with an instance of this class. Then use the Google Test * framework functions to program the behavior of this mock. */ -class MockDataConnection : public bigtable_internal::DataConnection { +class MockDataConnection : public bigtable::DataConnection { public: MOCK_METHOD(Options, options, (), (override)); diff --git a/google/cloud/bigtable/table.h b/google/cloud/bigtable/table.h index 5580ef84c97e2..411ea9bb3f1da 100644 --- a/google/cloud/bigtable/table.h +++ b/google/cloud/bigtable/table.h @@ -17,9 +17,9 @@ #include "google/cloud/bigtable/completion_queue.h" #include "google/cloud/bigtable/data_client.h" +#include "google/cloud/bigtable/data_connection.h" #include "google/cloud/bigtable/filters.h" #include "google/cloud/bigtable/idempotent_mutation_policy.h" -#include "google/cloud/bigtable/internal/data_connection.h" #include "google/cloud/bigtable/internal/defaults.h" #include "google/cloud/bigtable/internal/legacy_async_row_reader.h" #include "google/cloud/bigtable/mutation_branch.h" @@ -51,7 +51,7 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN // // TODO(#8860) - remove this when we make the `DataConnection` constructor // public. -bigtable::Table MakeTable(std::shared_ptr conn, +bigtable::Table MakeTable(std::shared_ptr conn, std::string project_id, std::string instance_id, std::string app_profile_id, std::string table_id, Options options = {}); @@ -952,9 +952,9 @@ class Table { private: friend Table bigtable_internal::MakeTable( - std::shared_ptr, std::string, - std::string, std::string, std::string, Options); - explicit Table(std::shared_ptr conn, + std::shared_ptr, std::string, std::string, + std::string, std::string, Options); + explicit Table(std::shared_ptr conn, std::string project_id, std::string instance_id, std::string app_profile_id, std::string table_id, Options options = {}) @@ -1040,7 +1040,7 @@ class Table { MetadataUpdatePolicy metadata_update_policy_; std::shared_ptr idempotent_mutation_policy_; std::shared_ptr background_threads_; - std::shared_ptr connection_; + std::shared_ptr connection_; Options options_; }; @@ -1049,7 +1049,7 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END namespace bigtable_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -inline bigtable::Table MakeTable(std::shared_ptr conn, +inline bigtable::Table MakeTable(std::shared_ptr conn, std::string project_id, std::string instance_id, std::string app_profile_id, diff --git a/google/cloud/bigtable/testing/table_integration_test.cc b/google/cloud/bigtable/testing/table_integration_test.cc index 2f51890518f9d..dc99892d7f3fc 100644 --- a/google/cloud/bigtable/testing/table_integration_test.cc +++ b/google/cloud/bigtable/testing/table_integration_test.cc @@ -112,7 +112,7 @@ void TableAdminTestEnvironment::TearDown() { } void TableIntegrationTest::SetUp() { - data_connection_ = bigtable_internal::MakeDataConnection(); + data_connection_ = MakeDataConnection(); data_client_ = bigtable::MakeDataClient(TableTestEnvironment::project_id(), TableTestEnvironment::instance_id()); diff --git a/google/cloud/bigtable/testing/table_integration_test.h b/google/cloud/bigtable/testing/table_integration_test.h index 1844e71b96191..36c48eae37f85 100644 --- a/google/cloud/bigtable/testing/table_integration_test.h +++ b/google/cloud/bigtable/testing/table_integration_test.h @@ -180,7 +180,7 @@ class TableIntegrationTest } std::shared_ptr data_client_; - std::shared_ptr data_connection_; + std::shared_ptr data_connection_; }; } // namespace testing diff --git a/google/cloud/bigtable/tests/data_integration_test.cc b/google/cloud/bigtable/tests/data_integration_test.cc index ce72975d98f47..04e022ab9d5ca 100644 --- a/google/cloud/bigtable/tests/data_integration_test.cc +++ b/google/cloud/bigtable/tests/data_integration_test.cc @@ -525,9 +525,9 @@ TEST_P(DataIntegrationTest, TableApplyWithLogging) { // parameter. auto make_table = [&](Options const& options) { if (GetParam() == "with-data-connection") { - auto conn = bigtable_internal::MakeDataConnection(options); - return MakeTable(std::move(conn), project_id(), instance_id(), "", - table_id); + auto conn = MakeDataConnection(options); + return bigtable_internal::MakeTable(std::move(conn), project_id(), + instance_id(), "", table_id); } auto data_client = MakeDataClient(project_id(), instance_id(), options); return Table(std::move(data_client), table_id); diff --git a/google/cloud/bigtable/tests/table_sample_rows_integration_test.cc b/google/cloud/bigtable/tests/table_sample_rows_integration_test.cc index b6edee7a11d66..2954e4a63f021 100644 --- a/google/cloud/bigtable/tests/table_sample_rows_integration_test.cc +++ b/google/cloud/bigtable/tests/table_sample_rows_integration_test.cc @@ -70,8 +70,7 @@ class SampleRowsIntegrationTest // Create kBatchSize * kBatchCount rows. Use a special client with tracing // disabled because it simply generates too much data. auto table = bigtable_internal::MakeTable( - bigtable_internal::MakeDataConnection( - Options{}.set({"rpc"})), + MakeDataConnection(Options{}.set({"rpc"})), TableTestEnvironment::project_id(), TableTestEnvironment::instance_id(), "", TableTestEnvironment::table_id()); @@ -107,17 +106,17 @@ class SampleRowsIntegrationTest TEST_F(SampleRowsIntegrationTest, SyncWithDataConnection) { auto table = bigtable_internal::MakeTable( - bigtable_internal::MakeDataConnection(), - TableTestEnvironment::project_id(), TableTestEnvironment::instance_id(), - "", TableTestEnvironment::table_id()); + MakeDataConnection(), TableTestEnvironment::project_id(), + TableTestEnvironment::instance_id(), "", + TableTestEnvironment::table_id()); VerifySamples(table.SampleRows()); }; TEST_F(SampleRowsIntegrationTest, AsyncWithDataConnection) { auto table = bigtable_internal::MakeTable( - bigtable_internal::MakeDataConnection(), - TableTestEnvironment::project_id(), TableTestEnvironment::instance_id(), - "", TableTestEnvironment::table_id()); + MakeDataConnection(), TableTestEnvironment::project_id(), + TableTestEnvironment::instance_id(), "", + TableTestEnvironment::table_id()); auto fut = table.AsyncSampleRows(); VerifySamples(fut.get()); }; From 78ffae1c5c31faa02c058a28931a7c44250d2375 Mon Sep 17 00:00:00 2001 From: dbolduc Date: Tue, 21 Jun 2022 19:01:28 -0400 Subject: [PATCH 2/2] fix publish-docs --- google/cloud/bigtable/data_connection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google/cloud/bigtable/data_connection.h b/google/cloud/bigtable/data_connection.h index 15000e3c7ca28..646fae78ed576 100644 --- a/google/cloud/bigtable/data_connection.h +++ b/google/cloud/bigtable/data_connection.h @@ -130,8 +130,8 @@ class DataConnection { * `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment and unexpected * options will be logged. * - * @param opts (optional) Configure the `DataConnection` created by this - * function. + * @param options (optional) Configure the `DataConnection` created by this + * function. */ std::shared_ptr MakeDataConnection(Options options = {});