Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions doc/v3-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,121 @@ for (auto& row : table.ReadRows(

</details>

<details>
<summary>Removed <code>bigtable::ClientOptions</code>
</summary>
#### `bigtable::ClientOptions`

The deprecated `bigtable::ClientOptions` has been removed. Please use
`google::cloud::Options` instead.

The following table shows the mapping from `bigtable::ClientOptions` methods to
their `google::cloud::Options` equivalents:

| `bigtable::ClientOptions` method | `google::cloud::Options` equivalent |
| ----------------------------------- | ----------------------------------------------------------------------------------------------- |
| `(constructor)` | `google::cloud::Options{}` |
| `set_data_endpoint` | `google::cloud::EndpointOption` |
| `set_admin_endpoint` | `google::cloud::EndpointOption` |
| `set_connection_pool_name` | `google::cloud::GrpcChannelArgumentsOption` or`google::cloud::GrpcChannelArgumentsNativeOption` |
| `set_connection_pool_size` | `google::cloud::GrpcNumChannelsOption` |
| `SetCredentials` | `google::cloud::GrpcCredentialOption` |
| `set_channel_arguments` | `google::cloud::GrpcChannelArgumentsNativeOption` |
| `SetCompressionAlgorithm` | `google::cloud::GrpcChannelArgumentsNativeOption` |
| `SetGrpclbFallbackTimeout` | `google::cloud::GrpcChannelArgumentsNativeOption` |
| `SetUserAgentPrefix` | `google::cloud::UserAgentProductsOption` or`google::cloud::GrpcChannelArgumentsNativeOption` |
| `SetResourceQuota` | `google::cloud::GrpcChannelArgumentsNativeOption` |
| `SetMaxReceiveMessageSize` | `google::cloud::GrpcChannelArgumentsNativeOption` |
| `SetMaxSendMessageSize` | `google::cloud::GrpcChannelArgumentsNativeOption` |
| `SetLoadBalancingPolicyName` | `google::cloud::GrpcChannelArgumentsNativeOption` |
| `SetServiceConfigJSON` | `google::cloud::GrpcChannelArgumentsNativeOption` |
| `SetSslTargetNameOverride` | `google::cloud::GrpcChannelArgumentsNativeOption` |
| `enable_tracing`, `disable_tracing` | `google::cloud::LoggingComponentsOption` |
| `tracing_options` | `google::cloud::GrpcTracingOptionsOption` |
| `set_max_conn_refresh_period` | `bigtable::MaxConnectionRefreshOption` |
| `set_min_conn_refresh_period` | `bigtable::MinConnectionRefreshOption` |
| `set_background_thread_pool_size` | `google::cloud::GrpcBackgroundThreadPoolSizeOption` |
| `DisableBackgroundThreads` | `google::cloud::GrpcCompletionQueueOption` |

Example usage of the replacements can be found below.

**Before:**

```cpp
auto client = bigtable::Client(
bigtable::ClientOptions().set_connection_pool_size(4));
```

**After:**

```cpp
auto client = bigtable::Client(
google::cloud::Options{}.set<google::cloud::GrpcNumChannelsOption>(4));
```

#### `bigtable::CreateDefaultDataClient`

The deprecated `bigtable::CreateDefaultDataClient` function has been removed.
Please use `bigtable::MakeDataClient` instead.

**Before:**

```cpp
auto client = bigtable::CreateDefaultDataClient(
"my-project", "my-instance",
bigtable::ClientOptions().set_connection_pool_size(4));
```

**After:**

```cpp
auto client = bigtable::MakeDataClient(
"my-project", "my-instance",
google::cloud::Options{}.set<google::cloud::GrpcNumChannelsOption>(4));
```

#### `bigtable::CreateDefaultAdminClient`

The deprecated `bigtable::CreateDefaultAdminClient` function has been removed.
Please use `bigtable::MakeAdminClient` instead.

**Before:**

```cpp
auto client = bigtable::CreateDefaultAdminClient(
"my-project", bigtable::ClientOptions().set_connection_pool_size(4));
```

**After:**

```cpp
auto client = bigtable::MakeAdminClient(
"my-project",
google::cloud::Options{}.set<google::cloud::GrpcNumChannelsOption>(4));
```

#### `bigtable::CreateDefaultInstanceAdminClient`

The deprecated `bigtable::CreateDefaultInstanceAdminClient` function has been
removed. Please use `bigtable::MakeInstanceAdminClient` instead.

**Before:**

```cpp
auto client = bigtable::CreateDefaultInstanceAdminClient(
"my-project", bigtable::ClientOptions().set_connection_pool_size(4));
```

**After:**

```cpp
auto client = bigtable::MakeInstanceAdminClient(
"my-project",
google::cloud::Options{}.set<google::cloud::GrpcNumChannelsOption>(4));
```

</details>

### Pubsub

### Spanner
Expand Down
3 changes: 0 additions & 3 deletions google/cloud/bigtable/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ add_library(
cell.h
client.cc
client.h
client_options.cc
client_options.h
cluster_config.cc
cluster_config.h
cluster_list_responses.h
Expand Down Expand Up @@ -452,7 +450,6 @@ if (BUILD_TESTING)
bound_query_test.cc
bytes_test.cc
cell_test.cc
client_options_test.cc
client_test.cc
cluster_config_test.cc
column_family_test.cc
Expand Down
6 changes: 0 additions & 6 deletions google/cloud/bigtable/admin_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ std::shared_ptr<AdminClient> MakeAdminClient(std::string project,
new AdminClient(std::move(project), std::move(params)));
}

std::shared_ptr<AdminClient> CreateDefaultAdminClient(std::string project,
ClientOptions options) {
return MakeAdminClient(std::move(project),
internal::MakeOptions(std::move(options)));
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
} // namespace bigtable
} // namespace cloud
Expand Down
12 changes: 1 addition & 11 deletions google/cloud/bigtable/admin_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_CLIENT_H

#include "google/cloud/bigtable/admin/bigtable_table_admin_connection.h"
#include "google/cloud/bigtable/client_options.h"
#include "google/cloud/bigtable/internal/admin_client_params.h"
#include "google/cloud/bigtable/version.h"
#include "google/cloud/grpc_options.h"
#include "google/cloud/options.h"
#include <memory>
#include <string>
Expand Down Expand Up @@ -65,16 +65,6 @@ class AdminClient final {
std::shared_ptr<AdminClient> MakeAdminClient(std::string project,
Options options = {});

/**
* Create a new table admin client configured via @p options.
*
* @deprecated use the `MakeAdminClient` method which accepts
* `google::cloud::Options` instead.
*/
GOOGLE_CLOUD_CPP_DEPRECATED("use `MakeAdminClient` instead")
std::shared_ptr<AdminClient> CreateDefaultAdminClient(std::string project,
ClientOptions options);

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
} // namespace bigtable
} // namespace cloud
Expand Down
10 changes: 0 additions & 10 deletions google/cloud/bigtable/admin_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ namespace bigtable {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
namespace {

#include "google/cloud/internal/disable_deprecation_warnings.inc"

TEST(AdminClientTest, CreateDefaultClient) {
auto admin_client = CreateDefaultAdminClient("test-project", {});
ASSERT_TRUE(admin_client);
EXPECT_EQ("test-project", admin_client->project());
}

#include "google/cloud/internal/diagnostics_pop.inc"

TEST(AdminClientTest, MakeClient) {
auto admin_client = MakeAdminClient("test-project");
ASSERT_TRUE(admin_client);
Expand Down
1 change: 0 additions & 1 deletion google/cloud/bigtable/bigtable_client_unit_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ bigtable_client_unit_tests = [
"bound_query_test.cc",
"bytes_test.cc",
"cell_test.cc",
"client_options_test.cc",
"client_test.cc",
"cluster_config_test.cc",
"column_family_test.cc",
Expand Down
83 changes: 0 additions & 83 deletions google/cloud/bigtable/client_options.cc

This file was deleted.

Loading