Skip to content

Commit ff0b180

Browse files
committed
impl(bigtable): remove deprecated ClientOptions
1 parent d6d86fe commit ff0b180

27 files changed

+65
-851
lines changed

doc/v3-migration-guide.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,60 @@ auto client = bigtable::Client(
9393
google::cloud::Options{}.set<google::cloud::GrpcNumChannelsOption>(4));
9494
```
9595

96+
#### `bigtable::CreateDefaultDataClient`
97+
98+
The deprecated `bigtable::CreateDefaultDataClient` function has been removed.
99+
Please use `bigtable::MakeDataClient` instead.
100+
101+
**Before:**
102+
```cpp
103+
auto client = bigtable::CreateDefaultDataClient(
104+
"my-project", "my-instance",
105+
bigtable::ClientOptions().set_connection_pool_size(4));
106+
```
107+
108+
**After:**
109+
```cpp
110+
auto client = bigtable::MakeDataClient(
111+
"my-project", "my-instance",
112+
google::cloud::Options{}.set<google::cloud::GrpcNumChannelsOption>(4));
113+
```
114+
115+
#### `bigtable::CreateDefaultAdminClient`
116+
117+
The deprecated `bigtable::CreateDefaultAdminClient` function has been removed.
118+
Please use `bigtable::MakeAdminClient` instead.
119+
120+
**Before:**
121+
```cpp
122+
auto client = bigtable::CreateDefaultAdminClient(
123+
"my-project", bigtable::ClientOptions().set_connection_pool_size(4));
124+
```
125+
126+
**After:**
127+
```cpp
128+
auto client = bigtable::MakeAdminClient(
129+
"my-project",
130+
google::cloud::Options{}.set<google::cloud::GrpcNumChannelsOption>(4));
131+
```
132+
133+
#### `bigtable::CreateDefaultInstanceAdminClient`
134+
135+
The deprecated `bigtable::CreateDefaultInstanceAdminClient` function has been
136+
removed. Please use `bigtable::MakeInstanceAdminClient` instead.
137+
138+
**Before:**
139+
```cpp
140+
auto client = bigtable::CreateDefaultInstanceAdminClient(
141+
"my-project", bigtable::ClientOptions().set_connection_pool_size(4));
142+
```
143+
144+
**After:**
145+
```cpp
146+
auto client = bigtable::MakeInstanceAdminClient(
147+
"my-project",
148+
google::cloud::Options{}.set<google::cloud::GrpcNumChannelsOption>(4));
149+
```
96150
### Pubsub
97151

98152
### Spanner

google/cloud/bigtable/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ add_library(
116116
cell.h
117117
client.cc
118118
client.h
119-
client_options.cc
120-
client_options.h
121119
cluster_config.cc
122120
cluster_config.h
123121
cluster_list_responses.h
@@ -452,7 +450,6 @@ if (BUILD_TESTING)
452450
bound_query_test.cc
453451
bytes_test.cc
454452
cell_test.cc
455-
client_options_test.cc
456453
client_test.cc
457454
cluster_config_test.cc
458455
column_family_test.cc

google/cloud/bigtable/admin_client.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ std::shared_ptr<AdminClient> MakeAdminClient(std::string project,
2828
new AdminClient(std::move(project), std::move(params)));
2929
}
3030

31-
std::shared_ptr<AdminClient> CreateDefaultAdminClient(std::string project,
32-
ClientOptions options) {
33-
return MakeAdminClient(std::move(project),
34-
internal::MakeOptions(std::move(options)));
35-
}
36-
3731
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
3832
} // namespace bigtable
3933
} // namespace cloud

google/cloud/bigtable/admin_client.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_CLIENT_H
1717

1818
#include "google/cloud/bigtable/admin/bigtable_table_admin_connection.h"
19-
#include "google/cloud/bigtable/client_options.h"
2019
#include "google/cloud/bigtable/internal/admin_client_params.h"
2120
#include "google/cloud/bigtable/version.h"
21+
#include "google/cloud/grpc_options.h"
2222
#include "google/cloud/options.h"
2323
#include <memory>
2424
#include <string>
@@ -65,16 +65,6 @@ class AdminClient final {
6565
std::shared_ptr<AdminClient> MakeAdminClient(std::string project,
6666
Options options = {});
6767

68-
/**
69-
* Create a new table admin client configured via @p options.
70-
*
71-
* @deprecated use the `MakeAdminClient` method which accepts
72-
* `google::cloud::Options` instead.
73-
*/
74-
GOOGLE_CLOUD_CPP_DEPRECATED("use `MakeAdminClient` instead")
75-
std::shared_ptr<AdminClient> CreateDefaultAdminClient(std::string project,
76-
ClientOptions options);
77-
7868
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
7969
} // namespace bigtable
8070
} // namespace cloud

google/cloud/bigtable/admin_client_test.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ namespace bigtable {
2121
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2222
namespace {
2323

24-
#include "google/cloud/internal/disable_deprecation_warnings.inc"
25-
26-
TEST(AdminClientTest, CreateDefaultClient) {
27-
auto admin_client = CreateDefaultAdminClient("test-project", {});
28-
ASSERT_TRUE(admin_client);
29-
EXPECT_EQ("test-project", admin_client->project());
30-
}
31-
32-
#include "google/cloud/internal/diagnostics_pop.inc"
33-
3424
TEST(AdminClientTest, MakeClient) {
3525
auto admin_client = MakeAdminClient("test-project");
3626
ASSERT_TRUE(admin_client);

google/cloud/bigtable/bigtable_client_unit_tests.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ bigtable_client_unit_tests = [
2424
"bound_query_test.cc",
2525
"bytes_test.cc",
2626
"cell_test.cc",
27-
"client_options_test.cc",
2827
"client_test.cc",
2928
"cluster_config_test.cc",
3029
"column_family_test.cc",

google/cloud/bigtable/client_options.cc

Lines changed: 0 additions & 83 deletions
This file was deleted.

google/cloud/bigtable/client_options.h

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)