Skip to content

Commit ef3b199

Browse files
authored
impl(bigtable): remove DataClient and it's usages (#15847)
* feat: remove DataClient and it's usages
1 parent 9791f83 commit ef3b199

File tree

68 files changed

+263
-9204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+263
-9204
lines changed
-106 KB
Binary file not shown.

doc/v3-migration-guide.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ for (auto& row : table.ReadRows(
105105
</details>
106106
107107
<details>
108+
108109
<summary>Removed <code>bigtable::AsyncRowReader<>::NO_ROWS_LIMIT</code>
109110
</summary>
110111
@@ -121,6 +122,19 @@ auto limit = google::cloud::bigtable::RowReader::NO_ROWS_LIMIT;
121122

122123
</details>
123124

125+
<details>
126+
<summary>Removed <code>bigtable::DataClient</code> and related functions</summary>
127+
128+
The `bigtable::DataClient` class and its associated factory functions (e.g.,
129+
`MakeDataClient`) have been removed. Applications should now use
130+
`bigtable::DataConnection` and `bigtable::MakeDataConnection()` instead. For
131+
detailed migration steps and examples, please refer to the official migration
132+
guide:
133+
134+
[Migrating from DataClient to DataConnection](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/migrating-from-dataclient)
135+
136+
</details>
137+
124138
### Pubsub
125139

126140
### Spanner

examples/gcs2cbt.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ int main(int argc, char* argv[]) try {
6060

6161
// Create a connection to Cloud Bigtable and an object to manipulate the
6262
// specific table used in this demo.
63-
cbt::Table table(cbt::MakeDataClient(options.project_id, options.instance_id),
64-
options.table_id);
63+
cbt::Table table(cbt::MakeDataConnection(),
64+
cbt::TableResource(options.project_id, options.instance_id,
65+
options.table_id));
6566
cbt::MutationBatcher batcher(table);
6667

6768
// How often do we print a progress marker ('.') in the reader thread.

google/cloud/bigtable/CMakeLists.txt

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ add_library(
122122
cluster_list_responses.h
123123
column_family.h
124124
completion_queue.h
125-
data_client.cc
126-
data_client.h
127125
data_connection.cc
128126
data_connection.h
129127
expr.cc
@@ -194,16 +192,6 @@ add_library(
194192
internal/defaults.h
195193
internal/google_bytes_traits.cc
196194
internal/google_bytes_traits.h
197-
internal/legacy_async_bulk_apply.cc
198-
internal/legacy_async_bulk_apply.h
199-
internal/legacy_async_row_reader.cc
200-
internal/legacy_async_row_reader.h
201-
internal/legacy_async_row_sampler.cc
202-
internal/legacy_async_row_sampler.h
203-
internal/legacy_row_reader.cc
204-
internal/legacy_row_reader.h
205-
internal/logging_data_client.cc
206-
internal/logging_data_client.h
207195
internal/logging_result_set_reader.cc
208196
internal/logging_result_set_reader.h
209197
internal/metrics.cc
@@ -402,11 +390,8 @@ if (BUILD_TESTING)
402390
testing/cleanup_stale_resources.h
403391
testing/embedded_server_test_fixture.cc
404392
testing/embedded_server_test_fixture.h
405-
testing/inprocess_data_client.cc
406-
testing/inprocess_data_client.h
407393
testing/mock_async_failing_rpc_factory.h
408394
testing/mock_bigtable_stub.h
409-
testing/mock_data_client.h
410395
testing/mock_mutate_rows_limiter.h
411396
testing/mock_mutate_rows_reader.h
412397
testing/mock_partial_result_set_reader.h
@@ -417,9 +402,7 @@ if (BUILD_TESTING)
417402
testing/random_names.cc
418403
testing/random_names.h
419404
testing/table_integration_test.cc
420-
testing/table_integration_test.h
421-
testing/table_test_fixture.cc
422-
testing/table_test_fixture.h)
405+
testing/table_integration_test.h)
423406
target_link_libraries(
424407
bigtable_client_testing
425408
PUBLIC google-cloud-cpp::bigtable
@@ -455,7 +438,6 @@ if (BUILD_TESTING)
455438
client_test.cc
456439
cluster_config_test.cc
457440
column_family_test.cc
458-
data_client_test.cc
459441
data_connection_test.cc
460442
expr_test.cc
461443
filters_test.cc
@@ -484,12 +466,6 @@ if (BUILD_TESTING)
484466
internal/default_row_reader_test.cc
485467
internal/defaults_test.cc
486468
internal/google_bytes_traits_test.cc
487-
internal/legacy_async_bulk_apply_test.cc
488-
internal/legacy_async_row_reader_test.cc
489-
internal/legacy_async_row_sampler_test.cc
490-
internal/legacy_bulk_mutator_test.cc
491-
internal/legacy_row_reader_test.cc
492-
internal/logging_data_client_test.cc
493469
internal/logging_result_set_reader_test.cc
494470
internal/metrics_test.cc
495471
internal/mutate_rows_limiter_test.cc
@@ -503,7 +479,6 @@ if (BUILD_TESTING)
503479
internal/retry_traits_test.cc
504480
internal/traced_row_reader_test.cc
505481
internal/tuple_utils_test.cc
506-
legacy_table_test.cc
507482
metadata_update_policy_test.cc
508483
mocks/mock_row_reader_test.cc
509484
mutation_batcher_test.cc
@@ -521,15 +496,8 @@ if (BUILD_TESTING)
521496
rpc_retry_policy_test.cc
522497
sql_statement_test.cc
523498
table_admin_test.cc
524-
table_apply_test.cc
525-
table_bulk_apply_test.cc
526-
table_check_and_mutate_row_test.cc
527499
table_config_test.cc
528-
table_readmodifywriterow_test.cc
529-
table_readrow_test.cc
530-
table_readrows_test.cc
531500
table_resource_test.cc
532-
table_sample_row_keys_test.cc
533501
table_test.cc
534502
testing/cleanup_stale_resources_test.cc
535503
testing/random_names_test.cc

google/cloud/bigtable/benchmarks/benchmark.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "google/cloud/bigtable/admin/bigtable_table_admin_client.h"
1717
#include "google/cloud/bigtable/benchmarks/random_mutation.h"
1818
#include "google/cloud/bigtable/resource_names.h"
19+
#include "google/cloud/grpc_options.h"
1920
#include "google/cloud/internal/background_threads_impl.h"
2021
#include "google/cloud/internal/getenv.h"
2122
#include "google/cloud/internal/make_status.h"

google/cloud/bigtable/benchmarks/embedded_server_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "google/cloud/bigtable/admin/bigtable_table_admin_client.h"
1717
#include "google/cloud/bigtable/resource_names.h"
1818
#include "google/cloud/bigtable/table.h"
19+
#include "google/cloud/grpc_options.h"
1920
#include "google/cloud/testing_util/status_matchers.h"
2021
#include <gmock/gmock.h>
2122
#include <thread>

google/cloud/bigtable/bigtable_client_testing.bzl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919
bigtable_client_testing_hdrs = [
2020
"testing/cleanup_stale_resources.h",
2121
"testing/embedded_server_test_fixture.h",
22-
"testing/inprocess_data_client.h",
2322
"testing/mock_async_failing_rpc_factory.h",
2423
"testing/mock_bigtable_stub.h",
25-
"testing/mock_data_client.h",
2624
"testing/mock_mutate_rows_limiter.h",
2725
"testing/mock_mutate_rows_reader.h",
2826
"testing/mock_partial_result_set_reader.h",
@@ -32,14 +30,11 @@ bigtable_client_testing_hdrs = [
3230
"testing/mock_sample_row_keys_reader.h",
3331
"testing/random_names.h",
3432
"testing/table_integration_test.h",
35-
"testing/table_test_fixture.h",
3633
]
3734

3835
bigtable_client_testing_srcs = [
3936
"testing/cleanup_stale_resources.cc",
4037
"testing/embedded_server_test_fixture.cc",
41-
"testing/inprocess_data_client.cc",
4238
"testing/random_names.cc",
4339
"testing/table_integration_test.cc",
44-
"testing/table_test_fixture.cc",
4540
]

google/cloud/bigtable/bigtable_client_unit_tests.bzl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ bigtable_client_unit_tests = [
2828
"client_test.cc",
2929
"cluster_config_test.cc",
3030
"column_family_test.cc",
31-
"data_client_test.cc",
3231
"data_connection_test.cc",
3332
"expr_test.cc",
3433
"filters_test.cc",
@@ -57,12 +56,6 @@ bigtable_client_unit_tests = [
5756
"internal/default_row_reader_test.cc",
5857
"internal/defaults_test.cc",
5958
"internal/google_bytes_traits_test.cc",
60-
"internal/legacy_async_bulk_apply_test.cc",
61-
"internal/legacy_async_row_reader_test.cc",
62-
"internal/legacy_async_row_sampler_test.cc",
63-
"internal/legacy_bulk_mutator_test.cc",
64-
"internal/legacy_row_reader_test.cc",
65-
"internal/logging_data_client_test.cc",
6659
"internal/logging_result_set_reader_test.cc",
6760
"internal/metrics_test.cc",
6861
"internal/mutate_rows_limiter_test.cc",
@@ -76,7 +69,6 @@ bigtable_client_unit_tests = [
7669
"internal/retry_traits_test.cc",
7770
"internal/traced_row_reader_test.cc",
7871
"internal/tuple_utils_test.cc",
79-
"legacy_table_test.cc",
8072
"metadata_update_policy_test.cc",
8173
"mocks/mock_row_reader_test.cc",
8274
"mutation_batcher_test.cc",
@@ -94,15 +86,8 @@ bigtable_client_unit_tests = [
9486
"rpc_retry_policy_test.cc",
9587
"sql_statement_test.cc",
9688
"table_admin_test.cc",
97-
"table_apply_test.cc",
98-
"table_bulk_apply_test.cc",
99-
"table_check_and_mutate_row_test.cc",
10089
"table_config_test.cc",
101-
"table_readmodifywriterow_test.cc",
102-
"table_readrow_test.cc",
103-
"table_readrows_test.cc",
10490
"table_resource_test.cc",
105-
"table_sample_row_keys_test.cc",
10691
"table_test.cc",
10792
"testing/cleanup_stale_resources_test.cc",
10893
"testing/random_names_test.cc",

0 commit comments

Comments
 (0)