From ee3f53e4bff32a60837c377f425ba4256f76c0c5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 31 May 2022 10:34:27 -0400 Subject: [PATCH 01/23] chore(main): release 2.8.1-SNAPSHOT (#1269) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-cloud-bigtable-bom/pom.xml | 16 ++++++++-------- google-cloud-bigtable-deps-bom/pom.xml | 2 +- google-cloud-bigtable-emulator-core/pom.xml | 4 ++-- google-cloud-bigtable-emulator/pom.xml | 10 +++++----- google-cloud-bigtable-stats/pom.xml | 6 +++--- google-cloud-bigtable/pom.xml | 10 +++++----- .../java/com/google/cloud/bigtable/Version.java | 2 +- grpc-google-cloud-bigtable-admin-v2/pom.xml | 8 ++++---- grpc-google-cloud-bigtable-v2/pom.xml | 8 ++++---- pom.xml | 12 ++++++------ proto-google-cloud-bigtable-admin-v2/pom.xml | 8 ++++---- proto-google-cloud-bigtable-v2/pom.xml | 8 ++++---- samples/snapshot/pom.xml | 2 +- versions.txt | 14 +++++++------- 14 files changed, 55 insertions(+), 55 deletions(-) diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml index 231cb5a713..c43f462047 100644 --- a/google-cloud-bigtable-bom/pom.xml +++ b/google-cloud-bigtable-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigtable-bom - 2.8.0 + 2.8.1-SNAPSHOT pom com.google.cloud @@ -62,37 +62,37 @@ com.google.cloud google-cloud-bigtable - 2.8.0 + 2.8.1-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator - 0.145.0 + 0.145.1-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator-core - 0.145.0 + 0.145.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.8.0 + 2.8.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.8.0 + 2.8.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.8.0 + 2.8.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.8.0 + 2.8.1-SNAPSHOT diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml index cf97385b7b..c00a533904 100644 --- a/google-cloud-bigtable-deps-bom/pom.xml +++ b/google-cloud-bigtable-deps-bom/pom.xml @@ -12,7 +12,7 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.0 + 2.8.1-SNAPSHOT pom diff --git a/google-cloud-bigtable-emulator-core/pom.xml b/google-cloud-bigtable-emulator-core/pom.xml index 82318f9a68..1f2ac127ca 100644 --- a/google-cloud-bigtable-emulator-core/pom.xml +++ b/google-cloud-bigtable-emulator-core/pom.xml @@ -7,11 +7,11 @@ google-cloud-bigtable-parent com.google.cloud - 2.8.0 + 2.8.1-SNAPSHOT google-cloud-bigtable-emulator-core - 0.145.0 + 0.145.1-SNAPSHOT A Java wrapper for the Cloud Bigtable emulator. diff --git a/google-cloud-bigtable-emulator/pom.xml b/google-cloud-bigtable-emulator/pom.xml index b0338106bd..b0c75bc3d8 100644 --- a/google-cloud-bigtable-emulator/pom.xml +++ b/google-cloud-bigtable-emulator/pom.xml @@ -5,7 +5,7 @@ 4.0.0 google-cloud-bigtable-emulator - 0.145.0 + 0.145.1-SNAPSHOT Google Cloud Java - Bigtable Emulator https://github.com/googleapis/java-bigtable @@ -14,7 +14,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.8.0 + 2.8.1-SNAPSHOT scm:git:git@github.com:googleapis/java-bigtable.git @@ -81,14 +81,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import @@ -99,7 +99,7 @@ com.google.cloud google-cloud-bigtable-emulator-core - 0.145.0 + 0.145.1-SNAPSHOT diff --git a/google-cloud-bigtable-stats/pom.xml b/google-cloud-bigtable-stats/pom.xml index c47ae85703..6f9d0a49e3 100644 --- a/google-cloud-bigtable-stats/pom.xml +++ b/google-cloud-bigtable-stats/pom.xml @@ -5,7 +5,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.8.0 + 2.8.1-SNAPSHOT 4.0.0 @@ -13,7 +13,7 @@ through Stackdriver. Built-in metrics will be implemented with shaded OpenCensus so it won't interfere with customer's application metrics. --> google-cloud-bigtable-stats - 2.8.0 + 2.8.1-SNAPSHOT Experimental project to shade OpenCensus dependencies. @@ -21,7 +21,7 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 45e29e80ee..0a6c973c59 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-bigtable - 2.8.0 + 2.8.1-SNAPSHOT jar Google Cloud Bigtable https://github.com/googleapis/java-bigtable @@ -12,11 +12,11 @@ com.google.cloud google-cloud-bigtable-parent - 2.8.0 + 2.8.1-SNAPSHOT - 2.8.0 + 2.8.1-SNAPSHOT google-cloud-bigtable @@ -43,14 +43,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java index d3e3147498..7409f2d556 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java @@ -20,6 +20,6 @@ @InternalApi("For internal use only") public final class Version { // {x-version-update-start:google-cloud-bigtable:current} - public static String VERSION = "2.8.0"; + public static String VERSION = "2.8.1-SNAPSHOT"; // {x-version-update-end} } diff --git a/grpc-google-cloud-bigtable-admin-v2/pom.xml b/grpc-google-cloud-bigtable-admin-v2/pom.xml index 38ca24d893..bac7da3855 100644 --- a/grpc-google-cloud-bigtable-admin-v2/pom.xml +++ b/grpc-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.8.0 + 2.8.1-SNAPSHOT grpc-google-cloud-bigtable-admin-v2 GRPC library for grpc-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.8.0 + 2.8.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import diff --git a/grpc-google-cloud-bigtable-v2/pom.xml b/grpc-google-cloud-bigtable-v2/pom.xml index 3e63d98638..25605a7072 100644 --- a/grpc-google-cloud-bigtable-v2/pom.xml +++ b/grpc-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.8.0 + 2.8.1-SNAPSHOT grpc-google-cloud-bigtable-v2 GRPC library for grpc-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.8.0 + 2.8.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import diff --git a/pom.xml b/pom.xml index b2335ea9d3..76b36cd72b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ google-cloud-bigtable-parent pom - 2.8.0 + 2.8.1-SNAPSHOT Google Cloud Bigtable Parent https://github.com/googleapis/java-bigtable @@ -152,27 +152,27 @@ com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.8.0 + 2.8.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.8.0 + 2.8.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.8.0 + 2.8.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.8.0 + 2.8.1-SNAPSHOT com.google.cloud google-cloud-bigtable - 2.8.0 + 2.8.1-SNAPSHOT diff --git a/proto-google-cloud-bigtable-admin-v2/pom.xml b/proto-google-cloud-bigtable-admin-v2/pom.xml index 35d0008618..51bd17abe3 100644 --- a/proto-google-cloud-bigtable-admin-v2/pom.xml +++ b/proto-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.8.0 + 2.8.1-SNAPSHOT proto-google-cloud-bigtable-admin-v2 PROTO library for proto-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.8.0 + 2.8.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import diff --git a/proto-google-cloud-bigtable-v2/pom.xml b/proto-google-cloud-bigtable-v2/pom.xml index cf7e5cb736..362a6e89ff 100644 --- a/proto-google-cloud-bigtable-v2/pom.xml +++ b/proto-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.8.0 + 2.8.1-SNAPSHOT proto-google-cloud-bigtable-v2 PROTO library for proto-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.8.0 + 2.8.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.8.0 + 2.8.1-SNAPSHOT pom import diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 83f70ac2c3..6ef2c48ae7 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigtable - 2.8.0 + 2.8.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index 91ce3500f4..2bcd3fb41d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -google-cloud-bigtable:2.8.0:2.8.0 -grpc-google-cloud-bigtable-admin-v2:2.8.0:2.8.0 -grpc-google-cloud-bigtable-v2:2.8.0:2.8.0 -proto-google-cloud-bigtable-admin-v2:2.8.0:2.8.0 -proto-google-cloud-bigtable-v2:2.8.0:2.8.0 -google-cloud-bigtable-emulator:0.145.0:0.145.0 -google-cloud-bigtable-emulator-core:2.8.0:2.8.0 +google-cloud-bigtable:2.8.0:2.8.1-SNAPSHOT +grpc-google-cloud-bigtable-admin-v2:2.8.0:2.8.1-SNAPSHOT +grpc-google-cloud-bigtable-v2:2.8.0:2.8.1-SNAPSHOT +proto-google-cloud-bigtable-admin-v2:2.8.0:2.8.1-SNAPSHOT +proto-google-cloud-bigtable-v2:2.8.0:2.8.1-SNAPSHOT +google-cloud-bigtable-emulator:0.145.0:0.145.1-SNAPSHOT +google-cloud-bigtable-emulator-core:2.8.0:2.8.1-SNAPSHOT From 4c4bf60a4d9f44e8c568b5df512f537edf1563b3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 31 May 2022 16:36:35 +0200 Subject: [PATCH 02/23] test(deps): update dependency org.mockito:mockito-core to v4.6.0 (#1268) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 76b36cd72b..3057799f26 100644 --- a/pom.xml +++ b/pom.xml @@ -206,7 +206,7 @@ org.mockito mockito-core - 4.5.1 + 4.6.0 From 5b860bbb788fb1ec2f590a38b95424cdfe72c05c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 31 May 2022 10:37:01 -0400 Subject: [PATCH 03/23] chore(deps): upgrade gapic-generator-java to 2.8.0 and update gax-java to 2.18.1 (#1260) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: remove unused imports PiperOrigin-RevId: 450372109 Source-Link: https://github.com/googleapis/googleapis/commit/942691f8dcf3e521be35d909de9bba3239feb471 Source-Link: https://github.com/googleapis/googleapis-gen/commit/609a36966c40f726fd0dc71e953dc83f8e52fef1 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjA5YTM2OTY2YzQwZjcyNmZkMGRjNzFlOTUzZGM4M2Y4ZTUyZmVmMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore(deps): upgrade gapic-generator-java to 2.8.0 and update gax-java to 2.18.1 PiperOrigin-RevId: 450543911 Source-Link: https://github.com/googleapis/googleapis/commit/55283447ab72f10b6c2571d770af0498b593e84f Source-Link: https://github.com/googleapis/googleapis-gen/commit/9f6775cab1958982b88967a43e5e806af0f135db Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWY2Nzc1Y2FiMTk1ODk4MmI4ODk2N2E0M2U1ZTgwNmFmMGYxMzVkYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../v2/BaseBigtableInstanceAdminClient.java | 4 - .../v2/BaseBigtableTableAdminClient.java | 4 - .../BigtableInstanceAdminStubSettings.java | 1 - .../stub/BigtableTableAdminStubSettings.java | 1 - .../data/v2/stub/BigtableStubSettings.java | 1 - .../google/bigtable/admin/v2/CommonProto.java | 28 ++- .../bigtable/admin/v2/InstanceProto.java | 157 +++++++------- .../google/bigtable/admin/v2/TableProto.java | 197 +++++++++--------- .../google/bigtable/admin/v2/common.proto | 1 - .../google/bigtable/admin/v2/instance.proto | 1 - .../google/bigtable/admin/v2/table.proto | 1 - 11 files changed, 187 insertions(+), 209 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java index 55faabbf61..6f210b2a8c 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java @@ -18,7 +18,6 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.longrunning.OperationFuture; @@ -109,7 +108,6 @@ public static final BaseBigtableInstanceAdminClient create( * Constructs an instance of BaseBigtableInstanceAdminClient, using the given stub for making * calls. This is for advanced usage - prefer using create(BaseBigtableInstanceAdminSettings). */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final BaseBigtableInstanceAdminClient create(BigtableInstanceAdminStub stub) { return new BaseBigtableInstanceAdminClient(stub); } @@ -126,7 +124,6 @@ protected BaseBigtableInstanceAdminClient(BaseBigtableInstanceAdminSettings sett this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected BaseBigtableInstanceAdminClient(BigtableInstanceAdminStub stub) { this.settings = null; this.stub = stub; @@ -137,7 +134,6 @@ public final BaseBigtableInstanceAdminSettings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public BigtableInstanceAdminStub getStub() { return stub; } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java index f742e3f8fe..71d1d4ab75 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java @@ -18,7 +18,6 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.longrunning.OperationFuture; @@ -109,7 +108,6 @@ public static final BaseBigtableTableAdminClient create(BaseBigtableTableAdminSe * Constructs an instance of BaseBigtableTableAdminClient, using the given stub for making calls. * This is for advanced usage - prefer using create(BaseBigtableTableAdminSettings). */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final BaseBigtableTableAdminClient create(BigtableTableAdminStub stub) { return new BaseBigtableTableAdminClient(stub); } @@ -126,7 +124,6 @@ protected BaseBigtableTableAdminClient(BaseBigtableTableAdminSettings settings) this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected BaseBigtableTableAdminClient(BigtableTableAdminStub stub) { this.settings = null; this.stub = stub; @@ -137,7 +134,6 @@ public final BaseBigtableTableAdminSettings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public BigtableTableAdminStub getStub() { return stub; } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java index 4a28d81884..5d6102f321 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java @@ -442,7 +442,6 @@ public UnaryCallSettings setIamPolicySettings() { return listHotTabletsSettings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public BigtableInstanceAdminStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java index 6f75cb0311..5e6c717684 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java @@ -482,7 +482,6 @@ public UnaryCallSettings setIamPolicySettings() { return testIamPermissionsSettings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public BigtableTableAdminStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java index 1ed1141a6d..2c12935b45 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java @@ -122,7 +122,6 @@ public UnaryCallSettings pingAndWarmSet return readModifyWriteRowSettings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public BigtableStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CommonProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CommonProto.java index 933e2ab2a4..e51426737e 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CommonProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CommonProto.java @@ -41,25 +41,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n%google/bigtable/admin/v2/common.proto\022" - + "\030google.bigtable.admin.v2\032\034google/api/an" - + "notations.proto\032\037google/protobuf/timesta" - + "mp.proto\"\213\001\n\021OperationProgress\022\030\n\020progre" - + "ss_percent\030\001 \001(\005\022.\n\nstart_time\030\002 \001(\0132\032.g" - + "oogle.protobuf.Timestamp\022,\n\010end_time\030\003 \001" - + "(\0132\032.google.protobuf.Timestamp*=\n\013Storag" - + "eType\022\034\n\030STORAGE_TYPE_UNSPECIFIED\020\000\022\007\n\003S" - + "SD\020\001\022\007\n\003HDD\020\002B\323\001\n\034com.google.bigtable.ad" - + "min.v2B\013CommonProtoP\001Z=google.golang.org" - + "/genproto/googleapis/bigtable/admin/v2;a" - + "dmin\252\002\036Google.Cloud.Bigtable.Admin.V2\312\002\036" - + "Google\\Cloud\\Bigtable\\Admin\\V2\352\002\"Google:" - + ":Cloud::Bigtable::Admin::V2b\006proto3" + + "\030google.bigtable.admin.v2\032\037google/protob" + + "uf/timestamp.proto\"\213\001\n\021OperationProgress" + + "\022\030\n\020progress_percent\030\001 \001(\005\022.\n\nstart_time" + + "\030\002 \001(\0132\032.google.protobuf.Timestamp\022,\n\010en" + + "d_time\030\003 \001(\0132\032.google.protobuf.Timestamp" + + "*=\n\013StorageType\022\034\n\030STORAGE_TYPE_UNSPECIF" + + "IED\020\000\022\007\n\003SSD\020\001\022\007\n\003HDD\020\002B\323\001\n\034com.google.b" + + "igtable.admin.v2B\013CommonProtoP\001Z=google." + + "golang.org/genproto/googleapis/bigtable/" + + "admin/v2;admin\252\002\036Google.Cloud.Bigtable.A" + + "dmin.V2\312\002\036Google\\Cloud\\Bigtable\\Admin\\V2" + + "\352\002\"Google::Cloud::Bigtable::Admin::V2b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_bigtable_admin_v2_OperationProgress_descriptor = @@ -70,7 +69,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ProgressPercent", "StartTime", "EndTime", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java index c09c827040..a93744b0a9 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java @@ -85,90 +85,88 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\'google/bigtable/admin/v2/instance.prot" - + "o\022\030google.bigtable.admin.v2\032\034google/api/" - + "annotations.proto\032\037google/api/field_beha" - + "vior.proto\032\031google/api/resource.proto\032%g" - + "oogle/bigtable/admin/v2/common.proto\032\037go" - + "ogle/protobuf/timestamp.proto\"\223\004\n\010Instan" - + "ce\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003" - + "\340A\002\0227\n\005state\030\003 \001(\0162(.google.bigtable.adm" - + "in.v2.Instance.State\0225\n\004type\030\004 \001(\0162\'.goo" - + "gle.bigtable.admin.v2.Instance.Type\022>\n\006l" - + "abels\030\005 \003(\0132..google.bigtable.admin.v2.I" - + "nstance.LabelsEntry\0224\n\013create_time\030\007 \001(\013" - + "2\032.google.protobuf.TimestampB\003\340A\003\032-\n\013Lab" - + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - + "\"5\n\005State\022\023\n\017STATE_NOT_KNOWN\020\000\022\t\n\005READY\020" - + "\001\022\014\n\010CREATING\020\002\"=\n\004Type\022\024\n\020TYPE_UNSPECIF" - + "IED\020\000\022\016\n\nPRODUCTION\020\001\022\017\n\013DEVELOPMENT\020\002:S" - + "\352AP\n%bigtableadmin.googleapis.com/Instan" - + "ce\022\'projects/{project}/instances/{instan" - + "ce}\"5\n\022AutoscalingTargets\022\037\n\027cpu_utiliza" - + "tion_percent\030\002 \001(\005\"O\n\021AutoscalingLimits\022" - + "\034\n\017min_serve_nodes\030\001 \001(\005B\003\340A\002\022\034\n\017max_ser" - + "ve_nodes\030\002 \001(\005B\003\340A\002\"\321\007\n\007Cluster\022\014\n\004name\030" - + "\001 \001(\t\022;\n\010location\030\002 \001(\tB)\340A\005\372A#\n!locatio" - + "ns.googleapis.com/Location\022;\n\005state\030\003 \001(" - + "\0162\'.google.bigtable.admin.v2.Cluster.Sta" - + "teB\003\340A\003\022\023\n\013serve_nodes\030\004 \001(\005\022I\n\016cluster_" - + "config\030\007 \001(\0132/.google.bigtable.admin.v2." - + "Cluster.ClusterConfigH\000\022H\n\024default_stora" - + "ge_type\030\005 \001(\0162%.google.bigtable.admin.v2" - + ".StorageTypeB\003\340A\005\022R\n\021encryption_config\030\006" - + " \001(\01322.google.bigtable.admin.v2.Cluster." - + "EncryptionConfigB\003\340A\005\032\270\001\n\030ClusterAutosca" - + "lingConfig\022L\n\022autoscaling_limits\030\001 \001(\0132+" - + ".google.bigtable.admin.v2.AutoscalingLim" - + "itsB\003\340A\002\022N\n\023autoscaling_targets\030\002 \001(\0132,." - + "google.bigtable.admin.v2.AutoscalingTarg" - + "etsB\003\340A\002\032o\n\rClusterConfig\022^\n\032cluster_aut" - + "oscaling_config\030\001 \001(\0132:.google.bigtable." - + "admin.v2.Cluster.ClusterAutoscalingConfi" - + "g\032P\n\020EncryptionConfig\022<\n\014kms_key_name\030\001 " - + "\001(\tB&\372A#\n!cloudkms.googleapis.com/Crypto" - + "Key\"Q\n\005State\022\023\n\017STATE_NOT_KNOWN\020\000\022\t\n\005REA" - + "DY\020\001\022\014\n\010CREATING\020\002\022\014\n\010RESIZING\020\003\022\014\n\010DISA" - + "BLED\020\004:e\352Ab\n$bigtableadmin.googleapis.co" - + "m/Cluster\022:projects/{project}/instances/" - + "{instance}/clusters/{cluster}B\010\n\006config\"" - + "\210\004\n\nAppProfile\022\014\n\004name\030\001 \001(\t\022\014\n\004etag\030\002 \001" - + "(\t\022\023\n\013description\030\003 \001(\t\022g\n\035multi_cluster" - + "_routing_use_any\030\005 \001(\0132>.google.bigtable" - + ".admin.v2.AppProfile.MultiClusterRouting" - + "UseAnyH\000\022[\n\026single_cluster_routing\030\006 \001(\013" - + "29.google.bigtable.admin.v2.AppProfile.S" - + "ingleClusterRoutingH\000\0320\n\031MultiClusterRou" - + "tingUseAny\022\023\n\013cluster_ids\030\001 \003(\t\032N\n\024Singl" - + "eClusterRouting\022\022\n\ncluster_id\030\001 \001(\t\022\"\n\032a" - + "llow_transactional_writes\030\002 \001(\010:o\352Al\n\'bi" - + "gtableadmin.googleapis.com/AppProfile\022Ap" - + "rojects/{project}/instances/{instance}/a" - + "ppProfiles/{app_profile}B\020\n\016routing_poli" - + "cy\"\210\003\n\tHotTablet\022\014\n\004name\030\001 \001(\t\022;\n\ntable_" - + "name\030\002 \001(\tB\'\372A$\n\"bigtableadmin.googleapi" - + "s.com/Table\0223\n\nstart_time\030\003 \001(\0132\032.google" - + ".protobuf.TimestampB\003\340A\003\0221\n\010end_time\030\004 \001" - + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022\021\n\ts" - + "tart_key\030\005 \001(\t\022\017\n\007end_key\030\006 \001(\t\022#\n\026node_" - + "cpu_usage_percent\030\007 \001(\002B\003\340A\003:\177\352A|\n&bigta" - + "bleadmin.googleapis.com/HotTablet\022Rproje" - + "cts/{project}/instances/{instance}/clust" - + "ers/{cluster}/hotTablets/{hot_tablet}B\320\002" - + "\n\034com.google.bigtable.admin.v2B\rInstance" - + "ProtoP\001Z=google.golang.org/genproto/goog" - + "leapis/bigtable/admin/v2;admin\252\002\036Google." - + "Cloud.Bigtable.Admin.V2\312\002\036Google\\Cloud\\B" - + "igtable\\Admin\\V2\352\002\"Google::Cloud::Bigtab" - + "le::Admin::V2\352Ax\n!cloudkms.googleapis.co" - + "m/CryptoKey\022Sprojects/{project}/location" - + "s/{location}/keyRings/{key_ring}/cryptoK" - + "eys/{crypto_key}b\006proto3" + + "o\022\030google.bigtable.admin.v2\032\037google/api/" + + "field_behavior.proto\032\031google/api/resourc" + + "e.proto\032%google/bigtable/admin/v2/common" + + ".proto\032\037google/protobuf/timestamp.proto\"" + + "\223\004\n\010Instance\022\014\n\004name\030\001 \001(\t\022\031\n\014display_na" + + "me\030\002 \001(\tB\003\340A\002\0227\n\005state\030\003 \001(\0162(.google.bi" + + "gtable.admin.v2.Instance.State\0225\n\004type\030\004" + + " \001(\0162\'.google.bigtable.admin.v2.Instance" + + ".Type\022>\n\006labels\030\005 \003(\0132..google.bigtable." + + "admin.v2.Instance.LabelsEntry\0224\n\013create_" + + "time\030\007 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001\"5\n\005State\022\023\n\017STATE_NOT_KNOWN\020\000" + + "\022\t\n\005READY\020\001\022\014\n\010CREATING\020\002\"=\n\004Type\022\024\n\020TYP" + + "E_UNSPECIFIED\020\000\022\016\n\nPRODUCTION\020\001\022\017\n\013DEVEL" + + "OPMENT\020\002:S\352AP\n%bigtableadmin.googleapis." + + "com/Instance\022\'projects/{project}/instanc" + + "es/{instance}\"5\n\022AutoscalingTargets\022\037\n\027c" + + "pu_utilization_percent\030\002 \001(\005\"O\n\021Autoscal" + + "ingLimits\022\034\n\017min_serve_nodes\030\001 \001(\005B\003\340A\002\022" + + "\034\n\017max_serve_nodes\030\002 \001(\005B\003\340A\002\"\321\007\n\007Cluste" + + "r\022\014\n\004name\030\001 \001(\t\022;\n\010location\030\002 \001(\tB)\340A\005\372A" + + "#\n!locations.googleapis.com/Location\022;\n\005" + + "state\030\003 \001(\0162\'.google.bigtable.admin.v2.C" + + "luster.StateB\003\340A\003\022\023\n\013serve_nodes\030\004 \001(\005\022I" + + "\n\016cluster_config\030\007 \001(\0132/.google.bigtable" + + ".admin.v2.Cluster.ClusterConfigH\000\022H\n\024def" + + "ault_storage_type\030\005 \001(\0162%.google.bigtabl" + + "e.admin.v2.StorageTypeB\003\340A\005\022R\n\021encryptio" + + "n_config\030\006 \001(\01322.google.bigtable.admin.v" + + "2.Cluster.EncryptionConfigB\003\340A\005\032\270\001\n\030Clus" + + "terAutoscalingConfig\022L\n\022autoscaling_limi" + + "ts\030\001 \001(\0132+.google.bigtable.admin.v2.Auto" + + "scalingLimitsB\003\340A\002\022N\n\023autoscaling_target" + + "s\030\002 \001(\0132,.google.bigtable.admin.v2.Autos" + + "calingTargetsB\003\340A\002\032o\n\rClusterConfig\022^\n\032c" + + "luster_autoscaling_config\030\001 \001(\0132:.google" + + ".bigtable.admin.v2.Cluster.ClusterAutosc" + + "alingConfig\032P\n\020EncryptionConfig\022<\n\014kms_k" + + "ey_name\030\001 \001(\tB&\372A#\n!cloudkms.googleapis." + + "com/CryptoKey\"Q\n\005State\022\023\n\017STATE_NOT_KNOW" + + "N\020\000\022\t\n\005READY\020\001\022\014\n\010CREATING\020\002\022\014\n\010RESIZING" + + "\020\003\022\014\n\010DISABLED\020\004:e\352Ab\n$bigtableadmin.goo" + + "gleapis.com/Cluster\022:projects/{project}/" + + "instances/{instance}/clusters/{cluster}B" + + "\010\n\006config\"\210\004\n\nAppProfile\022\014\n\004name\030\001 \001(\t\022\014" + + "\n\004etag\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022g\n\035mul" + + "ti_cluster_routing_use_any\030\005 \001(\0132>.googl" + + "e.bigtable.admin.v2.AppProfile.MultiClus" + + "terRoutingUseAnyH\000\022[\n\026single_cluster_rou" + + "ting\030\006 \001(\01329.google.bigtable.admin.v2.Ap" + + "pProfile.SingleClusterRoutingH\000\0320\n\031Multi" + + "ClusterRoutingUseAny\022\023\n\013cluster_ids\030\001 \003(" + + "\t\032N\n\024SingleClusterRouting\022\022\n\ncluster_id\030" + + "\001 \001(\t\022\"\n\032allow_transactional_writes\030\002 \001(" + + "\010:o\352Al\n\'bigtableadmin.googleapis.com/App" + + "Profile\022Aprojects/{project}/instances/{i" + + "nstance}/appProfiles/{app_profile}B\020\n\016ro" + + "uting_policy\"\210\003\n\tHotTablet\022\014\n\004name\030\001 \001(\t" + + "\022;\n\ntable_name\030\002 \001(\tB\'\372A$\n\"bigtableadmin" + + ".googleapis.com/Table\0223\n\nstart_time\030\003 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n\010en" + + "d_time\030\004 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\022\021\n\tstart_key\030\005 \001(\t\022\017\n\007end_key\030\006 \001(" + + "\t\022#\n\026node_cpu_usage_percent\030\007 \001(\002B\003\340A\003:\177" + + "\352A|\n&bigtableadmin.googleapis.com/HotTab" + + "let\022Rprojects/{project}/instances/{insta" + + "nce}/clusters/{cluster}/hotTablets/{hot_" + + "tablet}B\320\002\n\034com.google.bigtable.admin.v2" + + "B\rInstanceProtoP\001Z=google.golang.org/gen" + + "proto/googleapis/bigtable/admin/v2;admin" + + "\252\002\036Google.Cloud.Bigtable.Admin.V2\312\002\036Goog" + + "le\\Cloud\\Bigtable\\Admin\\V2\352\002\"Google::Clo" + + "ud::Bigtable::Admin::V2\352Ax\n!cloudkms.goo" + + "gleapis.com/CryptoKey\022Sprojects/{project" + + "}/locations/{location}/keyRings/{key_rin" + + "g}/cryptoKeys/{crypto_key}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.bigtable.admin.v2.CommonProto.getDescriptor(), @@ -296,7 +294,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.bigtable.admin.v2.CommonProto.getDescriptor(); diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java index f75310a94c..52363aa70f 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java @@ -89,110 +89,108 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n$google/bigtable/admin/v2/table.proto\022\030" - + "google.bigtable.admin.v2\032\034google/api/ann" - + "otations.proto\032\037google/api/field_behavio" - + "r.proto\032\031google/api/resource.proto\032\036goog" - + "le/protobuf/duration.proto\032\037google/proto" - + "buf/timestamp.proto\032\027google/rpc/status.p" - + "roto\"\233\001\n\013RestoreInfo\022@\n\013source_type\030\001 \001(" - + "\0162+.google.bigtable.admin.v2.RestoreSour" - + "ceType\022;\n\013backup_info\030\002 \001(\0132$.google.big" - + "table.admin.v2.BackupInfoH\000B\r\n\013source_in" - + "fo\"\361\010\n\005Table\022\014\n\004name\030\001 \001(\t\022O\n\016cluster_st" - + "ates\030\002 \003(\01322.google.bigtable.admin.v2.Ta" - + "ble.ClusterStatesEntryB\003\340A\003\022L\n\017column_fa" - + "milies\030\003 \003(\01323.google.bigtable.admin.v2." - + "Table.ColumnFamiliesEntry\022N\n\013granularity" - + "\030\004 \001(\01624.google.bigtable.admin.v2.Table." - + "TimestampGranularityB\003\340A\005\022@\n\014restore_inf" - + "o\030\006 \001(\0132%.google.bigtable.admin.v2.Resto" - + "reInfoB\003\340A\003\032\306\002\n\014ClusterState\022]\n\021replicat" - + "ion_state\030\001 \001(\0162=.google.bigtable.admin." - + "v2.Table.ClusterState.ReplicationStateB\003" - + "\340A\003\022F\n\017encryption_info\030\002 \003(\0132(.google.bi" - + "gtable.admin.v2.EncryptionInfoB\003\340A\003\"\216\001\n\020" - + "ReplicationState\022\023\n\017STATE_NOT_KNOWN\020\000\022\020\n" - + "\014INITIALIZING\020\001\022\027\n\023PLANNED_MAINTENANCE\020\002" - + "\022\031\n\025UNPLANNED_MAINTENANCE\020\003\022\t\n\005READY\020\004\022\024" - + "\n\020READY_OPTIMIZING\020\005\032b\n\022ClusterStatesEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.google." - + "bigtable.admin.v2.Table.ClusterState:\0028\001" - + "\032]\n\023ColumnFamiliesEntry\022\013\n\003key\030\001 \001(\t\0225\n\005" - + "value\030\002 \001(\0132&.google.bigtable.admin.v2.C" - + "olumnFamily:\0028\001\"I\n\024TimestampGranularity\022" - + "%\n!TIMESTAMP_GRANULARITY_UNSPECIFIED\020\000\022\n" - + "\n\006MILLIS\020\001\"q\n\004View\022\024\n\020VIEW_UNSPECIFIED\020\000" - + "\022\r\n\tNAME_ONLY\020\001\022\017\n\013SCHEMA_VIEW\020\002\022\024\n\020REPL" - + "ICATION_VIEW\020\003\022\023\n\017ENCRYPTION_VIEW\020\005\022\010\n\004F" - + "ULL\020\004:_\352A\\\n\"bigtableadmin.googleapis.com" - + "/Table\0226projects/{project}/instances/{in" - + "stance}/tables/{table}\"A\n\014ColumnFamily\0221" - + "\n\007gc_rule\030\001 \001(\0132 .google.bigtable.admin." - + "v2.GcRule\"\325\002\n\006GcRule\022\032\n\020max_num_versions" - + "\030\001 \001(\005H\000\022,\n\007max_age\030\002 \001(\0132\031.google.proto" - + "buf.DurationH\000\022E\n\014intersection\030\003 \001(\0132-.g" - + "oogle.bigtable.admin.v2.GcRule.Intersect" - + "ionH\000\0227\n\005union\030\004 \001(\0132&.google.bigtable.a" - + "dmin.v2.GcRule.UnionH\000\032?\n\014Intersection\022/" - + "\n\005rules\030\001 \003(\0132 .google.bigtable.admin.v2" - + ".GcRule\0328\n\005Union\022/\n\005rules\030\001 \003(\0132 .google" - + ".bigtable.admin.v2.GcRuleB\006\n\004rule\"\331\002\n\016En" - + "cryptionInfo\022U\n\017encryption_type\030\003 \001(\01627." - + "google.bigtable.admin.v2.EncryptionInfo." - + "EncryptionTypeB\003\340A\003\0222\n\021encryption_status" - + "\030\004 \001(\0132\022.google.rpc.StatusB\003\340A\003\022I\n\017kms_k" - + "ey_version\030\002 \001(\tB0\340A\003\372A*\n(cloudkms.googl" - + "eapis.com/CryptoKeyVersion\"q\n\016Encryption" - + "Type\022\037\n\033ENCRYPTION_TYPE_UNSPECIFIED\020\000\022\035\n" - + "\031GOOGLE_DEFAULT_ENCRYPTION\020\001\022\037\n\033CUSTOMER" - + "_MANAGED_ENCRYPTION\020\002\"\314\003\n\010Snapshot\022\014\n\004na" - + "me\030\001 \001(\t\0225\n\014source_table\030\002 \001(\0132\037.google." - + "bigtable.admin.v2.Table\022\027\n\017data_size_byt" - + "es\030\003 \001(\003\022/\n\013create_time\030\004 \001(\0132\032.google.p" - + "rotobuf.Timestamp\022/\n\013delete_time\030\005 \001(\0132\032" - + ".google.protobuf.Timestamp\0227\n\005state\030\006 \001(" - + "\0162(.google.bigtable.admin.v2.Snapshot.St" - + "ate\022\023\n\013description\030\007 \001(\t\"5\n\005State\022\023\n\017STA" - + "TE_NOT_KNOWN\020\000\022\t\n\005READY\020\001\022\014\n\010CREATING\020\002:" - + "{\352Ax\n%bigtableadmin.googleapis.com/Snaps" - + "hot\022Oprojects/{project}/instances/{insta" - + "nce}/clusters/{cluster}/snapshots/{snaps" - + "hot}\"\237\004\n\006Backup\022\014\n\004name\030\001 \001(\t\022\034\n\014source_" - + "table\030\002 \001(\tB\006\340A\005\340A\002\0224\n\013expire_time\030\003 \001(\013" - + "2\032.google.protobuf.TimestampB\003\340A\002\0223\n\nsta" - + "rt_time\030\004 \001(\0132\032.google.protobuf.Timestam" - + "pB\003\340A\003\0221\n\010end_time\030\005 \001(\0132\032.google.protob" - + "uf.TimestampB\003\340A\003\022\027\n\nsize_bytes\030\006 \001(\003B\003\340" - + "A\003\022:\n\005state\030\007 \001(\0162&.google.bigtable.admi" - + "n.v2.Backup.StateB\003\340A\003\022F\n\017encryption_inf" - + "o\030\t \001(\0132(.google.bigtable.admin.v2.Encry" - + "ptionInfoB\003\340A\003\"7\n\005State\022\025\n\021STATE_UNSPECI" - + "FIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002:u\352Ar\n#bi" - + "gtableadmin.googleapis.com/Backup\022Kproje" - + "cts/{project}/instances/{instance}/clust" - + "ers/{cluster}/backups/{backup}\"\244\001\n\nBacku" - + "pInfo\022\023\n\006backup\030\001 \001(\tB\003\340A\003\0223\n\nstart_time" - + "\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" - + "1\n\010end_time\030\003 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003\022\031\n\014source_table\030\004 \001(\tB\003\340A\003*D\n" - + "\021RestoreSourceType\022#\n\037RESTORE_SOURCE_TYP" - + "E_UNSPECIFIED\020\000\022\n\n\006BACKUP\020\001B\374\002\n\034com.goog" - + "le.bigtable.admin.v2B\nTableProtoP\001Z=goog" - + "le.golang.org/genproto/googleapis/bigtab" - + "le/admin/v2;admin\252\002\036Google.Cloud.Bigtabl" - + "e.Admin.V2\312\002\036Google\\Cloud\\Bigtable\\Admin" - + "\\V2\352\002\"Google::Cloud::Bigtable::Admin::V2" - + "\352A\246\001\n(cloudkms.googleapis.com/CryptoKeyV" - + "ersion\022zprojects/{project}/locations/{lo" - + "cation}/keyRings/{key_ring}/cryptoKeys/{" - + "crypto_key}/cryptoKeyVersions/{crypto_ke" - + "y_version}b\006proto3" + + "google.bigtable.admin.v2\032\037google/api/fie" + + "ld_behavior.proto\032\031google/api/resource.p" + + "roto\032\036google/protobuf/duration.proto\032\037go" + + "ogle/protobuf/timestamp.proto\032\027google/rp" + + "c/status.proto\"\233\001\n\013RestoreInfo\022@\n\013source" + + "_type\030\001 \001(\0162+.google.bigtable.admin.v2.R" + + "estoreSourceType\022;\n\013backup_info\030\002 \001(\0132$." + + "google.bigtable.admin.v2.BackupInfoH\000B\r\n" + + "\013source_info\"\361\010\n\005Table\022\014\n\004name\030\001 \001(\t\022O\n\016" + + "cluster_states\030\002 \003(\01322.google.bigtable.a" + + "dmin.v2.Table.ClusterStatesEntryB\003\340A\003\022L\n" + + "\017column_families\030\003 \003(\01323.google.bigtable" + + ".admin.v2.Table.ColumnFamiliesEntry\022N\n\013g" + + "ranularity\030\004 \001(\01624.google.bigtable.admin" + + ".v2.Table.TimestampGranularityB\003\340A\005\022@\n\014r" + + "estore_info\030\006 \001(\0132%.google.bigtable.admi" + + "n.v2.RestoreInfoB\003\340A\003\032\306\002\n\014ClusterState\022]" + + "\n\021replication_state\030\001 \001(\0162=.google.bigta" + + "ble.admin.v2.Table.ClusterState.Replicat" + + "ionStateB\003\340A\003\022F\n\017encryption_info\030\002 \003(\0132(" + + ".google.bigtable.admin.v2.EncryptionInfo" + + "B\003\340A\003\"\216\001\n\020ReplicationState\022\023\n\017STATE_NOT_" + + "KNOWN\020\000\022\020\n\014INITIALIZING\020\001\022\027\n\023PLANNED_MAI" + + "NTENANCE\020\002\022\031\n\025UNPLANNED_MAINTENANCE\020\003\022\t\n" + + "\005READY\020\004\022\024\n\020READY_OPTIMIZING\020\005\032b\n\022Cluste" + + "rStatesEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\013" + + "2,.google.bigtable.admin.v2.Table.Cluste" + + "rState:\0028\001\032]\n\023ColumnFamiliesEntry\022\013\n\003key" + + "\030\001 \001(\t\0225\n\005value\030\002 \001(\0132&.google.bigtable." + + "admin.v2.ColumnFamily:\0028\001\"I\n\024TimestampGr" + + "anularity\022%\n!TIMESTAMP_GRANULARITY_UNSPE" + + "CIFIED\020\000\022\n\n\006MILLIS\020\001\"q\n\004View\022\024\n\020VIEW_UNS" + + "PECIFIED\020\000\022\r\n\tNAME_ONLY\020\001\022\017\n\013SCHEMA_VIEW" + + "\020\002\022\024\n\020REPLICATION_VIEW\020\003\022\023\n\017ENCRYPTION_V" + + "IEW\020\005\022\010\n\004FULL\020\004:_\352A\\\n\"bigtableadmin.goog" + + "leapis.com/Table\0226projects/{project}/ins" + + "tances/{instance}/tables/{table}\"A\n\014Colu" + + "mnFamily\0221\n\007gc_rule\030\001 \001(\0132 .google.bigta" + + "ble.admin.v2.GcRule\"\325\002\n\006GcRule\022\032\n\020max_nu" + + "m_versions\030\001 \001(\005H\000\022,\n\007max_age\030\002 \001(\0132\031.go" + + "ogle.protobuf.DurationH\000\022E\n\014intersection" + + "\030\003 \001(\0132-.google.bigtable.admin.v2.GcRule" + + ".IntersectionH\000\0227\n\005union\030\004 \001(\0132&.google." + + "bigtable.admin.v2.GcRule.UnionH\000\032?\n\014Inte" + + "rsection\022/\n\005rules\030\001 \003(\0132 .google.bigtabl" + + "e.admin.v2.GcRule\0328\n\005Union\022/\n\005rules\030\001 \003(" + + "\0132 .google.bigtable.admin.v2.GcRuleB\006\n\004r" + + "ule\"\331\002\n\016EncryptionInfo\022U\n\017encryption_typ" + + "e\030\003 \001(\01627.google.bigtable.admin.v2.Encry" + + "ptionInfo.EncryptionTypeB\003\340A\003\0222\n\021encrypt" + + "ion_status\030\004 \001(\0132\022.google.rpc.StatusB\003\340A" + + "\003\022I\n\017kms_key_version\030\002 \001(\tB0\340A\003\372A*\n(clou" + + "dkms.googleapis.com/CryptoKeyVersion\"q\n\016" + + "EncryptionType\022\037\n\033ENCRYPTION_TYPE_UNSPEC" + + "IFIED\020\000\022\035\n\031GOOGLE_DEFAULT_ENCRYPTION\020\001\022\037" + + "\n\033CUSTOMER_MANAGED_ENCRYPTION\020\002\"\314\003\n\010Snap" + + "shot\022\014\n\004name\030\001 \001(\t\0225\n\014source_table\030\002 \001(\013" + + "2\037.google.bigtable.admin.v2.Table\022\027\n\017dat" + + "a_size_bytes\030\003 \001(\003\022/\n\013create_time\030\004 \001(\0132" + + "\032.google.protobuf.Timestamp\022/\n\013delete_ti" + + "me\030\005 \001(\0132\032.google.protobuf.Timestamp\0227\n\005" + + "state\030\006 \001(\0162(.google.bigtable.admin.v2.S" + + "napshot.State\022\023\n\013description\030\007 \001(\t\"5\n\005St" + + "ate\022\023\n\017STATE_NOT_KNOWN\020\000\022\t\n\005READY\020\001\022\014\n\010C" + + "REATING\020\002:{\352Ax\n%bigtableadmin.googleapis" + + ".com/Snapshot\022Oprojects/{project}/instan" + + "ces/{instance}/clusters/{cluster}/snapsh" + + "ots/{snapshot}\"\237\004\n\006Backup\022\014\n\004name\030\001 \001(\t\022" + + "\034\n\014source_table\030\002 \001(\tB\006\340A\005\340A\002\0224\n\013expire_" + + "time\030\003 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\002\0223\n\nstart_time\030\004 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\0221\n\010end_time\030\005 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\022\027\n\nsize_byte" + + "s\030\006 \001(\003B\003\340A\003\022:\n\005state\030\007 \001(\0162&.google.big" + + "table.admin.v2.Backup.StateB\003\340A\003\022F\n\017encr" + + "yption_info\030\t \001(\0132(.google.bigtable.admi" + + "n.v2.EncryptionInfoB\003\340A\003\"7\n\005State\022\025\n\021STA" + + "TE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020" + + "\002:u\352Ar\n#bigtableadmin.googleapis.com/Bac" + + "kup\022Kprojects/{project}/instances/{insta" + + "nce}/clusters/{cluster}/backups/{backup}" + + "\"\244\001\n\nBackupInfo\022\023\n\006backup\030\001 \001(\tB\003\340A\003\0223\n\n" + + "start_time\030\002 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\0221\n\010end_time\030\003 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\022\031\n\014source_table\030\004 \001" + + "(\tB\003\340A\003*D\n\021RestoreSourceType\022#\n\037RESTORE_" + + "SOURCE_TYPE_UNSPECIFIED\020\000\022\n\n\006BACKUP\020\001B\374\002" + + "\n\034com.google.bigtable.admin.v2B\nTablePro" + + "toP\001Z=google.golang.org/genproto/googlea" + + "pis/bigtable/admin/v2;admin\252\002\036Google.Clo" + + "ud.Bigtable.Admin.V2\312\002\036Google\\Cloud\\Bigt" + + "able\\Admin\\V2\352\002\"Google::Cloud::Bigtable:" + + ":Admin::V2\352A\246\001\n(cloudkms.googleapis.com/" + + "CryptoKeyVersion\022zprojects/{project}/loc" + + "ations/{location}/keyRings/{key_ring}/cr" + + "yptoKeys/{crypto_key}/cryptoKeyVersions/" + + "{crypto_key_version}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), @@ -324,7 +322,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/common.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/common.proto index 412503a4c4..0d337e6b52 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/common.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/common.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.bigtable.admin.v2; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto index e953b1b666..bbbc5bfaa6 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.bigtable.admin.v2; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/bigtable/admin/v2/common.proto"; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto index b35e4604a2..4e5d2a4a72 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.bigtable.admin.v2; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; From 1aaa80d691bb0168754ef6e5160c10bc851b2c61 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 31 May 2022 20:23:05 +0200 Subject: [PATCH 04/23] chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.8.0 (#1270) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.8.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 6 +++--- samples/install-without-bom/pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index adca7f0b22..961b667b9a 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-bigtable - 2.7.0 + 2.8.0 ``` @@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-bigtable' If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-bigtable:2.7.0' +implementation 'com.google.cloud:google-cloud-bigtable:2.8.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.7.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.8.0" ``` ## Authentication diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index c1a210bcd2..bd8d9619a2 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-bigtable - 2.7.0 + 2.8.0 From cf7714960aec226189f82c147035af76743056aa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 3 Jun 2022 16:32:05 +0200 Subject: [PATCH 05/23] chore(deps): update dependency com.google.cloud:libraries-bom to v25.4.0 (#1273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:libraries-bom to v25.4.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 4 ++-- samples/native-image-sample/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 961b667b9a..f39aeb22d8 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 25.3.0 + 25.4.0 pom import @@ -49,7 +49,7 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies ```Groovy -implementation platform('com.google.cloud:libraries-bom:25.3.0') +implementation platform('com.google.cloud:libraries-bom:25.4.0') implementation 'com.google.cloud:google-cloud-bigtable' ``` diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index dc9d60ce4b..a732e469cb 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 25.3.0 + 25.4.0 pom import diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 8c65a55777..9b5e24c2e7 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.3.0 + 25.4.0 pom import From d21368f94256daa0ddd366830764430fd4d152cc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 3 Jun 2022 16:32:17 +0200 Subject: [PATCH 06/23] test(deps): update dependency org.mockito:mockito-core to v4.6.1 (#1272) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3057799f26..43c5701d22 100644 --- a/pom.xml +++ b/pom.xml @@ -206,7 +206,7 @@ org.mockito mockito-core - 4.6.0 + 4.6.1 From 5eafcc3be3986692e64c95dcfc0d675208f2218c Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Wed, 8 Jun 2022 13:08:14 -0400 Subject: [PATCH 07/23] fix: remove the shaded profile from root pom (#1274) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). --- pom.xml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/pom.xml b/pom.xml index 43c5701d22..19c5a61efd 100644 --- a/pom.xml +++ b/pom.xml @@ -332,21 +332,6 @@ - - - with-shaded - - - !skip-shaded - - - - google-cloud-bigtable-stats - - From a71a1693d90d644cd0ce88e976cdc7563173f845 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Jun 2022 17:47:44 +0200 Subject: [PATCH 08/23] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.0 (#1280) --- google-cloud-bigtable-bom/pom.xml | 2 +- google-cloud-bigtable-deps-bom/pom.xml | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml index c43f462047..6868f2c93c 100644 --- a/google-cloud-bigtable-bom/pom.xml +++ b/google-cloud-bigtable-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 Google Cloud Bigtable BOM diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml index c00a533904..633c963b31 100644 --- a/google-cloud-bigtable-deps-bom/pom.xml +++ b/google-cloud-bigtable-deps-bom/pom.xml @@ -7,7 +7,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 com.google.cloud diff --git a/pom.xml b/pom.xml index 19c5a61efd..a22e9eee2e 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 From 97b56040cab439a5a27691edd2da19828080880b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Jun 2022 17:48:16 +0200 Subject: [PATCH 09/23] build(deps): update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.1.0 (#1279) --- google-cloud-bigtable/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 0a6c973c59..6d1c003802 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -564,7 +564,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0 + 3.1.0 From fcf63a6b10265984f60d631b23479060f7035462 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 13 Jun 2022 11:48:51 -0400 Subject: [PATCH 10/23] chore: Integrate new gapic-generator-java and rules_gapic (#1277) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Integrate new gapic-generator-java and rules_gapic PiperOrigin-RevId: 454027580 Source-Link: https://github.com/googleapis/googleapis/commit/1b222777baa702e7135610355706570ed2b56318 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e04cea20d0d12eb5c3bdb360a9e72b654edcb638 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTA0Y2VhMjBkMGQxMmViNWMzYmRiMzYwYTllNzJiNjU0ZWRjYjYzOCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../v2/BaseBigtableInstanceAdminClient.java | 22 +++++++------- .../v2/BaseBigtableTableAdminClient.java | 30 +++++++++++-------- .../BaseBigtableInstanceAdminClientTest.java | 12 ++++---- .../v2/BaseBigtableTableAdminClientTest.java | 13 ++++---- 4 files changed, 41 insertions(+), 36 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java index 6f210b2a8c..4a29a8bf4a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java @@ -1997,7 +1997,7 @@ public final ListAppProfilesPagedResponse listAppProfiles(ListAppProfilesRequest * while (true) { * ListAppProfilesResponse response = * baseBigtableInstanceAdminClient.listAppProfilesCallable().call(request); - * for (AppProfile element : response.getResponsesList()) { + * for (AppProfile element : response.getAppProfilesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2251,7 +2251,7 @@ public final UnaryCallable deleteAppProfileCalla * // It may require modifications to work in your environment. * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = * BaseBigtableInstanceAdminClient.create()) { - * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + * ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); * Policy response = baseBigtableInstanceAdminClient.getIamPolicy(resource); * } * } @@ -2308,7 +2308,7 @@ public final Policy getIamPolicy(String resource) { * BaseBigtableInstanceAdminClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * Policy response = baseBigtableInstanceAdminClient.getIamPolicy(request); @@ -2336,7 +2336,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * BaseBigtableInstanceAdminClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * ApiFuture future = @@ -2361,7 +2361,7 @@ public final UnaryCallable getIamPolicyCallable() { * // It may require modifications to work in your environment. * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = * BaseBigtableInstanceAdminClient.create()) { - * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + * ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); * Policy policy = Policy.newBuilder().build(); * Policy response = baseBigtableInstanceAdminClient.setIamPolicy(resource, policy); * } @@ -2426,7 +2426,7 @@ public final Policy setIamPolicy(String resource, Policy policy) { * BaseBigtableInstanceAdminClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -2454,7 +2454,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * BaseBigtableInstanceAdminClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -2480,7 +2480,7 @@ public final UnaryCallable setIamPolicyCallable() { * // It may require modifications to work in your environment. * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = * BaseBigtableInstanceAdminClient.create()) { - * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + * ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); * List permissions = new ArrayList<>(); * TestIamPermissionsResponse response = * baseBigtableInstanceAdminClient.testIamPermissions(resource, permissions); @@ -2552,7 +2552,7 @@ public final TestIamPermissionsResponse testIamPermissions( * BaseBigtableInstanceAdminClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * TestIamPermissionsResponse response = @@ -2580,7 +2580,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * BaseBigtableInstanceAdminClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * ApiFuture future = @@ -2747,7 +2747,7 @@ public final ListHotTabletsPagedResponse listHotTablets(ListHotTabletsRequest re * while (true) { * ListHotTabletsResponse response = * baseBigtableInstanceAdminClient.listHotTabletsCallable().call(request); - * for (HotTablet element : response.getResponsesList()) { + * for (HotTablet element : response.getHotTabletsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java index 71d1d4ab75..9c664619f0 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java @@ -718,7 +718,7 @@ public final UnaryCallable listTable * while (true) { * ListTablesResponse response = * baseBigtableTableAdminClient.listTablesCallable().call(request); - * for (Table element : response.getResponsesList()) { + * for (Table element : response.getTablesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1971,7 +1971,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque * while (true) { * ListSnapshotsResponse response = * baseBigtableTableAdminClient.listSnapshotsCallable().call(request); - * for (Snapshot element : response.getResponsesList()) { + * for (Snapshot element : response.getSnapshotsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2754,7 +2754,7 @@ public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) { * while (true) { * ListBackupsResponse response = * baseBigtableTableAdminClient.listBackupsCallable().call(request); - * for (Backup element : response.getResponsesList()) { + * for (Backup element : response.getBackupsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2884,7 +2884,7 @@ public final UnaryCallable restoreTableCallable( * // It may require modifications to work in your environment. * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = * BaseBigtableTableAdminClient.create()) { - * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + * ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); * Policy response = baseBigtableTableAdminClient.getIamPolicy(resource); * } * } @@ -2941,7 +2941,8 @@ public final Policy getIamPolicy(String resource) { * BaseBigtableTableAdminClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource( + * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * Policy response = baseBigtableTableAdminClient.getIamPolicy(request); @@ -2969,7 +2970,8 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * BaseBigtableTableAdminClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource( + * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * ApiFuture future = @@ -2994,7 +2996,7 @@ public final UnaryCallable getIamPolicyCallable() { * // It may require modifications to work in your environment. * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = * BaseBigtableTableAdminClient.create()) { - * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + * ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); * Policy policy = Policy.newBuilder().build(); * Policy response = baseBigtableTableAdminClient.setIamPolicy(resource, policy); * } @@ -3059,7 +3061,8 @@ public final Policy setIamPolicy(String resource, Policy policy) { * BaseBigtableTableAdminClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource( + * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -3087,7 +3090,8 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * BaseBigtableTableAdminClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource( + * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -3113,7 +3117,7 @@ public final UnaryCallable setIamPolicyCallable() { * // It may require modifications to work in your environment. * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = * BaseBigtableTableAdminClient.create()) { - * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + * ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); * List permissions = new ArrayList<>(); * TestIamPermissionsResponse response = * baseBigtableTableAdminClient.testIamPermissions(resource, permissions); @@ -3185,7 +3189,8 @@ public final TestIamPermissionsResponse testIamPermissions( * BaseBigtableTableAdminClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource( + * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * TestIamPermissionsResponse response = @@ -3213,7 +3218,8 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * BaseBigtableTableAdminClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setResource( + * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * ApiFuture future = diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java index 3a8e00fec6..26cbcf77cd 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java @@ -1446,7 +1446,7 @@ public void getIamPolicyTest() throws Exception { .build(); mockBigtableInstanceAdmin.addResponse(expectedResponse); - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); Policy actualResponse = client.getIamPolicy(resource); Assert.assertEquals(expectedResponse, actualResponse); @@ -1468,7 +1468,7 @@ public void getIamPolicyExceptionTest() throws Exception { mockBigtableInstanceAdmin.addException(exception); try { - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); client.getIamPolicy(resource); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -1528,7 +1528,7 @@ public void setIamPolicyTest() throws Exception { .build(); mockBigtableInstanceAdmin.addResponse(expectedResponse); - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); Policy policy = Policy.newBuilder().build(); Policy actualResponse = client.setIamPolicy(resource, policy); @@ -1552,7 +1552,7 @@ public void setIamPolicyExceptionTest() throws Exception { mockBigtableInstanceAdmin.addException(exception); try { - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); Policy policy = Policy.newBuilder().build(); client.setIamPolicy(resource, policy); Assert.fail("No exception raised"); @@ -1611,7 +1611,7 @@ public void testIamPermissionsTest() throws Exception { TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); mockBigtableInstanceAdmin.addResponse(expectedResponse); - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); List permissions = new ArrayList<>(); TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); @@ -1635,7 +1635,7 @@ public void testIamPermissionsExceptionTest() throws Exception { mockBigtableInstanceAdmin.addException(exception); try { - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); List permissions = new ArrayList<>(); client.testIamPermissions(resource, permissions); Assert.fail("No exception raised"); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java index a940d9b1a8..ac444d0c52 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java @@ -29,7 +29,6 @@ import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; import com.google.api.resourcenames.ResourceName; -import com.google.bigtable.admin.v2.AppProfileName; import com.google.bigtable.admin.v2.Backup; import com.google.bigtable.admin.v2.BackupName; import com.google.bigtable.admin.v2.CheckConsistencyRequest; @@ -1956,7 +1955,7 @@ public void getIamPolicyTest() throws Exception { .build(); mockBigtableTableAdmin.addResponse(expectedResponse); - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); Policy actualResponse = client.getIamPolicy(resource); Assert.assertEquals(expectedResponse, actualResponse); @@ -1978,7 +1977,7 @@ public void getIamPolicyExceptionTest() throws Exception { mockBigtableTableAdmin.addException(exception); try { - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); client.getIamPolicy(resource); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -2038,7 +2037,7 @@ public void setIamPolicyTest() throws Exception { .build(); mockBigtableTableAdmin.addResponse(expectedResponse); - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); Policy policy = Policy.newBuilder().build(); Policy actualResponse = client.setIamPolicy(resource, policy); @@ -2062,7 +2061,7 @@ public void setIamPolicyExceptionTest() throws Exception { mockBigtableTableAdmin.addException(exception); try { - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); Policy policy = Policy.newBuilder().build(); client.setIamPolicy(resource, policy); Assert.fail("No exception raised"); @@ -2121,7 +2120,7 @@ public void testIamPermissionsTest() throws Exception { TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); mockBigtableTableAdmin.addResponse(expectedResponse); - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); List permissions = new ArrayList<>(); TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); @@ -2145,7 +2144,7 @@ public void testIamPermissionsExceptionTest() throws Exception { mockBigtableTableAdmin.addException(exception); try { - ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); List permissions = new ArrayList<>(); client.testIamPermissions(resource, permissions); Assert.fail("No exception raised"); From 4a3a2c947642678c3011db616ebe7cbaed677f96 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Wed, 15 Jun 2022 15:31:15 -0400 Subject: [PATCH 11/23] docs(sample): update README for native image sample (#1281) --- samples/native-image-sample/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/native-image-sample/README.md b/samples/native-image-sample/README.md index a6b38de140..a797a9a78e 100644 --- a/samples/native-image-sample/README.md +++ b/samples/native-image-sample/README.md @@ -20,9 +20,9 @@ You will need to follow these prerequisite steps in order to run the samples: **Note:** Authenticating with Application Default Credentials is convenient to use during development, but we recommend [alternate methods of authentication](https://cloud.google.com/docs/authentication/production) during production use. -3. Install the GraalVM compiler. +3. Install the native image compiler. - You can follow the [official installation instructions](https://www.graalvm.org/docs/getting-started/#install-graalvm) from the GraalVM website. + You can follow the [installation instructions](https://www.graalvm.org/docs/getting-started/#install-graalvm). After following the instructions, ensure that you install the native image extension installed by running: ``` @@ -36,9 +36,9 @@ You will need to follow these prerequisite steps in order to run the samples: ``` $ java -version - openjdk version "11.0.7" 2020-04-14 - OpenJDK Runtime Environment GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02) - OpenJDK 64-Bit Server VM GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02, mixed mode, sharing) + openjdk version "17.0.3" 2022-04-19 + OpenJDK Runtime Environment GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06) + OpenJDK 64-Bit Server VM GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06, mixed mode, sharing) ``` ## BigTable Environment setup @@ -110,4 +110,4 @@ In order to run the sample's integration test, call the following command: ``` mvn test -P native - ``` \ No newline at end of file + ``` From b1fc00aa09129185b4e4db8edb9c4af2dbfd1ec8 Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Tue, 21 Jun 2022 13:30:09 -0400 Subject: [PATCH 12/23] feat: add built-in metric constants (#1243) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add built in metrics measure and views * remove status from application latency * Rename methods and add comments * update based on comments * add comment for client id * move dependency * use SUM for connectivity errors * update on comments * update dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- google-cloud-bigtable-bom/pom.xml | 5 + google-cloud-bigtable-stats/pom.xml | 31 +- .../stats/BuiltinMeasureConstants.java | 92 ++++ .../bigtable/stats/BuiltinViewConstants.java | 194 +++++++ .../cloud/bigtable/stats/BuiltinViews.java | 53 ++ .../stats/MavenPlaceholderShaded.java | 26 - .../bigtable/stats/StatsRecorderWrapper.java | 118 +++++ .../cloud/bigtable/stats/StatsWrapper.java | 37 ++ .../stats/BuiltinViewConstantsTest.java | 39 ++ .../stats/StatsRecorderWrapperTest.java | 500 ++++++++++++++++++ pom.xml | 1 + 11 files changed, 1063 insertions(+), 33 deletions(-) create mode 100644 google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinMeasureConstants.java create mode 100644 google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViewConstants.java create mode 100644 google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViews.java delete mode 100644 google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/MavenPlaceholderShaded.java create mode 100644 google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsRecorderWrapper.java create mode 100644 google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsWrapper.java create mode 100644 google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BuiltinViewConstantsTest.java create mode 100644 google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/StatsRecorderWrapperTest.java diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml index 6868f2c93c..cc7eac753d 100644 --- a/google-cloud-bigtable-bom/pom.xml +++ b/google-cloud-bigtable-bom/pom.xml @@ -94,6 +94,11 @@ proto-google-cloud-bigtable-v2 2.8.1-SNAPSHOT + + com.google.cloud + google-cloud-bigtable-stats + 2.8.1-SNAPSHOT + diff --git a/google-cloud-bigtable-stats/pom.xml b/google-cloud-bigtable-stats/pom.xml index 6f9d0a49e3..a62e898fe3 100644 --- a/google-cloud-bigtable-stats/pom.xml +++ b/google-cloud-bigtable-stats/pom.xml @@ -29,17 +29,38 @@ + + com.google.api + gax + + + com.google.api + api-common + + io.opencensus opencensus-api + + com.google.guava + guava + + io.opencensus opencensus-impl + test - io.opencensus - opencensus-exporter-stats-stackdriver + com.google.truth + truth + test + + + junit + junit + test @@ -48,6 +69,7 @@ org.apache.maven.plugins maven-shade-plugin + 3.2.4 package @@ -78,11 +100,6 @@ org.apache.maven.plugins maven-dependency-plugin 3.3.0 - - - * - - diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinMeasureConstants.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinMeasureConstants.java new file mode 100644 index 0000000000..06ca674ffc --- /dev/null +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinMeasureConstants.java @@ -0,0 +1,92 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import static io.opencensus.stats.Measure.MeasureLong; + +import io.opencensus.tags.TagKey; + +/** Built-in metrics that will be readable under bigtable.googleapis.com/client namespace */ +class BuiltinMeasureConstants { + // Monitored resource TagKeys + static final TagKey PROJECT_ID = TagKey.create("project_id"); + static final TagKey INSTANCE_ID = TagKey.create("instance_id"); + static final TagKey CLUSTER = TagKey.create("cluster"); + static final TagKey TABLE = TagKey.create("table"); + static final TagKey ZONE = TagKey.create("zone"); + // Placeholder TagKey to be used in Stackdriver exporter + static final TagKey CLIENT_ID = TagKey.create("client_id"); + + // Metrics TagKeys + static final TagKey APP_PROFILE = TagKey.create("app_profile"); + static final TagKey METHOD = TagKey.create("method"); + static final TagKey STREAMING = TagKey.create("streaming"); + static final TagKey STATUS = TagKey.create("status"); + static final TagKey CLIENT_NAME = TagKey.create("client_name"); + + // Units + private static final String COUNT = "1"; + private static final String MILLISECOND = "ms"; + + // Measurements + static final MeasureLong OPERATION_LATENCIES = + MeasureLong.create( + "bigtable.googleapis.com/internal/client/operation_latencies", + "Total time until final operation success or failure, including retries and backoff.", + MILLISECOND); + + static final MeasureLong ATTEMPT_LATENCIES = + MeasureLong.create( + "bigtable.googleapis.com/internal/client/attempt_latencies", + "Client observed latency per RPC attempt.", + MILLISECOND); + + static final MeasureLong RETRY_COUNT = + MeasureLong.create( + "bigtable.googleapis.com/internal/client/retry_count", + "The number of additional RPCs sent after the initial attempt.", + COUNT); + + static final MeasureLong FIRST_RESPONSE_LATENCIES = + MeasureLong.create( + "bigtable.googleapis.com/internal/client/first_response_latencies", + "Latency from operation start until the response headers were received. The publishing of the measurement will be delayed until the attempt response has been received.", + MILLISECOND); + + static final MeasureLong SERVER_LATENCIES = + MeasureLong.create( + "bigtable.googleapis.com/internal/client/server_latencies", + "The latency measured from the moment that the RPC entered the Google data center until the RPC was completed.", + MILLISECOND); + + static final MeasureLong CONNECTIVITY_ERROR_COUNT = + MeasureLong.create( + "bigtable.googleapis.com/internal/client/connectivity_error_count", + "Number of requests that failed to reach the Google datacenter. (Requests without google response headers).", + COUNT); + + static final MeasureLong APPLICATION_LATENCIES = + MeasureLong.create( + "bigtable.googleapis.com/internal/client/application_latencies", + "The latency of the client application consuming available response data.", + MILLISECOND); + + static final MeasureLong THROTTLING_LATENCIES = + MeasureLong.create( + "bigtable.googleapis.com/internal/client/throttling_latencies", + "The artificial latency introduced by the client to limit the number of outstanding requests. The publishing of the measurement will be delayed until the attempt trailers have been received.", + MILLISECOND); +} diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViewConstants.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViewConstants.java new file mode 100644 index 0000000000..beceeeab83 --- /dev/null +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViewConstants.java @@ -0,0 +1,194 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.APPLICATION_LATENCIES; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.APP_PROFILE; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.ATTEMPT_LATENCIES; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.CLIENT_NAME; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.CLUSTER; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.CONNECTIVITY_ERROR_COUNT; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.FIRST_RESPONSE_LATENCIES; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.INSTANCE_ID; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.METHOD; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.OPERATION_LATENCIES; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.PROJECT_ID; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.RETRY_COUNT; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.SERVER_LATENCIES; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.STATUS; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.STREAMING; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.TABLE; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.THROTTLING_LATENCIES; +import static com.google.cloud.bigtable.stats.BuiltinMeasureConstants.ZONE; +import static io.opencensus.stats.Aggregation.Distribution; +import static io.opencensus.stats.Aggregation.Sum; + +import com.google.common.collect.ImmutableList; +import io.opencensus.stats.Aggregation; +import io.opencensus.stats.BucketBoundaries; +import io.opencensus.stats.View; + +/** Create built-in metrics views under bigtable.googleapis.com/internal/client namespace */ +class BuiltinViewConstants { + private static final Aggregation AGGREGATION_WITH_MILLIS_HISTOGRAM = + Distribution.create( + BucketBoundaries.create( + ImmutableList.of( + 0.0, 0.01, 0.05, 0.1, 0.3, 0.6, 0.8, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, + 13.0, 16.0, 20.0, 25.0, 30.0, 40.0, 50.0, 65.0, 80.0, 100.0, 130.0, 160.0, 200.0, + 250.0, 300.0, 400.0, 500.0, 650.0, 800.0, 1000.0, 2000.0, 5000.0, 10000.0, + 20000.0, 50000.0, 100000.0))); + + private static final Aggregation AGGREGATION_RETRY_COUNT = + Distribution.create( + BucketBoundaries.create( + ImmutableList.of( + 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 40.0, 50.0, + 100.0))); + + private static final Aggregation AGGREGATION_ERROR_COUNT = Sum.create(); + + static final View OPERATION_LATENCIES_VIEW = + View.create( + View.Name.create("bigtable.googleapis.com/internal/client/operation_latencies"), + "Total time until final operation success or failure, including retries and backoff.", + OPERATION_LATENCIES, + AGGREGATION_WITH_MILLIS_HISTOGRAM, + ImmutableList.of( + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE, + METHOD, + STREAMING, + STATUS, + CLIENT_NAME, + CLUSTER, + ZONE, + TABLE)); + + static final View ATTEMPT_LATENCIES_VIEW = + View.create( + View.Name.create("bigtable.googleapis.com/internal/client/attempt_latencies"), + "Client observed latency per RPC attempt.", + ATTEMPT_LATENCIES, + AGGREGATION_WITH_MILLIS_HISTOGRAM, + ImmutableList.of( + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE, + METHOD, + STREAMING, + STATUS, + CLIENT_NAME, + CLUSTER, + ZONE, + TABLE)); + + static final View RETRY_COUNT_VIEW = + View.create( + View.Name.create("bigtable.googleapis.com/internal/client/retry_count"), + "The number of additional RPCs sent after the initial attempt.", + RETRY_COUNT, + AGGREGATION_RETRY_COUNT, + ImmutableList.of( + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE, + METHOD, + STATUS, + CLIENT_NAME, + CLUSTER, + ZONE, + TABLE)); + + static final View FIRST_RESPONSE_LATENCIES_VIEW = + View.create( + View.Name.create("bigtable.googleapis.com/internal/client/first_response_latencies"), + "Latency from operation start until the response headers were received. The publishing of the measurement will be delayed until the attempt response has been received.", + FIRST_RESPONSE_LATENCIES, + AGGREGATION_WITH_MILLIS_HISTOGRAM, + ImmutableList.of( + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE, + METHOD, + STATUS, + CLIENT_NAME, + CLUSTER, + ZONE, + TABLE)); + + static final View SERVER_LATENCIES_VIEW = + View.create( + View.Name.create("bigtable.googleapis.com/internal/client/server_latencies"), + "The latency measured from the moment that the RPC entered the Google data center until the RPC was completed.", + SERVER_LATENCIES, + AGGREGATION_WITH_MILLIS_HISTOGRAM, + ImmutableList.of( + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE, + METHOD, + STATUS, + STREAMING, + CLIENT_NAME, + CLUSTER, + ZONE, + TABLE)); + + static final View CONNECTIVITY_ERROR_COUNT_VIEW = + View.create( + View.Name.create("bigtable.googleapis.com/internal/client/connectivity_error_count"), + "Number of requests that failed to reach the Google datacenter. (Requests without google response headers).", + CONNECTIVITY_ERROR_COUNT, + AGGREGATION_ERROR_COUNT, + ImmutableList.of( + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE, + METHOD, + STATUS, + CLIENT_NAME, + CLUSTER, + ZONE, + TABLE)); + + static final View APPLICATION_LATENCIES_VIEW = + View.create( + View.Name.create("bigtable.googleapis.com/internal/client/application_latencies"), + "The latency of the client application consuming available response data.", + APPLICATION_LATENCIES, + AGGREGATION_WITH_MILLIS_HISTOGRAM, + ImmutableList.of( + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE, + METHOD, + STREAMING, + CLIENT_NAME, + CLUSTER, + ZONE, + TABLE)); + + static final View THROTTLING_LATENCIES_VIEW = + View.create( + View.Name.create("bigtable.googleapis.com/internal/client/throttling_latencies"), + "The artificial latency introduced by the client to limit the number of outstanding requests. The publishing of the measurement will be delayed until the attempt trailers have been received.", + THROTTLING_LATENCIES, + AGGREGATION_WITH_MILLIS_HISTOGRAM, + ImmutableList.of( + PROJECT_ID, INSTANCE_ID, APP_PROFILE, METHOD, CLIENT_NAME, CLUSTER, ZONE, TABLE)); +} diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViews.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViews.java new file mode 100644 index 0000000000..b5cf180b5b --- /dev/null +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViews.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import com.google.api.core.InternalApi; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.ImmutableSet; +import io.opencensus.stats.Stats; +import io.opencensus.stats.View; +import io.opencensus.stats.ViewManager; + +/** For registering built-in metric views */ +@InternalApi("For internal use only") +public class BuiltinViews { + @VisibleForTesting + static final ImmutableSet BIGTABLE_BUILTIN_VIEWS = + ImmutableSet.of( + BuiltinViewConstants.OPERATION_LATENCIES_VIEW, + BuiltinViewConstants.ATTEMPT_LATENCIES_VIEW, + BuiltinViewConstants.RETRY_COUNT_VIEW, + BuiltinViewConstants.FIRST_RESPONSE_LATENCIES_VIEW, + BuiltinViewConstants.SERVER_LATENCIES_VIEW, + BuiltinViewConstants.CONNECTIVITY_ERROR_COUNT_VIEW, + BuiltinViewConstants.APPLICATION_LATENCIES_VIEW, + BuiltinViewConstants.THROTTLING_LATENCIES_VIEW); + + @VisibleForTesting + void registerPrivateViews(ViewManager viewManager) { + for (View view : BIGTABLE_BUILTIN_VIEWS) { + viewManager.registerView(view); + } + } + + public void registerBigtableBuiltinViews() { + ViewManager viewManager = Stats.getViewManager(); + for (View view : BIGTABLE_BUILTIN_VIEWS) { + viewManager.registerView(view); + } + } +} diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/MavenPlaceholderShaded.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/MavenPlaceholderShaded.java deleted file mode 100644 index 44b0633b5b..0000000000 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/MavenPlaceholderShaded.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.bigtable.stats; - -public final class MavenPlaceholderShaded { - /** - * This class is here to force generation of source javadoc jars so that the maven release process - * doesn't complain. The shading plugin generated a shaded jar of bigtable-stats, but it doesn't - * generate javadoc or source files; this class is here as a hack and better methods should be - * employed. - */ - private MavenPlaceholderShaded() {} -} diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsRecorderWrapper.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsRecorderWrapper.java new file mode 100644 index 0000000000..ff3568c5f4 --- /dev/null +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsRecorderWrapper.java @@ -0,0 +1,118 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import com.google.api.core.InternalApi; +import com.google.api.gax.tracing.ApiTracerFactory.OperationType; +import com.google.api.gax.tracing.SpanName; +import io.opencensus.stats.MeasureMap; +import io.opencensus.stats.StatsRecorder; +import io.opencensus.tags.TagContext; +import io.opencensus.tags.TagContextBuilder; +import io.opencensus.tags.TagKey; +import io.opencensus.tags.TagValue; +import io.opencensus.tags.Tagger; +import io.opencensus.tags.Tags; +import java.util.Map; + +/** A wrapper to record built-in metrics */ +@InternalApi("For internal use only") +public class StatsRecorderWrapper { + + private final OperationType operationType; + + private final Tagger tagger; + private final StatsRecorder statsRecorder; + private final TagContext parentContext; + private final SpanName spanName; + private final Map statsAttributes; + + private MeasureMap measureMap; + + public StatsRecorderWrapper( + OperationType operationType, + SpanName spanName, + Map statsAttributes, + StatsRecorder statsRecorder) { + this.operationType = operationType; + this.tagger = Tags.getTagger(); + this.statsRecorder = statsRecorder; + this.spanName = spanName; + this.parentContext = tagger.getCurrentTagContext(); + this.statsAttributes = statsAttributes; + + this.measureMap = statsRecorder.newMeasureMap(); + } + + public void record(String status, String tableId, String zone, String cluster) { + TagContextBuilder tagCtx = + newTagContextBuilder(tableId, zone, cluster) + .putLocal(BuiltinMeasureConstants.STATUS, TagValue.create(status)); + + boolean isStreaming = operationType == OperationType.ServerStreaming; + tagCtx.putLocal( + BuiltinMeasureConstants.STREAMING, TagValue.create(Boolean.toString(isStreaming))); + + measureMap.record(tagCtx.build()); + } + + public void putOperationLatencies(long operationLatency) { + measureMap.put(BuiltinMeasureConstants.OPERATION_LATENCIES, operationLatency); + } + + public void putAttemptLatencies(long attemptLatency) { + measureMap.put(BuiltinMeasureConstants.ATTEMPT_LATENCIES, attemptLatency); + } + + public void putRetryCount(int attemptCount) { + measureMap.put(BuiltinMeasureConstants.RETRY_COUNT, attemptCount); + } + + public void putApplicationLatencies(long applicationLatency) { + measureMap.put(BuiltinMeasureConstants.APPLICATION_LATENCIES, applicationLatency); + } + + public void putFirstResponseLatencies(long firstResponseLatency) { + measureMap.put(BuiltinMeasureConstants.FIRST_RESPONSE_LATENCIES, firstResponseLatency); + } + + public void putGfeLatencies(long serverLatency) { + measureMap.put(BuiltinMeasureConstants.SERVER_LATENCIES, serverLatency); + } + + public void putGfeMissingHeaders(long connectivityErrors) { + measureMap.put(BuiltinMeasureConstants.CONNECTIVITY_ERROR_COUNT, connectivityErrors); + } + + public void putBatchRequestThrottled(long throttledTimeMs) { + measureMap.put(BuiltinMeasureConstants.THROTTLING_LATENCIES, throttledTimeMs); + } + + private TagContextBuilder newTagContextBuilder(String tableId, String zone, String cluster) { + TagContextBuilder tagContextBuilder = + tagger + .toBuilder(parentContext) + .putLocal(BuiltinMeasureConstants.CLIENT_NAME, TagValue.create("bigtable-java")) + .putLocal(BuiltinMeasureConstants.METHOD, TagValue.create(spanName.toString())) + .putLocal(BuiltinMeasureConstants.TABLE, TagValue.create(tableId)) + .putLocal(BuiltinMeasureConstants.ZONE, TagValue.create(zone)) + .putLocal(BuiltinMeasureConstants.CLUSTER, TagValue.create(cluster)); + for (Map.Entry entry : statsAttributes.entrySet()) { + tagContextBuilder.putLocal(TagKey.create(entry.getKey()), TagValue.create(entry.getValue())); + } + return tagContextBuilder; + } +} diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsWrapper.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsWrapper.java new file mode 100644 index 0000000000..6b7bd6df9b --- /dev/null +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsWrapper.java @@ -0,0 +1,37 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import static com.google.api.gax.tracing.ApiTracerFactory.OperationType; + +import com.google.api.core.InternalApi; +import com.google.api.gax.tracing.SpanName; +import io.opencensus.stats.Stats; +import java.util.Map; + +/** + * Wrapper class for accessing opencensus. We use a shaded version of opencensus to avoid polluting + * the global opencensus namespace. And this provides a facade that will not be relocated. + */ +@InternalApi("For internal use only") +public class StatsWrapper { + + public static StatsRecorderWrapper createRecorder( + OperationType operationType, SpanName spanName, Map statsAttributes) { + return new StatsRecorderWrapper( + operationType, spanName, statsAttributes, Stats.getStatsRecorder()); + } +} diff --git a/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BuiltinViewConstantsTest.java b/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BuiltinViewConstantsTest.java new file mode 100644 index 0000000000..a7d20f6da1 --- /dev/null +++ b/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BuiltinViewConstantsTest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import static com.google.common.truth.Truth.assertWithMessage; + +import io.opencensus.stats.View; +import org.junit.Test; + +public class BuiltinViewConstantsTest { + @Test + public void testBasicTagsExistForAllViews() { + for (View v : BuiltinViews.BIGTABLE_BUILTIN_VIEWS) { + assertWithMessage(v.getName() + " should have all basic tags") + .that(v.getColumns()) + .containsAtLeast( + BuiltinMeasureConstants.PROJECT_ID, + BuiltinMeasureConstants.INSTANCE_ID, + BuiltinMeasureConstants.APP_PROFILE, + BuiltinMeasureConstants.METHOD, + BuiltinMeasureConstants.ZONE, + BuiltinMeasureConstants.CLUSTER, + BuiltinMeasureConstants.TABLE); + } + } +} diff --git a/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/StatsRecorderWrapperTest.java b/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/StatsRecorderWrapperTest.java new file mode 100644 index 0000000000..ed67472623 --- /dev/null +++ b/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/StatsRecorderWrapperTest.java @@ -0,0 +1,500 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.api.gax.tracing.ApiTracerFactory; +import com.google.api.gax.tracing.SpanName; +import com.google.common.collect.ImmutableMap; +import io.opencensus.impl.stats.StatsComponentImpl; +import io.opencensus.stats.AggregationData; +import io.opencensus.stats.StatsComponent; +import io.opencensus.stats.View; +import io.opencensus.stats.ViewData; +import io.opencensus.stats.ViewManager; +import io.opencensus.tags.TagKey; +import io.opencensus.tags.TagValue; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.junit.Before; +import org.junit.Test; + +public class StatsRecorderWrapperTest { + + private final String PROJECT_ID = "fake-project"; + private final String INSTANCE_ID = "fake-instance"; + private final String APP_PROFILE_ID = "fake-app-profile"; + + private final String TABLE_ID = "fake-table-id"; + private final String ZONE = "fake-zone"; + private final String CLUSTER = "fake-cluster"; + + private final StatsComponent statsComponent = new StatsComponentImpl(); + + @Before + public void setup() { + BuiltinViews views = new BuiltinViews(); + views.registerPrivateViews(statsComponent.getViewManager()); + } + + @Test + public void testStreamingOperation() throws InterruptedException { + StatsRecorderWrapper recorderWrapper = + new StatsRecorderWrapper( + ApiTracerFactory.OperationType.ServerStreaming, + SpanName.of("Bigtable", "ReadRows"), + ImmutableMap.of( + BuiltinMeasureConstants.PROJECT_ID.getName(), + PROJECT_ID, + BuiltinMeasureConstants.INSTANCE_ID.getName(), + INSTANCE_ID, + BuiltinMeasureConstants.APP_PROFILE.getName(), + APP_PROFILE_ID), + statsComponent.getStatsRecorder()); + + long operationLatency = 1234; + int attemptCount = 2; + long attemptLatency = 56; + long serverLatency = 78; + long applicationLatency = 901; + long connectivityErrorCount = 15; + long throttlingLatency = 50; + long firstResponseLatency = 90; + + recorderWrapper.putOperationLatencies(operationLatency); + recorderWrapper.putRetryCount(attemptCount); + recorderWrapper.putAttemptLatencies(attemptLatency); + recorderWrapper.putApplicationLatencies(applicationLatency); + recorderWrapper.putGfeLatencies(serverLatency); + recorderWrapper.putGfeMissingHeaders(connectivityErrorCount); + recorderWrapper.putFirstResponseLatencies(firstResponseLatency); + recorderWrapper.putBatchRequestThrottled(throttlingLatency); + + recorderWrapper.record("OK", TABLE_ID, ZONE, CLUSTER); + + Thread.sleep(100); + + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.OPERATION_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, "Bigtable.ReadRows", + BuiltinMeasureConstants.STATUS, "OK", + BuiltinMeasureConstants.TABLE, TABLE_ID, + BuiltinMeasureConstants.ZONE, ZONE, + BuiltinMeasureConstants.CLUSTER, CLUSTER, + BuiltinMeasureConstants.CLIENT_NAME, "bigtable-java", + BuiltinMeasureConstants.STREAMING, "true"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(operationLatency); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.ATTEMPT_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.ReadRows", + BuiltinMeasureConstants.STATUS, + "OK", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER, + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java", + BuiltinMeasureConstants.STREAMING, + "true"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(attemptLatency); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.RETRY_COUNT_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.ReadRows", + BuiltinMeasureConstants.STATUS, + "OK", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER, + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(attemptCount); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.SERVER_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.ReadRows", + BuiltinMeasureConstants.STATUS, + "OK", + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java", + BuiltinMeasureConstants.STREAMING, + "true", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(serverLatency); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.APPLICATION_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.ReadRows", + BuiltinMeasureConstants.STATUS, + "OK", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER, + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java", + BuiltinMeasureConstants.STREAMING, + "true"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(applicationLatency); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.CONNECTIVITY_ERROR_COUNT_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.ReadRows", + BuiltinMeasureConstants.STATUS, + "OK", + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(connectivityErrorCount); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.THROTTLING_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, "Bigtable.ReadRows", + BuiltinMeasureConstants.TABLE, TABLE_ID, + BuiltinMeasureConstants.ZONE, ZONE, + BuiltinMeasureConstants.CLUSTER, CLUSTER, + BuiltinMeasureConstants.CLIENT_NAME, "bigtable-java"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(throttlingLatency); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.FIRST_RESPONSE_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.ReadRows", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER, + BuiltinMeasureConstants.STATUS, + "OK", + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(firstResponseLatency); + } + + @Test + public void testUnaryOperations() throws InterruptedException { + StatsRecorderWrapper recorderWrapper = + new StatsRecorderWrapper( + ApiTracerFactory.OperationType.Unary, + SpanName.of("Bigtable", "MutateRow"), + ImmutableMap.of( + BuiltinMeasureConstants.PROJECT_ID.getName(), PROJECT_ID, + BuiltinMeasureConstants.INSTANCE_ID.getName(), INSTANCE_ID, + BuiltinMeasureConstants.APP_PROFILE.getName(), APP_PROFILE_ID), + statsComponent.getStatsRecorder()); + + long operationLatency = 1234; + int attemptCount = 2; + long attemptLatency = 56; + long serverLatency = 78; + long applicationLatency = 901; + long connectivityErrorCount = 15; + long throttlingLatency = 50; + long firstResponseLatency = 90; + + recorderWrapper.putOperationLatencies(operationLatency); + recorderWrapper.putRetryCount(attemptCount); + recorderWrapper.putAttemptLatencies(attemptLatency); + recorderWrapper.putApplicationLatencies(applicationLatency); + recorderWrapper.putGfeLatencies(serverLatency); + recorderWrapper.putGfeMissingHeaders(connectivityErrorCount); + recorderWrapper.putFirstResponseLatencies(firstResponseLatency); + recorderWrapper.putBatchRequestThrottled(throttlingLatency); + + recorderWrapper.record("UNAVAILABLE", TABLE_ID, ZONE, CLUSTER); + + Thread.sleep(100); + + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.OPERATION_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.MutateRow", + BuiltinMeasureConstants.STATUS, + "UNAVAILABLE", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER, + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java", + BuiltinMeasureConstants.STREAMING, + "false"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(operationLatency); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.ATTEMPT_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.MutateRow", + BuiltinMeasureConstants.STATUS, + "UNAVAILABLE", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER, + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java", + BuiltinMeasureConstants.STREAMING, + "false"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(attemptLatency); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.RETRY_COUNT_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.MutateRow", + BuiltinMeasureConstants.STATUS, + "UNAVAILABLE", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER, + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(attemptCount); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.SERVER_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.MutateRow", + BuiltinMeasureConstants.STATUS, + "UNAVAILABLE", + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java", + BuiltinMeasureConstants.STREAMING, + "false", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(serverLatency); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.APPLICATION_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.MutateRow", + BuiltinMeasureConstants.STATUS, + "UNAVAILABLE", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER, + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java", + BuiltinMeasureConstants.STREAMING, + "false"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(applicationLatency); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.CONNECTIVITY_ERROR_COUNT_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.MutateRow", + BuiltinMeasureConstants.STATUS, + "UNAVAILABLE", + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(connectivityErrorCount); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.THROTTLING_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, "Bigtable.MutateRow", + BuiltinMeasureConstants.TABLE, TABLE_ID, + BuiltinMeasureConstants.ZONE, ZONE, + BuiltinMeasureConstants.CLUSTER, CLUSTER, + BuiltinMeasureConstants.CLIENT_NAME, "bigtable-java"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(throttlingLatency); + assertThat( + getAggregationValueAsLong( + BuiltinViewConstants.FIRST_RESPONSE_LATENCIES_VIEW, + ImmutableMap.of( + BuiltinMeasureConstants.METHOD, + "Bigtable.MutateRow", + BuiltinMeasureConstants.TABLE, + TABLE_ID, + BuiltinMeasureConstants.ZONE, + ZONE, + BuiltinMeasureConstants.CLUSTER, + CLUSTER, + BuiltinMeasureConstants.STATUS, + "UNAVAILABLE", + BuiltinMeasureConstants.CLIENT_NAME, + "bigtable-java"), + PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + statsComponent.getViewManager())) + .isEqualTo(firstResponseLatency); + } + + long getAggregationValueAsLong( + View view, + ImmutableMap tags, + String projectId, + String instanceId, + String appProfileId, + ViewManager viewManager) { + ViewData viewData = viewManager.getView(view.getName()); + Map, AggregationData> aggregationMap = + Objects.requireNonNull(viewData).getAggregationMap(); + + List tagValues = new ArrayList<>(); + + for (TagKey column : view.getColumns()) { + if (BuiltinMeasureConstants.PROJECT_ID == column) { + tagValues.add(TagValue.create(projectId)); + } else if (BuiltinMeasureConstants.INSTANCE_ID == column) { + tagValues.add(TagValue.create(instanceId)); + } else if (BuiltinMeasureConstants.APP_PROFILE == column) { + tagValues.add(TagValue.create(appProfileId)); + } else { + tagValues.add(TagValue.create(tags.get(column))); + } + } + + AggregationData aggregationData = aggregationMap.get(tagValues); + + return aggregationData.match( + arg -> (long) arg.getSum(), + AggregationData.SumDataLong::getSum, + arg -> arg.getCount(), + arg -> (long) arg.getMean(), + arg -> (long) arg.getLastValue(), + AggregationData.LastValueDataLong::getLastValue, + arg -> { + throw new UnsupportedOperationException(); + }); + } +} diff --git a/pom.xml b/pom.xml index a22e9eee2e..74f02cdeb4 100644 --- a/pom.xml +++ b/pom.xml @@ -340,6 +340,7 @@ grpc-google-cloud-bigtable-v2 proto-google-cloud-bigtable-admin-v2 proto-google-cloud-bigtable-v2 + google-cloud-bigtable-stats google-cloud-bigtable-emulator-core google-cloud-bigtable-emulator google-cloud-bigtable-bom From 75d006601e51263786f38b445a9cc6f08cbee403 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 22 Jun 2022 02:06:11 +0200 Subject: [PATCH 13/23] deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.12 (#1284) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.11` -> `0.9.12` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/compatibility-slim/0.9.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/confidence-slim/0.9.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
graalvm/native-build-tools ### [`v0.9.12`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.12) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.11...0.9.12) ##### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Add Mockito / Byte Buddy support documentation by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/236](https://togithub.com/graalvm/native-build-tools/pull/236) - Prevent builds from failing if no test list is present by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/239](https://togithub.com/graalvm/native-build-tools/pull/239) - Support different agent modes in the native-image Gradle plugin by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/230](https://togithub.com/graalvm/native-build-tools/pull/230) - JVM Reachability Metadata support for Maven by [@​alvarosanchez](https://togithub.com/alvarosanchez) in [https://github.com/graalvm/native-build-tools/pull/240](https://togithub.com/graalvm/native-build-tools/pull/240) - Warn about deprecated agent DSL by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/242](https://togithub.com/graalvm/native-build-tools/pull/242) - Rework Maven plugin by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/247](https://togithub.com/graalvm/native-build-tools/pull/247) - Add Gradle rich output support, configure default metadata URL on Maven by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/249](https://togithub.com/graalvm/native-build-tools/pull/249) - Fix wrong scope for test dependencies by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/251](https://togithub.com/graalvm/native-build-tools/pull/251) - Add documentation for alternative build systems. by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/248](https://togithub.com/graalvm/native-build-tools/pull/248) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.11...0.9.12
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). --- samples/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index a732e469cb..fe945906e1 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -99,7 +99,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.11 + 0.9.12 true com.example.bigtable.NativeImageBigtableSample From ba7844acb6a4a3c47f1fc12b426f517b7fe3e55e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 22 Jun 2022 02:06:27 +0200 Subject: [PATCH 14/23] deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.12 (#1283) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:junit-platform-native](https://togithub.com/graalvm/native-build-tools) | `0.9.11` -> `0.9.12` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.12/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.12/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.12/compatibility-slim/0.9.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.12/confidence-slim/0.9.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
graalvm/native-build-tools ### [`v0.9.12`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.12) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.11...0.9.12) ##### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Add Mockito / Byte Buddy support documentation by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/236](https://togithub.com/graalvm/native-build-tools/pull/236) - Prevent builds from failing if no test list is present by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/239](https://togithub.com/graalvm/native-build-tools/pull/239) - Support different agent modes in the native-image Gradle plugin by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/230](https://togithub.com/graalvm/native-build-tools/pull/230) - JVM Reachability Metadata support for Maven by [@​alvarosanchez](https://togithub.com/alvarosanchez) in [https://github.com/graalvm/native-build-tools/pull/240](https://togithub.com/graalvm/native-build-tools/pull/240) - Warn about deprecated agent DSL by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/242](https://togithub.com/graalvm/native-build-tools/pull/242) - Rework Maven plugin by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/247](https://togithub.com/graalvm/native-build-tools/pull/247) - Add Gradle rich output support, configure default metadata URL on Maven by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/249](https://togithub.com/graalvm/native-build-tools/pull/249) - Fix wrong scope for test dependencies by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/251](https://togithub.com/graalvm/native-build-tools/pull/251) - Add documentation for alternative build systems. by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/248](https://togithub.com/graalvm/native-build-tools/pull/248) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.11...0.9.12
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). --- samples/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index fe945906e1..861190f078 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -89,7 +89,7 @@ org.graalvm.buildtools junit-platform-native - 0.9.11 + 0.9.12 test From 1dc77879ea51fd397b75020a16728adec72f1b9b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 23 Jun 2022 17:32:23 +0200 Subject: [PATCH 15/23] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 (#1285) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.12.0` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/compatibility-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/confidence-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.13.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​2130-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2120v2130-2022-06-22) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.12.0...v2.13.0) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.0 ([#​709](https://togithub.com/googleapis/java-shared-dependencies/issues/709)) ([239f8c3](https://togithub.com/googleapis/java-shared-dependencies/commit/239f8c33a11e233e6af79aee8c7e68cd156a0554)) - update dependency com.google.api-client:google-api-client-bom to v1.35.1 ([#​713](https://togithub.com/googleapis/java-shared-dependencies/issues/713)) ([6559b45](https://togithub.com/googleapis/java-shared-dependencies/commit/6559b45b027dba783a9525d35e32183d78773cbe)) - update dependency com.google.api:api-common to v2.2.1 ([#​710](https://togithub.com/googleapis/java-shared-dependencies/issues/710)) ([650d4c5](https://togithub.com/googleapis/java-shared-dependencies/commit/650d4c5f8c3cfce711257d47280ad773cd2e2414)) - update dependency com.google.errorprone:error_prone_annotations to v2.14.0 ([#​701](https://togithub.com/googleapis/java-shared-dependencies/issues/701)) ([d24730f](https://togithub.com/googleapis/java-shared-dependencies/commit/d24730f78669f80b109e590b903446e5552e3e36)) - update dependency com.google.http-client:google-http-client-bom to v1.42.0 ([#​711](https://togithub.com/googleapis/java-shared-dependencies/issues/711)) ([5168a18](https://togithub.com/googleapis/java-shared-dependencies/commit/5168a181722128d434a0d0d2ab5cc485686bbc78)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.0 ([#​708](https://togithub.com/googleapis/java-shared-dependencies/issues/708)) ([620336e](https://togithub.com/googleapis/java-shared-dependencies/commit/620336e6733e2017116e5e8a7b403b183a728bc1)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.1 ([#​712](https://togithub.com/googleapis/java-shared-dependencies/issues/712)) ([a2c18a5](https://togithub.com/googleapis/java-shared-dependencies/commit/a2c18a5bc4152cc9034cec691a29f54a35c38a51)) - update dependency com.google.protobuf:protobuf-bom to v3.21.0 ([#​703](https://togithub.com/googleapis/java-shared-dependencies/issues/703)) ([5f9fe12](https://togithub.com/googleapis/java-shared-dependencies/commit/5f9fe1200b4bdf4c54bf947c21bd3ed02f26f990)) - update dependency com.google.protobuf:protobuf-bom to v3.21.1 ([#​705](https://togithub.com/googleapis/java-shared-dependencies/issues/705)) ([c68edfb](https://togithub.com/googleapis/java-shared-dependencies/commit/c68edfbe7e1993e1112640b867b29aa2fbcf7579)) - update dependency io.grpc:grpc-bom to v1.47.0 ([#​707](https://togithub.com/googleapis/java-shared-dependencies/issues/707)) ([d02918a](https://togithub.com/googleapis/java-shared-dependencies/commit/d02918a0418cd65d1d247f27afb0637f1f8f5666)) - update dependency org.checkerframework:checker-qual to v3.22.1 ([#​706](https://togithub.com/googleapis/java-shared-dependencies/issues/706)) ([545843b](https://togithub.com/googleapis/java-shared-dependencies/commit/545843b492cead230b8cc72a1dae7d4922f33b39)) - update dependency org.checkerframework:checker-qual to v3.22.2 ([#​717](https://togithub.com/googleapis/java-shared-dependencies/issues/717)) ([142852a](https://togithub.com/googleapis/java-shared-dependencies/commit/142852a37140f221197f5c71aed451def353b1e0)) - update gax.version to v2.18.2 ([#​718](https://togithub.com/googleapis/java-shared-dependencies/issues/718)) ([5f8156e](https://togithub.com/googleapis/java-shared-dependencies/commit/5f8156e55c6a07b018a8c5efafa68be781b4288b)) - update google.common-protos.version to v2.9.0 ([#​714](https://togithub.com/googleapis/java-shared-dependencies/issues/714)) ([9e5591e](https://togithub.com/googleapis/java-shared-dependencies/commit/9e5591ec3035350450ecbfebd00e08216433b06c)) - update google.core.version to v2.8.0 ([#​719](https://togithub.com/googleapis/java-shared-dependencies/issues/719)) ([4023c60](https://togithub.com/googleapis/java-shared-dependencies/commit/4023c6063a2c5b5308da531df1a08c90c491965d)) - update iam.version to v1.4.0 ([#​700](https://togithub.com/googleapis/java-shared-dependencies/issues/700)) ([c1097a4](https://togithub.com/googleapis/java-shared-dependencies/commit/c1097a46ab0739b0b7234bc510e4c3d9ce2c2861)) - update iam.version to v1.4.1 ([#​716](https://togithub.com/googleapis/java-shared-dependencies/issues/716)) ([e2dc7c2](https://togithub.com/googleapis/java-shared-dependencies/commit/e2dc7c21c39e007878841e2664d548ec44a72d54))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). --- google-cloud-bigtable-deps-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml index 633c963b31..ac9ee970ff 100644 --- a/google-cloud-bigtable-deps-bom/pom.xml +++ b/google-cloud-bigtable-deps-bom/pom.xml @@ -65,7 +65,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.12.0 + 2.13.0 pom import From a96d3e8fd709a7e4c463a8448f6d3a1d3f3d8a07 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 14:23:47 -0400 Subject: [PATCH 16/23] chore: update dependencies for regapic (#1467) (#1287) * chore: update dependencies for regapic * add more dependencies and trigger comment * update goldens * fix indentation * remove duplicate gax-httpjson dependency * remove duplicated dependencies Source-Link: https://github.com/googleapis/synthtool/commit/fa54eb2a78c6ee48613fd33152e2130e949dcbd9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/common.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a79f06271b..f0625e4d94 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 -# created: 2022-05-19T15:12:45.278246753Z + digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 +# created: 2022-06-27T15:01:06.405564326Z diff --git a/.kokoro/common.sh b/.kokoro/common.sh index ace89f45a9..f8f957af11 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -55,4 +55,6 @@ function retry_with_backoff { ## Helper functionss function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } function msg() { println "$*" >&2; } -function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file +function println() { printf '%s\n' "$(now) $*"; } + +## Helper comment to trigger updated repo dependency release \ No newline at end of file From df77560debadec8b3aecc08e95a58558c418df86 Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Wed, 29 Jun 2022 10:15:06 -0400 Subject: [PATCH 17/23] feat: update tracers to use built in metrics (#1244) * feat: add built in metrics measure and views * remove status from application latency * Rename methods and add comments * update based on comments * feat: update tracers to use built in metrics * update on comments * make stopwatch thread safe * update comments * calculate application latency correctly * remove unused check * clean up tests * fix typo * update test * fix flaky test * fix retry count --- google-cloud-bigtable/pom.xml | 4 + .../data/v2/stub/EnhancedBigtableStub.java | 16 +- .../data/v2/stub/metrics/BigtableTracer.java | 27 +- .../v2/stub/metrics/BuiltinMetricsTracer.java | 246 +++++++++++ .../metrics/BuiltinMetricsTracerFactory.java | 50 +++ .../data/v2/stub/metrics/CompositeTracer.java | 35 +- .../HeaderTracerStreamingCallable.java | 36 +- .../metrics/HeaderTracerUnaryCallable.java | 2 +- .../data/v2/stub/metrics/MetricsTracer.java | 36 +- .../bigtable/data/v2/stub/metrics/Util.java | 44 +- .../metrics/BuiltinMetricsTracerTest.java | 414 ++++++++++++++++++ .../v2/stub/metrics/CompositeTracerTest.java | 12 +- .../metrics/HeaderTracerCallableTest.java | 19 - .../v2/stub/metrics/MetricsTracerTest.java | 12 - .../data/v2/stub/metrics/UtilTest.java | 10 +- 15 files changed, 877 insertions(+), 86 deletions(-) create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerFactory.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 6d1c003802..b5128af7ae 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -61,6 +61,10 @@ + + com.google.cloud + google-cloud-bigtable-stats + com.google.api diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index d8daaa80e6..b6d17baadf 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java @@ -70,6 +70,7 @@ import com.google.cloud.bigtable.data.v2.models.RowAdapter; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTracerFactory; import com.google.cloud.bigtable.data.v2.stub.metrics.CompositeTracerFactory; import com.google.cloud.bigtable.data.v2.stub.metrics.HeaderTracerStreamingCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.HeaderTracerUnaryCallable; @@ -194,6 +195,12 @@ public static EnhancedBigtableStubSettings finalizeSettings( RpcMeasureConstants.BIGTABLE_APP_PROFILE_ID, TagValue.create(settings.getAppProfileId())) .build(); + ImmutableMap builtinAttributes = + ImmutableMap.builder() + .put("project_id", settings.getProjectId()) + .put("instance_id", settings.getInstanceId()) + .put("app_profile", settings.getAppProfileId()) + .build(); // Inject Opencensus instrumentation builder.setTracerFactory( new CompositeTracerFactory( @@ -218,6 +225,7 @@ public static EnhancedBigtableStubSettings finalizeSettings( .build()), // Add OpenCensus Metrics MetricsTracerFactory.create(tagger, stats, attributes), + BuiltinMetricsTracerFactory.create(builtinAttributes), // Add user configured tracer settings.getTracerFactory()))); return builder.build(); @@ -466,7 +474,7 @@ private UnaryCallable> createBulkReadRowsCallable( new TracedBatcherUnaryCallable<>(readRowsUserCallable.all()); UnaryCallable> withHeaderTracer = - new HeaderTracerUnaryCallable(tracedBatcher); + new HeaderTracerUnaryCallable<>(tracedBatcher); UnaryCallable> traced = new TracedUnaryCallable<>(withHeaderTracer, clientContext.getTracerFactory(), span); @@ -594,11 +602,11 @@ private UnaryCallable createBulkMutateRowsCallable() { SpanName spanName = getSpanName("MutateRows"); - UnaryCallable tracedBatcher = new TracedBatcherUnaryCallable<>(userFacing); + UnaryCallable tracedBatcherUnaryCallable = + new TracedBatcherUnaryCallable<>(userFacing); UnaryCallable withHeaderTracer = - new HeaderTracerUnaryCallable<>(tracedBatcher); - + new HeaderTracerUnaryCallable<>(tracedBatcherUnaryCallable); UnaryCallable traced = new TracedUnaryCallable<>(withHeaderTracer, clientContext.getTracerFactory(), spanName); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java index 3d7707cc4c..2640cc1ced 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java @@ -25,7 +25,7 @@ * A Bigtable specific {@link ApiTracer} that includes additional contexts. This class is a base * implementation that does nothing. */ -@BetaApi("This surface is stable yet it might be removed in the future.") +@BetaApi("This surface is not stable yet it might be removed in the future.") public class BigtableTracer extends BaseApiTracer { private volatile int attempt = 0; @@ -35,6 +35,23 @@ public void attemptStarted(int attemptNumber) { this.attempt = attemptNumber; } + /** annotate when onRequest is called. This will be called in BuiltinMetricsTracer. */ + public void onRequest(int requestCount) { + // noop + } + + /** + * annotate when automatic flow control is disabled. This will be called in BuiltinMetricsTracer. + */ + public void disableFlowControl() { + // noop + } + + /** annotate after the callback from onResponse. This will be called in BuiltinMetricsTracer. */ + public void afterResponse(long applicationLatency) { + // noop + } + /** * Get the attempt number of the current call. Attempt number for the current call is passed in * and should be recorded in {@link #attemptStarted(int)}. With the getter we can access it from @@ -57,4 +74,12 @@ public void recordGfeMetadata(@Nullable Long latency, @Nullable Throwable throwa public void batchRequestThrottled(long throttledTimeMs) { // noop } + + /** + * Set the Bigtable zone and cluster so metrics can be tagged with location information. This will + * be called in BuiltinMetricsTracer. + */ + public void setLocations(String zone, String cluster) { + // noop + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java new file mode 100644 index 0000000000..2148c674e3 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java @@ -0,0 +1,246 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.metrics; + +import static com.google.api.gax.tracing.ApiTracerFactory.OperationType; + +import com.google.api.gax.tracing.SpanName; +import com.google.cloud.bigtable.stats.StatsRecorderWrapper; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Stopwatch; +import com.google.common.math.IntMath; +import java.util.concurrent.CancellationException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; +import javax.annotation.Nullable; +import org.threeten.bp.Duration; + +/** + * A {@link BigtableTracer} that records built-in metrics and publish under the + * bigtable.googleapis.com/client namespace + */ +class BuiltinMetricsTracer extends BigtableTracer { + + private final StatsRecorderWrapper recorder; + + private final OperationType operationType; + private final SpanName spanName; + + // Operation level metrics + private final AtomicBoolean opFinished = new AtomicBoolean(); + private final Stopwatch operationTimer = Stopwatch.createStarted(); + private final Stopwatch firstResponsePerOpTimer = Stopwatch.createStarted(); + + // Attempt level metrics + private int attemptCount = 0; + private Stopwatch attemptTimer; + private volatile int attempt = 0; + + // Total server latency needs to be atomic because it's accessed from different threads. E.g. + // request() from user thread and attempt failed from grpc thread. We're only measuring the extra + // time application spent blocking grpc buffer, which will be operationLatency - serverLatency. + private final AtomicLong totalServerLatency = new AtomicLong(0); + // Stopwatch is not thread safe so this is a workaround to check if the stopwatch changes is + // flushed to memory. + private final Stopwatch serverLatencyTimer = Stopwatch.createUnstarted(); + private final AtomicBoolean serverLatencyTimerIsRunning = new AtomicBoolean(); + + private boolean flowControlIsDisabled = false; + + private AtomicInteger requestLeft = new AtomicInteger(0); + + // Monitored resource labels + private String tableId = "undefined"; + private String zone = "undefined"; + private String cluster = "undefined"; + + // gfe stats + private AtomicLong gfeMissingHeaders = new AtomicLong(0); + + @VisibleForTesting + BuiltinMetricsTracer( + OperationType operationType, SpanName spanName, StatsRecorderWrapper recorder) { + this.operationType = operationType; + this.spanName = spanName; + this.recorder = recorder; + } + + @Override + public Scope inScope() { + return new Scope() { + @Override + public void close() {} + }; + } + + @Override + public void operationSucceeded() { + recordOperationCompletion(null); + } + + @Override + public void operationCancelled() { + recordOperationCompletion(new CancellationException()); + } + + @Override + public void operationFailed(Throwable error) { + recordOperationCompletion(error); + } + + @Override + public void attemptStarted(int attemptNumber) { + attemptStarted(null, attemptNumber); + } + + @Override + public void attemptStarted(Object request, int attemptNumber) { + this.attempt = attemptNumber; + attemptCount++; + attemptTimer = Stopwatch.createStarted(); + if (request != null) { + this.tableId = Util.extractTableId(request); + } + if (!flowControlIsDisabled) { + if (serverLatencyTimerIsRunning.compareAndSet(false, true)) { + serverLatencyTimer.start(); + } + } + } + + @Override + public void attemptSucceeded() { + recordAttemptCompletion(null); + } + + @Override + public void attemptCancelled() { + recordAttemptCompletion(new CancellationException()); + } + + @Override + public void attemptFailed(Throwable error, Duration delay) { + recordAttemptCompletion(error); + } + + @Override + public void onRequest(int requestCount) { + requestLeft.accumulateAndGet(requestCount, IntMath::saturatedAdd); + if (flowControlIsDisabled) { + // On request is only called when auto flow control is disabled. When auto flow control is + // disabled, server latency is measured between onRequest and onResponse. + if (serverLatencyTimerIsRunning.compareAndSet(false, true)) { + serverLatencyTimer.start(); + } + } + } + + @Override + public void responseReceived() { + // When auto flow control is enabled, server latency is measured between afterResponse and + // responseReceived. + // When auto flow control is disabled, server latency is measured between onRequest and + // responseReceived. + // When auto flow control is disabled and application requested multiple responses, server + // latency is measured between afterResponse and responseReceived. + // In all the cases, we want to stop the serverLatencyTimer here. + if (serverLatencyTimerIsRunning.compareAndSet(true, false)) { + totalServerLatency.addAndGet(serverLatencyTimer.elapsed(TimeUnit.MILLISECONDS)); + serverLatencyTimer.reset(); + } + } + + @Override + public void afterResponse(long applicationLatency) { + if (!flowControlIsDisabled || requestLeft.decrementAndGet() > 0) { + // When auto flow control is enabled, request will never be called, so server latency is + // measured between after the last response is processed and before the next response is + // received. If flow control is disabled but requestLeft is greater than 0, + // also start the timer to count the time between afterResponse and responseReceived. + if (serverLatencyTimerIsRunning.compareAndSet(false, true)) { + serverLatencyTimer.start(); + } + } + } + + @Override + public int getAttempt() { + return attempt; + } + + @Override + public void recordGfeMetadata(@Nullable Long latency, @Nullable Throwable throwable) { + // Record the metrics and put in the map after the attempt is done, so we can have cluster and + // zone information + if (latency != null) { + recorder.putGfeLatencies(latency); + } else { + gfeMissingHeaders.incrementAndGet(); + } + recorder.putGfeMissingHeaders(gfeMissingHeaders.get()); + } + + @Override + public void setLocations(String zone, String cluster) { + this.zone = zone; + this.cluster = cluster; + } + + @Override + public void batchRequestThrottled(long throttledTimeMs) { + recorder.putBatchRequestThrottled(throttledTimeMs); + } + + @Override + public void disableFlowControl() { + flowControlIsDisabled = true; + } + + private void recordOperationCompletion(@Nullable Throwable status) { + if (!opFinished.compareAndSet(false, true)) { + return; + } + operationTimer.stop(); + long operationLatency = operationTimer.elapsed(TimeUnit.MILLISECONDS); + + recorder.putRetryCount(attemptCount - 1); + + // serverLatencyTimer should already be stopped in recordAttemptCompletion + recorder.putOperationLatencies(operationLatency); + recorder.putApplicationLatencies(operationLatency - totalServerLatency.get()); + + if (operationType == OperationType.ServerStreaming + && spanName.getMethodName().equals("ReadRows")) { + recorder.putFirstResponseLatencies(firstResponsePerOpTimer.elapsed(TimeUnit.MILLISECONDS)); + } + + recorder.record(Util.extractStatus(status), tableId, zone, cluster); + } + + private void recordAttemptCompletion(@Nullable Throwable status) { + // If the attempt failed, the time spent in retry should be counted in application latency. + // Stop the stopwatch and decrement requestLeft. + if (serverLatencyTimerIsRunning.compareAndSet(true, false)) { + requestLeft.decrementAndGet(); + totalServerLatency.addAndGet(serverLatencyTimer.elapsed(TimeUnit.MILLISECONDS)); + serverLatencyTimer.reset(); + } + recorder.putAttemptLatencies(attemptTimer.elapsed(TimeUnit.MILLISECONDS)); + recorder.record(Util.extractStatus(status), tableId, zone, cluster); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerFactory.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerFactory.java new file mode 100644 index 0000000000..794997071d --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerFactory.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.metrics; + +import com.google.api.core.InternalApi; +import com.google.api.gax.tracing.ApiTracer; +import com.google.api.gax.tracing.ApiTracerFactory; +import com.google.api.gax.tracing.BaseApiTracerFactory; +import com.google.api.gax.tracing.SpanName; +import com.google.cloud.bigtable.stats.StatsWrapper; +import com.google.common.collect.ImmutableMap; + +/** + * {@link ApiTracerFactory} that will generate OpenCensus metrics by using the {@link ApiTracer} + * api. + */ +@InternalApi("For internal use only") +public class BuiltinMetricsTracerFactory extends BaseApiTracerFactory { + + private final ImmutableMap statsAttributes; + + public static BuiltinMetricsTracerFactory create(ImmutableMap statsAttributes) { + return new BuiltinMetricsTracerFactory(statsAttributes); + } + + private BuiltinMetricsTracerFactory(ImmutableMap statsAttributes) { + this.statsAttributes = statsAttributes; + } + + @Override + public ApiTracer newTracer(ApiTracer parent, SpanName spanName, OperationType operationType) { + return new BuiltinMetricsTracer( + operationType, + spanName, + StatsWrapper.createRecorder(operationType, spanName, statsAttributes)); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java index 5f4580743b..271782c2f6 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java @@ -92,9 +92,14 @@ public void connectionSelected(String id) { @Override public void attemptStarted(int attemptNumber) { + attemptStarted(null, attemptNumber); + } + + @Override + public void attemptStarted(Object request, int attemptNumber) { this.attempt = attemptNumber; for (ApiTracer child : children) { - child.attemptStarted(attemptNumber); + child.attemptStarted(request, attemptNumber); } } @@ -185,4 +190,32 @@ public void batchRequestThrottled(long throttledTimeMs) { tracer.batchRequestThrottled(throttledTimeMs); } } + + @Override + public void setLocations(String zone, String cluster) { + for (BigtableTracer tracer : bigtableTracers) { + tracer.setLocations(zone, cluster); + } + } + + @Override + public void onRequest(int requestCount) { + for (BigtableTracer tracer : bigtableTracers) { + tracer.onRequest(requestCount); + } + } + + @Override + public void disableFlowControl() { + for (BigtableTracer tracer : bigtableTracers) { + tracer.disableFlowControl(); + } + } + + @Override + public void afterResponse(long applicationLatency) { + for (BigtableTracer tracer : bigtableTracers) { + tracer.afterResponse(applicationLatency); + } + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerStreamingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerStreamingCallable.java index 31c5cf1960..f73511dc4c 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerStreamingCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerStreamingCallable.java @@ -22,7 +22,9 @@ import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.StreamController; import com.google.common.base.Preconditions; +import com.google.common.base.Stopwatch; import io.grpc.Metadata; +import java.util.concurrent.TimeUnit; import javax.annotation.Nonnull; /** @@ -55,7 +57,7 @@ public void call( RequestT request, ResponseObserver responseObserver, ApiCallContext context) { final GrpcResponseMetadata responseMetadata = new GrpcResponseMetadata(); // tracer should always be an instance of bigtable tracer - if (RpcViews.isGfeMetricsRegistered() && context.getTracer() instanceof BigtableTracer) { + if (context.getTracer() instanceof BigtableTracer) { HeaderTracerResponseObserver innerObserver = new HeaderTracerResponseObserver<>( responseObserver, (BigtableTracer) context.getTracer(), responseMetadata); @@ -82,12 +84,15 @@ private class HeaderTracerResponseObserver implements ResponseObserve @Override public void onStart(final StreamController controller) { - outerObserver.onStart(controller); + TracedStreamController tracedController = new TracedStreamController(controller, tracer); + outerObserver.onStart(tracedController); } @Override public void onResponse(ResponseT response) { + Stopwatch stopwatch = Stopwatch.createStarted(); outerObserver.onResponse(response); + tracer.afterResponse(stopwatch.elapsed(TimeUnit.MILLISECONDS)); } @Override @@ -108,4 +113,31 @@ public void onComplete() { outerObserver.onComplete(); } } + + private class TracedStreamController implements StreamController { + private final StreamController innerController; + private final BigtableTracer tracer; + + TracedStreamController(StreamController innerController, BigtableTracer tracer) { + this.innerController = innerController; + this.tracer = tracer; + } + + @Override + public void cancel() { + innerController.cancel(); + } + + @Override + public void disableAutoInboundFlowControl() { + tracer.disableFlowControl(); + innerController.disableAutoInboundFlowControl(); + } + + @Override + public void request(int i) { + tracer.onRequest(i); + innerController.request(i); + } + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerUnaryCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerUnaryCallable.java index 6335b433ef..adbb6c84a9 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerUnaryCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerUnaryCallable.java @@ -54,7 +54,7 @@ public HeaderTracerUnaryCallable(@Nonnull UnaryCallable inn @Override public ApiFuture futureCall(RequestT request, ApiCallContext context) { // tracer should always be an instance of BigtableTracer - if (RpcViews.isGfeMetricsRegistered() && context.getTracer() instanceof BigtableTracer) { + if (context.getTracer() instanceof BigtableTracer) { final GrpcResponseMetadata responseMetadata = new GrpcResponseMetadata(); final ApiCallContext contextWithResponseMetadata = responseMetadata.addHandlers(context); HeaderTracerUnaryCallback callback = diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java index f28b07c0cb..3c63b1b5f7 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java @@ -118,16 +118,13 @@ private void recordOperationCompletion(@Nullable Throwable throwable) { TagContextBuilder tagCtx = newTagCtxBuilder() - .putLocal(RpcMeasureConstants.BIGTABLE_STATUS, Util.extractStatus(throwable)); + .putLocal( + RpcMeasureConstants.BIGTABLE_STATUS, + TagValue.create(Util.extractStatus(throwable))); measures.record(tagCtx.build()); } - @Override - public void connectionSelected(String s) { - // noop: cardinality for connection ids is too high to use as tags - } - @Override public void attemptStarted(int attemptNumber) { attempt = attemptNumber; @@ -171,21 +168,13 @@ private void recordAttemptCompletion(@Nullable Throwable throwable) { TagContextBuilder tagCtx = newTagCtxBuilder() - .putLocal(RpcMeasureConstants.BIGTABLE_STATUS, Util.extractStatus(throwable)); + .putLocal( + RpcMeasureConstants.BIGTABLE_STATUS, + TagValue.create(Util.extractStatus(throwable))); measures.record(tagCtx.build()); } - @Override - public void lroStartFailed(Throwable throwable) { - // noop - } - - @Override - public void lroStartSucceeded() { - // noop - } - @Override public void responseReceived() { if (firstResponsePerOpTimer.isRunning()) { @@ -195,16 +184,6 @@ public void responseReceived() { operationResponseCount++; } - @Override - public void requestSent() { - // noop: no operations are client streaming - } - - @Override - public void batchRequestSent(long elementCount, long requestSize) { - // noop - } - @Override public int getAttempt() { return attempt; @@ -222,7 +201,8 @@ public void recordGfeMetadata(@Nullable Long latency, @Nullable Throwable throwa } measures.record( newTagCtxBuilder() - .putLocal(RpcMeasureConstants.BIGTABLE_STATUS, Util.extractStatus(throwable)) + .putLocal( + RpcMeasureConstants.BIGTABLE_STATUS, TagValue.create(Util.extractStatus(throwable))) .build()); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java index 00995b717a..0440029027 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java @@ -15,10 +15,19 @@ */ package com.google.cloud.bigtable.data.v2.stub.metrics; +import com.google.api.core.InternalApi; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiException; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StatusCode.Code; +import com.google.bigtable.v2.CheckAndMutateRowRequest; +import com.google.bigtable.v2.MutateRowRequest; +import com.google.bigtable.v2.MutateRowsRequest; +import com.google.bigtable.v2.ReadModifyWriteRowRequest; +import com.google.bigtable.v2.ReadRowsRequest; +import com.google.bigtable.v2.SampleRowKeysRequest; +import com.google.bigtable.v2.TableName; +import com.google.common.base.Strings; import com.google.common.collect.ImmutableMap; import io.grpc.Metadata; import io.grpc.Status; @@ -38,7 +47,8 @@ import javax.annotation.Nullable; /** Utilities to help integrating with OpenCensus. */ -class Util { +@InternalApi("For internal use only") +public class Util { static final Metadata.Key ATTEMPT_HEADER_KEY = Metadata.Key.of("bigtable-attempt", Metadata.ASCII_STRING_MARSHALLER); static final Metadata.Key ATTEMPT_EPOCH_KEY = @@ -48,14 +58,14 @@ class Util { Metadata.Key.of("server-timing", Metadata.ASCII_STRING_MARSHALLER); private static final Pattern SERVER_TIMING_HEADER_PATTERN = Pattern.compile(".*dur=(?\\d+)"); - private static final TagValue OK_STATUS = TagValue.create(StatusCode.Code.OK.toString()); + static final String TRAILER_KEY = "x-goog-ext-425905942-bin"; - /** Convert an exception into a value that can be used as an OpenCensus tag value. */ - static TagValue extractStatus(@Nullable Throwable error) { + /** Convert an exception into a value that can be used to create an OpenCensus tag value. */ + static String extractStatus(@Nullable Throwable error) { final String statusString; if (error == null) { - return OK_STATUS; + return StatusCode.Code.OK.toString(); } else if (error instanceof CancellationException) { statusString = Status.Code.CANCELLED.toString(); } else if (error instanceof ApiException) { @@ -68,14 +78,14 @@ static TagValue extractStatus(@Nullable Throwable error) { statusString = Code.UNKNOWN.toString(); } - return TagValue.create(statusString); + return statusString; } /** * Await the result of the future and convert it into a value that can be used as an OpenCensus * tag value. */ - static TagValue extractStatus(Future future) { + static TagValue extractStatusFromFuture(Future future) { Throwable error = null; try { @@ -88,7 +98,25 @@ static TagValue extractStatus(Future future) { } catch (RuntimeException e) { error = e; } - return extractStatus(error); + return TagValue.create(extractStatus(error)); + } + + static String extractTableId(Object request) { + String tableName = null; + if (request instanceof ReadRowsRequest) { + tableName = ((ReadRowsRequest) request).getTableName(); + } else if (request instanceof MutateRowsRequest) { + tableName = ((MutateRowsRequest) request).getTableName(); + } else if (request instanceof MutateRowRequest) { + tableName = ((MutateRowRequest) request).getTableName(); + } else if (request instanceof SampleRowKeysRequest) { + tableName = ((SampleRowKeysRequest) request).getTableName(); + } else if (request instanceof CheckAndMutateRowRequest) { + tableName = ((CheckAndMutateRowRequest) request).getTableName(); + } else if (request instanceof ReadModifyWriteRowRequest) { + tableName = ((ReadModifyWriteRowRequest) request).getTableName(); + } + return !Strings.isNullOrEmpty(tableName) ? TableName.parse(tableName).getTable() : "undefined"; } /** diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java new file mode 100644 index 0000000000..a48df92254 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java @@ -0,0 +1,414 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.metrics; + +import static com.google.api.gax.tracing.ApiTracerFactory.OperationType; +import static com.google.common.truth.Truth.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.timeout; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import com.google.api.client.util.Lists; +import com.google.api.core.SettableApiFuture; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.StreamController; +import com.google.api.gax.tracing.SpanName; +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.MutateRowRequest; +import com.google.bigtable.v2.MutateRowResponse; +import com.google.bigtable.v2.ReadRowsRequest; +import com.google.bigtable.v2.ReadRowsResponse; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; +import com.google.cloud.bigtable.stats.StatsRecorderWrapper; +import com.google.common.base.Stopwatch; +import com.google.common.collect.Range; +import com.google.protobuf.ByteString; +import com.google.protobuf.BytesValue; +import com.google.protobuf.StringValue; +import io.grpc.ForwardingServerCall; +import io.grpc.Metadata; +import io.grpc.Server; +import io.grpc.ServerCall; +import io.grpc.ServerCallHandler; +import io.grpc.ServerInterceptor; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import io.grpc.stub.ServerCallStreamObserver; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; +import org.mockito.stubbing.Answer; +import org.threeten.bp.Duration; + +@RunWith(JUnit4.class) +public class BuiltinMetricsTracerTest { + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String APP_PROFILE_ID = "default"; + private static final String TABLE_ID = "fake-table"; + private static final String UNDEFINED = "undefined"; + private static final long FAKE_SERVER_TIMING = 50; + private static final long SERVER_LATENCY = 100; + private static final long APPLICATION_LATENCY = 200; + + @Rule public final MockitoRule mockitoRule = MockitoJUnit.rule(); + + private FakeService fakeService; + private Server server; + + private EnhancedBigtableStub stub; + + @Mock private BuiltinMetricsTracerFactory mockFactory; + @Mock private StatsRecorderWrapper statsRecorderWrapper; + + @Captor private ArgumentCaptor status; + @Captor private ArgumentCaptor tableId; + @Captor private ArgumentCaptor zone; + @Captor private ArgumentCaptor cluster; + + @Before + public void setUp() throws Exception { + fakeService = new FakeService(); + + // Add an interceptor to add server-timing in headers + ServerInterceptor trailersInterceptor = + new ServerInterceptor() { + @Override + public ServerCall.Listener interceptCall( + ServerCall serverCall, + Metadata metadata, + ServerCallHandler serverCallHandler) { + return serverCallHandler.startCall( + new ForwardingServerCall.SimpleForwardingServerCall(serverCall) { + @Override + public void sendHeaders(Metadata headers) { + headers.put( + Metadata.Key.of("server-timing", Metadata.ASCII_STRING_MARSHALLER), + String.format("gfet4t7; dur=%d", FAKE_SERVER_TIMING)); + super.sendHeaders(headers); + } + }, + metadata); + } + }; + + server = FakeServiceBuilder.create(fakeService).intercept(trailersInterceptor).start(); + + BigtableDataSettings settings = + BigtableDataSettings.newBuilderForEmulator(server.getPort()) + .setProjectId(PROJECT_ID) + .setInstanceId(INSTANCE_ID) + .setAppProfileId(APP_PROFILE_ID) + .build(); + EnhancedBigtableStubSettings.Builder stubSettingsBuilder = + settings.getStubSettings().toBuilder(); + stubSettingsBuilder + .mutateRowSettings() + .retrySettings() + .setInitialRetryDelay(Duration.ofMillis(200)); + stubSettingsBuilder.setTracerFactory(mockFactory); + + EnhancedBigtableStubSettings stubSettings = stubSettingsBuilder.build(); + stub = new EnhancedBigtableStub(stubSettings, ClientContext.create(stubSettings)); + } + + @After + public void tearDown() { + stub.close(); + server.shutdown(); + } + + @Test + public void testOperationLatencies() { + when(mockFactory.newTracer(any(), any(), any())) + .thenAnswer( + (Answer) + invocationOnMock -> + new BuiltinMetricsTracer( + OperationType.ServerStreaming, + SpanName.of("Bigtable", "ReadRows"), + statsRecorderWrapper)); + ArgumentCaptor operationLatency = ArgumentCaptor.forClass(Long.class); + + Stopwatch stopwatch = Stopwatch.createStarted(); + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID)).iterator()); + long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); + + verify(statsRecorderWrapper).putOperationLatencies(operationLatency.capture()); + + assertThat(operationLatency.getValue()).isIn(Range.closed(SERVER_LATENCY, elapsed)); + } + + @Test + public void testGfeMetrics() { + when(mockFactory.newTracer(any(), any(), any())) + .thenAnswer( + (Answer) + invocationOnMock -> + new BuiltinMetricsTracer( + OperationType.ServerStreaming, + SpanName.of("Bigtable", "ReadRows"), + statsRecorderWrapper)); + ArgumentCaptor gfeLatency = ArgumentCaptor.forClass(Long.class); + ArgumentCaptor gfeMissingHeaders = ArgumentCaptor.forClass(Long.class); + + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); + + // The request was retried and gfe latency is only recorded in the retry attempt + verify(statsRecorderWrapper).putGfeLatencies(gfeLatency.capture()); + assertThat(gfeLatency.getValue()).isEqualTo(FAKE_SERVER_TIMING); + + // The first time the request was retried, it'll increment missing header counter + verify(statsRecorderWrapper, times(fakeService.getAttemptCounter().get())) + .putGfeMissingHeaders(gfeMissingHeaders.capture()); + assertThat(gfeMissingHeaders.getValue()).isEqualTo(1); + } + + @Test + public void testReadRowsApplicationLatencyWithAutoFlowControl() throws Exception { + when(mockFactory.newTracer(any(), any(), any())) + .thenAnswer( + (Answer) + invocationOnMock -> + new BuiltinMetricsTracer( + OperationType.ServerStreaming, + SpanName.of("Bigtable", "ReadRows"), + statsRecorderWrapper)); + + ArgumentCaptor applicationLatency = ArgumentCaptor.forClass(Long.class); + ArgumentCaptor operationLatency = ArgumentCaptor.forClass(Long.class); + + final SettableApiFuture future = SettableApiFuture.create(); + final AtomicInteger counter = new AtomicInteger(0); + // For auto flow control, application latency is the time application spent in onResponse. + stub.readRowsCallable() + .call( + Query.create(TABLE_ID), + new ResponseObserver() { + @Override + public void onStart(StreamController streamController) {} + + @Override + public void onResponse(Row row) { + try { + counter.getAndIncrement(); + Thread.sleep(APPLICATION_LATENCY); + } catch (InterruptedException e) { + } + } + + @Override + public void onError(Throwable throwable) { + future.setException(throwable); + } + + @Override + public void onComplete() { + future.set(null); + } + }); + future.get(); + + verify(statsRecorderWrapper).putApplicationLatencies(applicationLatency.capture()); + verify(statsRecorderWrapper).putOperationLatencies(operationLatency.capture()); + + assertThat(counter.get()).isEqualTo(fakeService.getResponseCounter().get()); + assertThat(applicationLatency.getValue()).isAtLeast(APPLICATION_LATENCY * counter.get()); + assertThat(applicationLatency.getValue()) + .isAtMost(operationLatency.getValue() - SERVER_LATENCY); + } + + @Test + public void testReadRowsApplicationLatencyWithManualFlowControl() throws Exception { + when(mockFactory.newTracer(any(), any(), any())) + .thenAnswer( + (Answer) + invocationOnMock -> + new BuiltinMetricsTracer( + OperationType.ServerStreaming, + SpanName.of("Bigtable", "ReadRows"), + statsRecorderWrapper)); + + ArgumentCaptor applicationLatency = ArgumentCaptor.forClass(Long.class); + ArgumentCaptor operationLatency = ArgumentCaptor.forClass(Long.class); + int counter = 0; + + Iterator rows = stub.readRowsCallable().call(Query.create(TABLE_ID)).iterator(); + + while (rows.hasNext()) { + counter++; + Thread.sleep(APPLICATION_LATENCY); + rows.next(); + } + + verify(statsRecorderWrapper).putApplicationLatencies(applicationLatency.capture()); + verify(statsRecorderWrapper).putOperationLatencies(operationLatency.capture()); + + // For manual flow control, the last application latency shouldn't count, because at that point + // the server already sent back all the responses. + assertThat(counter).isEqualTo(fakeService.getResponseCounter().get()); + assertThat(applicationLatency.getValue()) + .isAtLeast(APPLICATION_LATENCY * (counter - 1) - SERVER_LATENCY); + assertThat(applicationLatency.getValue()) + .isAtMost(operationLatency.getValue() - SERVER_LATENCY); + } + + @Test + public void testRetryCount() { + when(mockFactory.newTracer(any(), any(), any())) + .thenAnswer( + (Answer) + invocationOnMock -> + new BuiltinMetricsTracer( + OperationType.ServerStreaming, + SpanName.of("Bigtable", "ReadRows"), + statsRecorderWrapper)); + + ArgumentCaptor retryCount = ArgumentCaptor.forClass(Integer.class); + + stub.mutateRowCallable() + .call(RowMutation.create(TABLE_ID, "random-row").setCell("cf", "q", "value")); + + verify(statsRecorderWrapper).putRetryCount(retryCount.capture()); + + assertThat(retryCount.getValue()).isEqualTo(fakeService.getAttemptCounter().get() - 1); + } + + @Test + public void testMutateRowAttempts() { + when(mockFactory.newTracer(any(), any(), any())) + .thenReturn( + new BuiltinMetricsTracer( + OperationType.Unary, SpanName.of("Bigtable", "MutateRow"), statsRecorderWrapper)); + + stub.mutateRowCallable() + .call(RowMutation.create(TABLE_ID, "random-row").setCell("cf", "q", "value")); + + // record() will get called 4 times, 3 times for attempts and 1 for recording operation level + // metrics. Also set a timeout to reduce flakiness of this test. BasicRetryingFuture will set + // attempt succeeded and set the response which will call complete() in AbstractFuture which + // calls releaseWaiters(). onOperationComplete() is called in TracerFinisher which will be + // called after the mutateRow call is returned. So there's a race between when the call returns + // and when the record() is called in onOperationCompletion(). + verify(statsRecorderWrapper, timeout(10).times(fakeService.getAttemptCounter().get() + 1)) + .record(status.capture(), tableId.capture(), zone.capture(), cluster.capture()); + assertThat(zone.getAllValues()).containsExactly(UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED); + assertThat(cluster.getAllValues()).containsExactly(UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED); + assertThat(status.getAllValues()).containsExactly("UNAVAILABLE", "UNAVAILABLE", "OK", "OK"); + } + + private static class FakeService extends BigtableGrpc.BigtableImplBase { + + static List createFakeResponse() { + List responses = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + responses.add( + ReadRowsResponse.newBuilder() + .addChunks( + ReadRowsResponse.CellChunk.newBuilder() + .setRowKey(ByteString.copyFromUtf8("fake-key-" + i)) + .setFamilyName(StringValue.of("cf")) + .setQualifier( + BytesValue.newBuilder().setValue(ByteString.copyFromUtf8("q"))) + .setTimestampMicros(1_000) + .setValue( + ByteString.copyFromUtf8( + String.join("", Collections.nCopies(1024 * 1024, "A")))) + .setCommitRow(true)) + .build()); + } + return responses; + } + + private final AtomicInteger attemptCounter = new AtomicInteger(0); + private final AtomicInteger responseCounter = new AtomicInteger(0); + private final Iterator source = createFakeResponse().listIterator(); + + @Override + public void readRows( + ReadRowsRequest request, StreamObserver responseObserver) { + final AtomicBoolean done = new AtomicBoolean(); + final ServerCallStreamObserver target = + (ServerCallStreamObserver) responseObserver; + try { + Thread.sleep(SERVER_LATENCY); + } catch (InterruptedException e) { + } + if (attemptCounter.getAndIncrement() == 0) { + target.onError(new StatusRuntimeException(Status.UNAVAILABLE)); + return; + } + + // Only return the next response when the buffer is emptied for testing manual flow control. + // The fake service won't keep calling onNext unless it received an onRequest event from + // the application thread + target.setOnReadyHandler( + () -> { + while (target.isReady() && source.hasNext()) { + responseCounter.getAndIncrement(); + target.onNext(source.next()); + } + if (!source.hasNext() && done.compareAndSet(false, true)) { + target.onCompleted(); + } + }); + } + + @Override + public void mutateRow( + MutateRowRequest request, StreamObserver responseObserver) { + if (attemptCounter.getAndIncrement() < 2) { + responseObserver.onError(new StatusRuntimeException(Status.UNAVAILABLE)); + return; + } + responseObserver.onNext(MutateRowResponse.getDefaultInstance()); + responseObserver.onCompleted(); + } + + public AtomicInteger getAttemptCounter() { + return attemptCounter; + } + + public AtomicInteger getResponseCounter() { + return responseCounter; + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerTest.java index 69a741d0e3..0de14636c6 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerTest.java @@ -23,6 +23,7 @@ import com.google.api.gax.tracing.ApiTracer; import com.google.api.gax.tracing.ApiTracer.Scope; +import com.google.bigtable.v2.ReadRowsRequest; import com.google.cloud.bigtable.misc_utilities.MethodComparator; import com.google.common.collect.ImmutableList; import io.grpc.Status; @@ -118,11 +119,12 @@ public void testConnectionSelected() { @Test public void testAttemptStarted() { - compositeTracer.attemptStarted(3); - verify(child1, times(1)).attemptStarted(3); - verify(child2, times(1)).attemptStarted(3); - verify(child3, times(1)).attemptStarted(3); - verify(child4, times(1)).attemptStarted(3); + ReadRowsRequest request = ReadRowsRequest.getDefaultInstance(); + compositeTracer.attemptStarted(request, 3); + verify(child1, times(1)).attemptStarted(request, 3); + verify(child2, times(1)).attemptStarted(request, 3); + verify(child3, times(1)).attemptStarted(request, 3); + verify(child4, times(1)).attemptStarted(request, 3); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerCallableTest.java index d6dbb969f1..d93859bbad 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerCallableTest.java @@ -56,7 +56,6 @@ import io.grpc.stub.StreamObserver; import io.opencensus.impl.stats.StatsComponentImpl; import io.opencensus.stats.StatsComponent; -import io.opencensus.stats.ViewData; import io.opencensus.tags.TagKey; import io.opencensus.tags.TagValue; import io.opencensus.tags.Tags; @@ -383,24 +382,6 @@ public void testMetricsWithErrorResponse() throws InterruptedException { assertThat(missingCount).isEqualTo(attempts); } - @Test - public void testCallableBypassed() throws InterruptedException { - RpcViews.setGfeMetricsRegistered(false); - stub.readRowsCallable().call(Query.create(TABLE_ID)); - Thread.sleep(WAIT_FOR_METRICS_TIME_MS); - ViewData headerMissingView = - localStats - .getViewManager() - .getView(RpcViewConstants.BIGTABLE_GFE_HEADER_MISSING_COUNT_VIEW.getName()); - ViewData latencyView = - localStats.getViewManager().getView(RpcViewConstants.BIGTABLE_GFE_LATENCY_VIEW.getName()); - // Verify that the view is registered by it's not collecting metrics - assertThat(headerMissingView).isNotNull(); - assertThat(latencyView).isNotNull(); - assertThat(headerMissingView.getAggregationMap()).isEmpty(); - assertThat(latencyView.getAggregationMap()).isEmpty(); - } - private class FakeService extends BigtableImplBase { private final String defaultTableName = NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracerTest.java index 1176214de3..b1b966ee9d 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracerTest.java @@ -42,7 +42,6 @@ import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsBatchingDescriptor; -import com.google.cloud.bigtable.misc_utilities.MethodComparator; import com.google.common.base.Stopwatch; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; @@ -59,8 +58,6 @@ import io.opencensus.tags.TagKey; import io.opencensus.tags.TagValue; import io.opencensus.tags.Tags; -import java.lang.reflect.Method; -import java.util.Arrays; import java.util.Iterator; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -485,15 +482,6 @@ public Object answer(InvocationOnMock invocation) { assertThat(throttledTimeMetric).isAtLeast(throttled); } - @Test - public void testMethodsOverride() { - Method[] baseMethods = BigtableTracer.class.getDeclaredMethods(); - Method[] metricsTracerMethods = MetricsTracer.class.getDeclaredMethods(); - assertThat(Arrays.asList(metricsTracerMethods)) - .comparingElementsUsing(MethodComparator.METHOD_CORRESPONDENCE) - .containsAtLeastElementsIn(baseMethods); - } - @SuppressWarnings("unchecked") private static StreamObserver anyObserver(Class returnType) { return (StreamObserver) any(returnType); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/UtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/UtilTest.java index efef3b67d2..3c0fb4e617 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/UtilTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/UtilTest.java @@ -30,13 +30,13 @@ public class UtilTest { @Test public void testOk() { - TagValue tagValue = Util.extractStatus((Throwable) null); + TagValue tagValue = TagValue.create(Util.extractStatus((Throwable) null)); assertThat(tagValue.asString()).isEqualTo("OK"); } @Test public void testOkFuture() { - TagValue tagValue = Util.extractStatus(Futures.immediateFuture(null)); + TagValue tagValue = Util.extractStatusFromFuture(Futures.immediateFuture(null)); assertThat(tagValue.asString()).isEqualTo("OK"); } @@ -45,7 +45,7 @@ public void testError() { DeadlineExceededException error = new DeadlineExceededException( "Deadline exceeded", null, GrpcStatusCode.of(Status.Code.DEADLINE_EXCEEDED), true); - TagValue tagValue = Util.extractStatus(error); + TagValue tagValue = TagValue.create(Util.extractStatus(error)); assertThat(tagValue.asString()).isEqualTo("DEADLINE_EXCEEDED"); } @@ -54,13 +54,13 @@ public void testErrorFuture() { DeadlineExceededException error = new DeadlineExceededException( "Deadline exceeded", null, GrpcStatusCode.of(Status.Code.DEADLINE_EXCEEDED), true); - TagValue tagValue = Util.extractStatus(Futures.immediateFailedFuture(error)); + TagValue tagValue = Util.extractStatusFromFuture(Futures.immediateFailedFuture(error)); assertThat(tagValue.asString()).isEqualTo("DEADLINE_EXCEEDED"); } @Test public void testCancelledFuture() { - TagValue tagValue = Util.extractStatus(Futures.immediateCancelledFuture()); + TagValue tagValue = Util.extractStatusFromFuture(Futures.immediateCancelledFuture()); assertThat(tagValue.asString()).isEqualTo("CANCELLED"); } } From e0bd6c922ed2adfc8d6dddeced84cb87fc9f2e91 Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Wed, 29 Jun 2022 12:28:25 -0400 Subject: [PATCH 18/23] fix: rename HeaderTracer callables to BigtableTracer callables (#1276) * feat: add built in metrics measure and views * remove status from application latency * Rename methods and add comments * update based on comments * feat: update tracers to use built in metrics * update on comments * fix: rename HeaderTracer callables to BigtableTracer callables * deflake test * fix broken test --- .../clirr-ignored-differences.xml | 10 ++++ .../data/v2/stub/EnhancedBigtableStub.java | 49 ++++++++++--------- ...a => BigtableTracerStreamingCallable.java} | 20 ++++---- ....java => BigtableTracerUnaryCallable.java} | 8 +-- ...t.java => BigtableTracerCallableTest.java} | 2 +- .../metrics/BuiltinMetricsTracerTest.java | 7 ++- 6 files changed, 53 insertions(+), 43 deletions(-) rename google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/{HeaderTracerStreamingCallable.java => BigtableTracerStreamingCallable.java} (85%) rename google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/{HeaderTracerUnaryCallable.java => BigtableTracerUnaryCallable.java} (89%) rename google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/{HeaderTracerCallableTest.java => BigtableTracerCallableTest.java} (99%) diff --git a/google-cloud-bigtable/clirr-ignored-differences.xml b/google-cloud-bigtable/clirr-ignored-differences.xml index 767e12e548..588327d0de 100644 --- a/google-cloud-bigtable/clirr-ignored-differences.xml +++ b/google-cloud-bigtable/clirr-ignored-differences.xml @@ -61,4 +61,14 @@ com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerUnaryCallable * + + + 8001 + com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerStreamingCallable + + + + 8001 + com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerUnaryCallable + diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index b6d17baadf..ec237aabf7 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java @@ -70,10 +70,10 @@ import com.google.cloud.bigtable.data.v2.models.RowAdapter; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerStreamingCallable; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerUnaryCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTracerFactory; import com.google.cloud.bigtable.data.v2.stub.metrics.CompositeTracerFactory; -import com.google.cloud.bigtable.data.v2.stub.metrics.HeaderTracerStreamingCallable; -import com.google.cloud.bigtable.data.v2.stub.metrics.HeaderTracerUnaryCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.MetricsTracerFactory; import com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants; import com.google.cloud.bigtable.data.v2.stub.metrics.StatsHeadersServerStreamingCallable; @@ -377,7 +377,7 @@ public UnaryCallable createReadRowCallable(RowAdapter *
  • Upon receiving the response stream, it will merge the {@link * com.google.bigtable.v2.ReadRowsResponse.CellChunk}s in logical rows. The actual row * implementation can be configured by the {@code rowAdapter} parameter. - *
  • Add header tracer for tracking GFE metrics. + *
  • Add bigtable tracer for tracking bigtable specific metrics. *
  • Retry/resume on failure. *
  • Filter out marker rows. * @@ -428,13 +428,13 @@ public Map extract(ReadRowsRequest readRowsRequest) { ServerStreamingCallable watched = Callables.watched(merging, innerSettings, clientContext); - ServerStreamingCallable withHeaderTracer = - new HeaderTracerStreamingCallable<>(watched); + ServerStreamingCallable withBigtableTracer = + new BigtableTracerStreamingCallable<>(watched); // Retry logic is split into 2 parts to workaround a rare edge case described in // ReadRowsRetryCompletedCallable ServerStreamingCallable retrying1 = - new ReadRowsRetryCompletedCallable<>(withHeaderTracer); + new ReadRowsRetryCompletedCallable<>(withBigtableTracer); ServerStreamingCallable retrying2 = Callables.retrying(retrying1, innerSettings, clientContext); @@ -473,11 +473,11 @@ private UnaryCallable> createBulkReadRowsCallable( UnaryCallable> tracedBatcher = new TracedBatcherUnaryCallable<>(readRowsUserCallable.all()); - UnaryCallable> withHeaderTracer = - new HeaderTracerUnaryCallable<>(tracedBatcher); + UnaryCallable> withBigtableTracer = + new BigtableTracerUnaryCallable<>(tracedBatcher); UnaryCallable> traced = - new TracedUnaryCallable<>(withHeaderTracer, clientContext.getTracerFactory(), span); + new TracedUnaryCallable<>(withBigtableTracer, clientContext.getTracerFactory(), span); return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); } @@ -519,11 +519,11 @@ public Map extract( UnaryCallable> withStatsHeaders = new StatsHeadersUnaryCallable<>(spoolable); - UnaryCallable> withHeaderTracer = - new HeaderTracerUnaryCallable<>(withStatsHeaders); + UnaryCallable> withBigtableTracer = + new BigtableTracerUnaryCallable<>(withStatsHeaders); UnaryCallable> retryable = - Callables.retrying(withHeaderTracer, settings.sampleRowKeysSettings(), clientContext); + Callables.retrying(withBigtableTracer, settings.sampleRowKeysSettings(), clientContext); return createUserFacingUnaryCallable( methodName, new SampleRowKeysCallable(retryable, requestContext)); @@ -558,11 +558,11 @@ public Map extract(MutateRowRequest mutateRowRequest) { UnaryCallable withStatsHeaders = new StatsHeadersUnaryCallable<>(base); - UnaryCallable withHeaderTracer = - new HeaderTracerUnaryCallable<>(withStatsHeaders); + UnaryCallable withBigtableTracer = + new BigtableTracerUnaryCallable<>(withStatsHeaders); UnaryCallable retrying = - Callables.retrying(withHeaderTracer, settings.mutateRowSettings(), clientContext); + Callables.retrying(withBigtableTracer, settings.mutateRowSettings(), clientContext); return createUserFacingUnaryCallable( methodName, new MutateRowCallable(retrying, requestContext)); @@ -605,10 +605,10 @@ private UnaryCallable createBulkMutateRowsCallable() { UnaryCallable tracedBatcherUnaryCallable = new TracedBatcherUnaryCallable<>(userFacing); - UnaryCallable withHeaderTracer = - new HeaderTracerUnaryCallable<>(tracedBatcherUnaryCallable); + UnaryCallable withBigtableTracer = + new BigtableTracerUnaryCallable<>(tracedBatcherUnaryCallable); UnaryCallable traced = - new TracedUnaryCallable<>(withHeaderTracer, clientContext.getTracerFactory(), spanName); + new TracedUnaryCallable<>(withBigtableTracer, clientContext.getTracerFactory(), spanName); return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); } @@ -746,11 +746,11 @@ public Map extract( UnaryCallable withStatsHeaders = new StatsHeadersUnaryCallable<>(base); - UnaryCallable withHeaderTracer = - new HeaderTracerUnaryCallable<>(withStatsHeaders); + UnaryCallable withBigtableTracer = + new BigtableTracerUnaryCallable<>(withStatsHeaders); UnaryCallable retrying = - Callables.retrying(withHeaderTracer, settings.checkAndMutateRowSettings(), clientContext); + Callables.retrying(withBigtableTracer, settings.checkAndMutateRowSettings(), clientContext); return createUserFacingUnaryCallable( methodName, new CheckAndMutateRowCallable(retrying, requestContext)); @@ -787,11 +787,12 @@ public Map extract(ReadModifyWriteRowRequest request) { new StatsHeadersUnaryCallable<>(base); String methodName = "ReadModifyWriteRow"; - UnaryCallable withHeaderTracer = - new HeaderTracerUnaryCallable<>(withStatsHeaders); + UnaryCallable withBigtableTracer = + new BigtableTracerUnaryCallable<>(withStatsHeaders); UnaryCallable retrying = - Callables.retrying(withHeaderTracer, settings.readModifyWriteRowSettings(), clientContext); + Callables.retrying( + withBigtableTracer, settings.readModifyWriteRowSettings(), clientContext); return createUserFacingUnaryCallable( methodName, new ReadModifyWriteRowCallable(retrying, requestContext)); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerStreamingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java similarity index 85% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerStreamingCallable.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java index f73511dc4c..09bb906a89 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerStreamingCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java @@ -28,26 +28,26 @@ import javax.annotation.Nonnull; /** - * This callable will inject a {@link GrpcResponseMetadata} to access the headers and trailers - * returned by gRPC methods upon completion. The {@link BigtableTracer} will process metrics that - * were injected in the header/trailer and publish them to OpenCensus. If {@link - * GrpcResponseMetadata#getMetadata()} returned null, it probably means that the request has never - * reached GFE, and it'll increment the gfe_header_missing_counter in this case. + * This callable will * - *

    If GFE metrics are not registered in {@link RpcViews}, skip injecting GrpcResponseMetadata. - * This is for the case where direct path is enabled, all the requests won't go through GFE and - * therefore won't have the server-timing header. + *

    -inject a {@link GrpcResponseMetadata} to access the headers and trailers returned by gRPC + * methods upon completion. The {@link BigtableTracer} will process metrics that were injected in + * the header/trailer and publish them to OpenCensus. If {@link GrpcResponseMetadata#getMetadata()} + * returned null, it probably means that the request has never reached GFE, and it'll increment the + * gfe_header_missing_counter in this case. + * + *

    -Call {@link BigtableTracer#onRequest()} to record the request events in a stream. * *

    This class is considered an internal implementation detail and not meant to be used by * applications. */ @InternalApi -public class HeaderTracerStreamingCallable +public class BigtableTracerStreamingCallable extends ServerStreamingCallable { private final ServerStreamingCallable innerCallable; - public HeaderTracerStreamingCallable( + public BigtableTracerStreamingCallable( @Nonnull ServerStreamingCallable callable) { this.innerCallable = Preconditions.checkNotNull(callable, "Inner callable must be set"); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerUnaryCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java similarity index 89% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerUnaryCallable.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java index adbb6c84a9..fd2eb60f27 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerUnaryCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java @@ -34,20 +34,16 @@ * GrpcResponseMetadata#getMetadata()} returned null, it probably means that the request has never * reached GFE, and it'll increment the gfe_header_missing_counter in this case. * - *

    If GFE metrics are not registered in {@link RpcViews}, skip injecting GrpcResponseMetadata. - * This is for the case where direct path is enabled, all the requests won't go through GFE and - * therefore won't have the server-timing header. - * *

    This class is considered an internal implementation detail and not meant to be used by * applications. */ @InternalApi -public class HeaderTracerUnaryCallable +public class BigtableTracerUnaryCallable extends UnaryCallable { private final UnaryCallable innerCallable; - public HeaderTracerUnaryCallable(@Nonnull UnaryCallable innerCallable) { + public BigtableTracerUnaryCallable(@Nonnull UnaryCallable innerCallable) { this.innerCallable = Preconditions.checkNotNull(innerCallable, "Inner callable must be set"); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerCallableTest.java similarity index 99% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerCallableTest.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerCallableTest.java index d93859bbad..1b833f5c06 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerCallableTest.java @@ -68,7 +68,7 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class HeaderTracerCallableTest { +public class BigtableTracerCallableTest { private Server server; private Server serverNoHeader; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java index a48df92254..9294033f26 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java @@ -307,7 +307,10 @@ public void testRetryCount() { stub.mutateRowCallable() .call(RowMutation.create(TABLE_ID, "random-row").setCell("cf", "q", "value")); - verify(statsRecorderWrapper).putRetryCount(retryCount.capture()); + // onOperationComplete() is called in TracerFinisher which will be called after the mutateRow + // call is returned. So there's a race between when the call returns and when the putRetryCount + // is called in onOperationCompletion(). + verify(statsRecorderWrapper, timeout(20)).putRetryCount(retryCount.capture()); assertThat(retryCount.getValue()).isEqualTo(fakeService.getAttemptCounter().get() - 1); } @@ -328,7 +331,7 @@ public void testMutateRowAttempts() { // calls releaseWaiters(). onOperationComplete() is called in TracerFinisher which will be // called after the mutateRow call is returned. So there's a race between when the call returns // and when the record() is called in onOperationCompletion(). - verify(statsRecorderWrapper, timeout(10).times(fakeService.getAttemptCounter().get() + 1)) + verify(statsRecorderWrapper, timeout(20).times(fakeService.getAttemptCounter().get() + 1)) .record(status.capture(), tableId.capture(), zone.capture(), cluster.capture()); assertThat(zone.getAllValues()).containsExactly(UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED); assertThat(cluster.getAllValues()).containsExactly(UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED); From a4c662153c98f8043059a068a66d784761b7c2cb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 20:56:11 +0000 Subject: [PATCH 19/23] chore: googleapis updates (#1290) BEGIN_COMMIT_OVERRIDE feat(generated): Cloud Bigtable Undelete Table service and message proto files feat(generated): Add storage_utilization_gib_per_node to Autoscaling target END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. PiperOrigin-RevId: 458022604 Source-Link: https://github.com/googleapis/googleapis/commit/e5507fc82bf146a8b19746b0a369a508afb99a43 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2c26a744087ad06367adb44649c93b772f97cc24 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmMyNmE3NDQwODdhZDA2MzY3YWRiNDQ2NDljOTNiNzcyZjk3Y2MyNCJ9 --- .../v2/BaseBigtableTableAdminClient.java | 133 ++ .../v2/BaseBigtableTableAdminSettings.java | 24 + .../admin/v2/BigtableTableAdminSettings.java | 2 + .../bigtable/admin/v2/gapic_metadata.json | 3 + .../admin/v2/stub/BigtableTableAdminStub.java | 11 + .../stub/BigtableTableAdminStubSettings.java | 69 + .../v2/stub/GrpcBigtableTableAdminStub.java | 45 + .../v2/BaseBigtableTableAdminClientTest.java | 99 ++ .../v2/BigtableTableAdminSettingsTest.java | 19 +- .../admin/v2/MockBigtableTableAdminImpl.java | 22 + .../admin/v2/BigtableTableAdminGrpc.java | 146 +- .../bigtable/admin/v2/AutoscalingTargets.java | 111 ++ .../admin/v2/AutoscalingTargetsOrBuilder.java | 18 + .../admin/v2/BigtableTableAdminProto.java | 453 ++++--- .../bigtable/admin/v2/InstanceProto.java | 123 +- .../admin/v2/UndeleteTableMetadata.java | 1176 +++++++++++++++++ .../v2/UndeleteTableMetadataOrBuilder.java | 120 ++ .../admin/v2/UndeleteTableRequest.java | 668 ++++++++++ .../v2/UndeleteTableRequestOrBuilder.java | 58 + .../admin/v2/bigtable_table_admin.proto | 44 +- .../google/bigtable/admin/v2/instance.proto | 8 + 21 files changed, 3056 insertions(+), 296 deletions(-) create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadataOrBuilder.java create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequestOrBuilder.java diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java index 9c664619f0..bc52bde120 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java @@ -63,6 +63,8 @@ import com.google.bigtable.admin.v2.SnapshotTableRequest; import com.google.bigtable.admin.v2.Table; import com.google.bigtable.admin.v2.TableName; +import com.google.bigtable.admin.v2.UndeleteTableMetadata; +import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStub; import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStubSettings; @@ -940,6 +942,137 @@ public final UnaryCallable deleteTableCallable() { return stub.deleteTableCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a specified table which was accidentally deleted. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +   *   Table response = baseBigtableTableAdminClient.undeleteTableAsync(name).get();
    +   * }
    +   * }
    + * + * @param name Required. The unique name of the table to be restored. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture undeleteTableAsync(TableName name) { + UndeleteTableRequest request = + UndeleteTableRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return undeleteTableAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a specified table which was accidentally deleted. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    +   *   Table response = baseBigtableTableAdminClient.undeleteTableAsync(name).get();
    +   * }
    +   * }
    + * + * @param name Required. The unique name of the table to be restored. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture undeleteTableAsync(String name) { + UndeleteTableRequest request = UndeleteTableRequest.newBuilder().setName(name).build(); + return undeleteTableAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a specified table which was accidentally deleted. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   UndeleteTableRequest request =
    +   *       UndeleteTableRequest.newBuilder()
    +   *           .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
    +   *           .build();
    +   *   Table response = baseBigtableTableAdminClient.undeleteTableAsync(request).get();
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture undeleteTableAsync( + UndeleteTableRequest request) { + return undeleteTableOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a specified table which was accidentally deleted. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   UndeleteTableRequest request =
    +   *       UndeleteTableRequest.newBuilder()
    +   *           .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
    +   *           .build();
    +   *   OperationFuture future =
    +   *       baseBigtableTableAdminClient.undeleteTableOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   Table response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable + undeleteTableOperationCallable() { + return stub.undeleteTableOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a specified table which was accidentally deleted. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   UndeleteTableRequest request =
    +   *       UndeleteTableRequest.newBuilder()
    +   *           .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       baseBigtableTableAdminClient.undeleteTableCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable undeleteTableCallable() { + return stub.undeleteTableCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Performs a series of column family modifications on the specified table. Either all or none of diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java index 59dd25e3f4..97cc6bb5d6 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java @@ -63,6 +63,8 @@ import com.google.bigtable.admin.v2.SnapshotTableMetadata; import com.google.bigtable.admin.v2.SnapshotTableRequest; import com.google.bigtable.admin.v2.Table; +import com.google.bigtable.admin.v2.UndeleteTableMetadata; +import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStubSettings; import com.google.iam.v1.GetIamPolicyRequest; @@ -117,6 +119,17 @@ public UnaryCallSettings deleteTableSettings() { return ((BigtableTableAdminStubSettings) getStubSettings()).deleteTableSettings(); } + /** Returns the object with the settings used for calls to undeleteTable. */ + public UnaryCallSettings undeleteTableSettings() { + return ((BigtableTableAdminStubSettings) getStubSettings()).undeleteTableSettings(); + } + + /** Returns the object with the settings used for calls to undeleteTable. */ + public OperationCallSettings + undeleteTableOperationSettings() { + return ((BigtableTableAdminStubSettings) getStubSettings()).undeleteTableOperationSettings(); + } + /** Returns the object with the settings used for calls to modifyColumnFamilies. */ public UnaryCallSettings modifyColumnFamiliesSettings() { return ((BigtableTableAdminStubSettings) getStubSettings()).modifyColumnFamiliesSettings(); @@ -357,6 +370,17 @@ public UnaryCallSettings.Builder deleteTableSettings( return getStubSettingsBuilder().deleteTableSettings(); } + /** Returns the builder for the settings used for calls to undeleteTable. */ + public UnaryCallSettings.Builder undeleteTableSettings() { + return getStubSettingsBuilder().undeleteTableSettings(); + } + + /** Returns the builder for the settings used for calls to undeleteTable. */ + public OperationCallSettings.Builder + undeleteTableOperationSettings() { + return getStubSettingsBuilder().undeleteTableOperationSettings(); + } + /** Returns the builder for the settings used for calls to modifyColumnFamilies. */ public UnaryCallSettings.Builder modifyColumnFamiliesSettings() { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java index 9cba1159b9..2d7f1d5803 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java @@ -120,6 +120,8 @@ public String toString() { .add("restoreTableSettings", stubSettings.restoreTableSettings()) .add("restoreTableOperationSettings", stubSettings.restoreTableOperationSettings()) .add("stubSettings", stubSettings) + .add("undeleteTableSettings", stubSettings.undeleteTableSettings()) + .add("undeleteTableOperationSettings", stubSettings.undeleteTableOperationSettings()) .toString(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json index 1459cac691..fbaa5e3bea 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json @@ -145,6 +145,9 @@ "TestIamPermissions": { "methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"] }, + "UndeleteTable": { + "methods": ["undeleteTableAsync", "undeleteTableAsync", "undeleteTableAsync", "undeleteTableOperationCallable", "undeleteTableCallable"] + }, "UpdateBackup": { "methods": ["updateBackup", "updateBackup", "updateBackupCallable"] } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java index 93ab2057ce..d278228522 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java @@ -54,6 +54,8 @@ import com.google.bigtable.admin.v2.SnapshotTableMetadata; import com.google.bigtable.admin.v2.SnapshotTableRequest; import com.google.bigtable.admin.v2.Table; +import com.google.bigtable.admin.v2.UndeleteTableMetadata; +import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -106,6 +108,15 @@ public UnaryCallable deleteTableCallable() { throw new UnsupportedOperationException("Not implemented: deleteTableCallable()"); } + public OperationCallable + undeleteTableOperationCallable() { + throw new UnsupportedOperationException("Not implemented: undeleteTableOperationCallable()"); + } + + public UnaryCallable undeleteTableCallable() { + throw new UnsupportedOperationException("Not implemented: undeleteTableCallable()"); + } + public UnaryCallable modifyColumnFamiliesCallable() { throw new UnsupportedOperationException("Not implemented: modifyColumnFamiliesCallable()"); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java index 5e6c717684..6d750a5d35 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java @@ -76,6 +76,8 @@ import com.google.bigtable.admin.v2.SnapshotTableMetadata; import com.google.bigtable.admin.v2.SnapshotTableRequest; import com.google.bigtable.admin.v2.Table; +import com.google.bigtable.admin.v2.UndeleteTableMetadata; +import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -151,6 +153,9 @@ public class BigtableTableAdminStubSettings extends StubSettings getTableSettings; private final UnaryCallSettings deleteTableSettings; + private final UnaryCallSettings undeleteTableSettings; + private final OperationCallSettings + undeleteTableOperationSettings; private final UnaryCallSettings modifyColumnFamiliesSettings; private final UnaryCallSettings dropRowRangeSettings; private final UnaryCallSettings @@ -374,6 +379,17 @@ public UnaryCallSettings deleteTableSettings() { return deleteTableSettings; } + /** Returns the object with the settings used for calls to undeleteTable. */ + public UnaryCallSettings undeleteTableSettings() { + return undeleteTableSettings; + } + + /** Returns the object with the settings used for calls to undeleteTable. */ + public OperationCallSettings + undeleteTableOperationSettings() { + return undeleteTableOperationSettings; + } + /** Returns the object with the settings used for calls to modifyColumnFamilies. */ public UnaryCallSettings modifyColumnFamiliesSettings() { return modifyColumnFamiliesSettings; @@ -564,6 +580,8 @@ protected BigtableTableAdminStubSettings(Builder settingsBuilder) throws IOExcep listTablesSettings = settingsBuilder.listTablesSettings().build(); getTableSettings = settingsBuilder.getTableSettings().build(); deleteTableSettings = settingsBuilder.deleteTableSettings().build(); + undeleteTableSettings = settingsBuilder.undeleteTableSettings().build(); + undeleteTableOperationSettings = settingsBuilder.undeleteTableOperationSettings().build(); modifyColumnFamiliesSettings = settingsBuilder.modifyColumnFamiliesSettings().build(); dropRowRangeSettings = settingsBuilder.dropRowRangeSettings().build(); generateConsistencyTokenSettings = settingsBuilder.generateConsistencyTokenSettings().build(); @@ -601,6 +619,9 @@ public static class Builder listTablesSettings; private final UnaryCallSettings.Builder getTableSettings; private final UnaryCallSettings.Builder deleteTableSettings; + private final UnaryCallSettings.Builder undeleteTableSettings; + private final OperationCallSettings.Builder + undeleteTableOperationSettings; private final UnaryCallSettings.Builder modifyColumnFamiliesSettings; private final UnaryCallSettings.Builder dropRowRangeSettings; @@ -729,6 +750,8 @@ protected Builder(ClientContext clientContext) { listTablesSettings = PagedCallSettings.newBuilder(LIST_TABLES_PAGE_STR_FACT); getTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + undeleteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + undeleteTableOperationSettings = OperationCallSettings.newBuilder(); modifyColumnFamiliesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); dropRowRangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); generateConsistencyTokenSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -757,6 +780,7 @@ protected Builder(ClientContext clientContext) { listTablesSettings, getTableSettings, deleteTableSettings, + undeleteTableSettings, modifyColumnFamiliesSettings, dropRowRangeSettings, generateConsistencyTokenSettings, @@ -787,6 +811,8 @@ protected Builder(BigtableTableAdminStubSettings settings) { listTablesSettings = settings.listTablesSettings.toBuilder(); getTableSettings = settings.getTableSettings.toBuilder(); deleteTableSettings = settings.deleteTableSettings.toBuilder(); + undeleteTableSettings = settings.undeleteTableSettings.toBuilder(); + undeleteTableOperationSettings = settings.undeleteTableOperationSettings.toBuilder(); modifyColumnFamiliesSettings = settings.modifyColumnFamiliesSettings.toBuilder(); dropRowRangeSettings = settings.dropRowRangeSettings.toBuilder(); generateConsistencyTokenSettings = settings.generateConsistencyTokenSettings.toBuilder(); @@ -815,6 +841,7 @@ protected Builder(BigtableTableAdminStubSettings settings) { listTablesSettings, getTableSettings, deleteTableSettings, + undeleteTableSettings, modifyColumnFamiliesSettings, dropRowRangeSettings, generateConsistencyTokenSettings, @@ -873,6 +900,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .undeleteTableSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .modifyColumnFamiliesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -983,6 +1015,30 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(3600000L)) .build())); + builder + .undeleteTableOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Table.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(UndeleteTableMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder .snapshotTableOperationSettings() .setInitialCallSettings( @@ -1109,6 +1165,19 @@ public UnaryCallSettings.Builder deleteTableSettings( return deleteTableSettings; } + /** Returns the builder for the settings used for calls to undeleteTable. */ + public UnaryCallSettings.Builder undeleteTableSettings() { + return undeleteTableSettings; + } + + /** Returns the builder for the settings used for calls to undeleteTable. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + undeleteTableOperationSettings() { + return undeleteTableOperationSettings; + } + /** Returns the builder for the settings used for calls to modifyColumnFamilies. */ public UnaryCallSettings.Builder modifyColumnFamiliesSettings() { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java index 8cb4105299..f75f5fe399 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java @@ -58,6 +58,8 @@ import com.google.bigtable.admin.v2.SnapshotTableMetadata; import com.google.bigtable.admin.v2.SnapshotTableRequest; import com.google.bigtable.admin.v2.Table; +import com.google.bigtable.admin.v2.UndeleteTableMetadata; +import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; import com.google.common.collect.ImmutableMap; import com.google.iam.v1.GetIamPolicyRequest; @@ -123,6 +125,16 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor + undeleteTableMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/UndeleteTable") + .setRequestMarshaller( + ProtoUtils.marshaller(UndeleteTableRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor modifyColumnFamiliesMethodDescriptor = MethodDescriptor.newBuilder() @@ -294,6 +306,9 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { private final UnaryCallable listTablesPagedCallable; private final UnaryCallable getTableCallable; private final UnaryCallable deleteTableCallable; + private final UnaryCallable undeleteTableCallable; + private final OperationCallable + undeleteTableOperationCallable; private final UnaryCallable modifyColumnFamiliesCallable; private final UnaryCallable dropRowRangeCallable; private final UnaryCallable @@ -420,6 +435,16 @@ protected GrpcBigtableTableAdminStub( return params.build(); }) .build(); + GrpcCallSettings undeleteTableTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(undeleteTableMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); GrpcCallSettings modifyColumnFamiliesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(modifyColumnFamiliesMethodDescriptor) @@ -621,6 +646,15 @@ protected GrpcBigtableTableAdminStub( this.deleteTableCallable = callableFactory.createUnaryCallable( deleteTableTransportSettings, settings.deleteTableSettings(), clientContext); + this.undeleteTableCallable = + callableFactory.createUnaryCallable( + undeleteTableTransportSettings, settings.undeleteTableSettings(), clientContext); + this.undeleteTableOperationCallable = + callableFactory.createOperationCallable( + undeleteTableTransportSettings, + settings.undeleteTableOperationSettings(), + clientContext, + operationsStub); this.modifyColumnFamiliesCallable = callableFactory.createUnaryCallable( modifyColumnFamiliesTransportSettings, @@ -748,6 +782,17 @@ public UnaryCallable deleteTableCallable() { return deleteTableCallable; } + @Override + public UnaryCallable undeleteTableCallable() { + return undeleteTableCallable; + } + + @Override + public OperationCallable + undeleteTableOperationCallable() { + return undeleteTableOperationCallable; + } + @Override public UnaryCallable modifyColumnFamiliesCallable() { return modifyColumnFamiliesCallable; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java index ac444d0c52..e0ee12fa12 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java @@ -63,6 +63,7 @@ import com.google.bigtable.admin.v2.SnapshotTableRequest; import com.google.bigtable.admin.v2.Table; import com.google.bigtable.admin.v2.TableName; +import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; import com.google.common.collect.Lists; import com.google.iam.v1.AuditConfig; @@ -697,6 +698,104 @@ public void deleteTableExceptionTest2() throws Exception { } } + @Test + public void undeleteTableTest() throws Exception { + Table expectedResponse = + Table.newBuilder() + .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString()) + .putAllClusterStates(new HashMap()) + .putAllColumnFamilies(new HashMap()) + .setRestoreInfo(RestoreInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeleteTableTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableTableAdmin.addResponse(resultOperation); + + TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); + + Table actualResponse = client.undeleteTableAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UndeleteTableRequest actualRequest = ((UndeleteTableRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void undeleteTableExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); + client.undeleteTableAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void undeleteTableTest2() throws Exception { + Table expectedResponse = + Table.newBuilder() + .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString()) + .putAllClusterStates(new HashMap()) + .putAllColumnFamilies(new HashMap()) + .setRestoreInfo(RestoreInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeleteTableTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableTableAdmin.addResponse(resultOperation); + + String name = "name3373707"; + + Table actualResponse = client.undeleteTableAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UndeleteTableRequest actualRequest = ((UndeleteTableRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void undeleteTableExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + String name = "name3373707"; + client.undeleteTableAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void modifyColumnFamiliesTest() throws Exception { Table expectedResponse = diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java index 773bd56665..28038d1db4 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java @@ -24,6 +24,9 @@ import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Modifier; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -130,6 +133,8 @@ public void testStubSettings() throws IOException { "deleteBackupSettings", "restoreTableSettings", "restoreTableOperationSettings", + "undeleteTableSettings", + "undeleteTableOperationSettings" }; @Test @@ -158,14 +163,14 @@ public void testToString() throws IOException { assertThat(defaultSettings.toString()).doesNotContain("totalTimeout=PT13H32M"); assertThat(settings.toString()).contains("totalTimeout=PT13H32M"); - int nonStaticFields = 0; - for (Field field : BigtableTableAdminStubSettings.class.getDeclaredFields()) { - if (!Modifier.isStatic(field.getModifiers())) { - nonStaticFields++; - } - } + List nonStaticFields = + Arrays.stream(BigtableTableAdminStubSettings.class.getDeclaredFields()) + .filter(field -> !Modifier.isStatic(field.getModifiers())) + .map(Field::getName) + .collect(Collectors.toList()); + // failure will signal about adding a new settings property - assertThat(SETTINGS_LIST.length).isEqualTo(nonStaticFields); + assertThat(nonStaticFields).containsExactlyElementsIn(SETTINGS_LIST); } void checkToString(BigtableTableAdminSettings settings) { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java index b149b02f50..f33b96aea4 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java @@ -44,6 +44,7 @@ import com.google.bigtable.admin.v2.Snapshot; import com.google.bigtable.admin.v2.SnapshotTableRequest; import com.google.bigtable.admin.v2.Table; +import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -194,6 +195,27 @@ public void deleteTable(DeleteTableRequest request, StreamObserver respon } } + @Override + public void undeleteTable( + UndeleteTableRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UndeleteTable, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void modifyColumnFamilies( ModifyColumnFamiliesRequest request, StreamObserver responseObserver) { diff --git a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java index c226e35060..69de131981 100644 --- a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java +++ b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java @@ -257,6 +257,49 @@ private BigtableTableAdminGrpc() {} return getDeleteTableMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UndeleteTableRequest, com.google.longrunning.Operation> + getUndeleteTableMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UndeleteTable", + requestType = com.google.bigtable.admin.v2.UndeleteTableRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UndeleteTableRequest, com.google.longrunning.Operation> + getUndeleteTableMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UndeleteTableRequest, com.google.longrunning.Operation> + getUndeleteTableMethod; + if ((getUndeleteTableMethod = BigtableTableAdminGrpc.getUndeleteTableMethod) == null) { + synchronized (BigtableTableAdminGrpc.class) { + if ((getUndeleteTableMethod = BigtableTableAdminGrpc.getUndeleteTableMethod) == null) { + BigtableTableAdminGrpc.getUndeleteTableMethod = + getUndeleteTableMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UndeleteTable")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.UndeleteTableRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableTableAdminMethodDescriptorSupplier("UndeleteTable")) + .build(); + } + } + } + return getUndeleteTableMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest, com.google.bigtable.admin.v2.Table> @@ -1135,6 +1178,20 @@ public void deleteTable( getDeleteTableMethod(), responseObserver); } + /** + * + * + *
    +     * Restores a specified table which was accidentally deleted.
    +     * 
    + */ + public void undeleteTable( + com.google.bigtable.admin.v2.UndeleteTableRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUndeleteTableMethod(), responseObserver); + } + /** * * @@ -1459,6 +1516,12 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.bigtable.admin.v2.DeleteTableRequest, com.google.protobuf.Empty>( this, METHODID_DELETE_TABLE))) + .addMethod( + getUndeleteTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.UndeleteTableRequest, + com.google.longrunning.Operation>(this, METHODID_UNDELETE_TABLE))) .addMethod( getModifyColumnFamiliesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1676,6 +1739,22 @@ public void deleteTable( responseObserver); } + /** + * + * + *
    +     * Restores a specified table which was accidentally deleted.
    +     * 
    + */ + public void undeleteTable( + com.google.bigtable.admin.v2.UndeleteTableRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUndeleteTableMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -2096,6 +2175,19 @@ public com.google.protobuf.Empty deleteTable( getChannel(), getDeleteTableMethod(), getCallOptions(), request); } + /** + * + * + *
    +     * Restores a specified table which was accidentally deleted.
    +     * 
    + */ + public com.google.longrunning.Operation undeleteTable( + com.google.bigtable.admin.v2.UndeleteTableRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUndeleteTableMethod(), getCallOptions(), request); + } + /** * * @@ -2461,6 +2553,19 @@ protected BigtableTableAdminFutureStub build( getChannel().newCall(getDeleteTableMethod(), getCallOptions()), request); } + /** + * + * + *
    +     * Restores a specified table which was accidentally deleted.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + undeleteTable(com.google.bigtable.admin.v2.UndeleteTableRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUndeleteTableMethod(), getCallOptions()), request); + } + /** * * @@ -2743,23 +2848,24 @@ protected BigtableTableAdminFutureStub build( private static final int METHODID_LIST_TABLES = 2; private static final int METHODID_GET_TABLE = 3; private static final int METHODID_DELETE_TABLE = 4; - private static final int METHODID_MODIFY_COLUMN_FAMILIES = 5; - private static final int METHODID_DROP_ROW_RANGE = 6; - private static final int METHODID_GENERATE_CONSISTENCY_TOKEN = 7; - private static final int METHODID_CHECK_CONSISTENCY = 8; - private static final int METHODID_SNAPSHOT_TABLE = 9; - private static final int METHODID_GET_SNAPSHOT = 10; - private static final int METHODID_LIST_SNAPSHOTS = 11; - private static final int METHODID_DELETE_SNAPSHOT = 12; - private static final int METHODID_CREATE_BACKUP = 13; - private static final int METHODID_GET_BACKUP = 14; - private static final int METHODID_UPDATE_BACKUP = 15; - private static final int METHODID_DELETE_BACKUP = 16; - private static final int METHODID_LIST_BACKUPS = 17; - private static final int METHODID_RESTORE_TABLE = 18; - private static final int METHODID_GET_IAM_POLICY = 19; - private static final int METHODID_SET_IAM_POLICY = 20; - private static final int METHODID_TEST_IAM_PERMISSIONS = 21; + private static final int METHODID_UNDELETE_TABLE = 5; + private static final int METHODID_MODIFY_COLUMN_FAMILIES = 6; + private static final int METHODID_DROP_ROW_RANGE = 7; + private static final int METHODID_GENERATE_CONSISTENCY_TOKEN = 8; + private static final int METHODID_CHECK_CONSISTENCY = 9; + private static final int METHODID_SNAPSHOT_TABLE = 10; + private static final int METHODID_GET_SNAPSHOT = 11; + private static final int METHODID_LIST_SNAPSHOTS = 12; + private static final int METHODID_DELETE_SNAPSHOT = 13; + private static final int METHODID_CREATE_BACKUP = 14; + private static final int METHODID_GET_BACKUP = 15; + private static final int METHODID_UPDATE_BACKUP = 16; + private static final int METHODID_DELETE_BACKUP = 17; + private static final int METHODID_LIST_BACKUPS = 18; + private static final int METHODID_RESTORE_TABLE = 19; + private static final int METHODID_GET_IAM_POLICY = 20; + private static final int METHODID_SET_IAM_POLICY = 21; + private static final int METHODID_TEST_IAM_PERMISSIONS = 22; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2804,6 +2910,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.bigtable.admin.v2.DeleteTableRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UNDELETE_TABLE: + serviceImpl.undeleteTable( + (com.google.bigtable.admin.v2.UndeleteTableRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_MODIFY_COLUMN_FAMILIES: serviceImpl.modifyColumnFamilies( (com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) request, @@ -2965,6 +3076,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListTablesMethod()) .addMethod(getGetTableMethod()) .addMethod(getDeleteTableMethod()) + .addMethod(getUndeleteTableMethod()) .addMethod(getModifyColumnFamiliesMethod()) .addMethod(getDropRowRangeMethod()) .addMethod(getGenerateConsistencyTokenMethod()) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java index d353ac1781..c0d6cb0b8c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java @@ -73,6 +73,11 @@ private AutoscalingTargets( cpuUtilizationPercent_ = input.readInt32(); break; } + case 24: + { + storageUtilizationGibPerNode_ = input.readInt32(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -130,6 +135,29 @@ public int getCpuUtilizationPercent() { return cpuUtilizationPercent_; } + public static final int STORAGE_UTILIZATION_GIB_PER_NODE_FIELD_NUMBER = 3; + private int storageUtilizationGibPerNode_; + /** + * + * + *
    +   * The storage utilization that the Autoscaler should be trying to achieve.
    +   * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
    +   * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster;
    +   * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
    +   * it will be treated as if it were set to the default value: 2560 for SSD,
    +   * 8192 for HDD.
    +   * 
    + * + * int32 storage_utilization_gib_per_node = 3; + * + * @return The storageUtilizationGibPerNode. + */ + @java.lang.Override + public int getStorageUtilizationGibPerNode() { + return storageUtilizationGibPerNode_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -147,6 +175,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cpuUtilizationPercent_ != 0) { output.writeInt32(2, cpuUtilizationPercent_); } + if (storageUtilizationGibPerNode_ != 0) { + output.writeInt32(3, storageUtilizationGibPerNode_); + } unknownFields.writeTo(output); } @@ -159,6 +190,10 @@ public int getSerializedSize() { if (cpuUtilizationPercent_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, cpuUtilizationPercent_); } + if (storageUtilizationGibPerNode_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(3, storageUtilizationGibPerNode_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -176,6 +211,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.AutoscalingTargets) obj; if (getCpuUtilizationPercent() != other.getCpuUtilizationPercent()) return false; + if (getStorageUtilizationGibPerNode() != other.getStorageUtilizationGibPerNode()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -189,6 +225,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CPU_UTILIZATION_PERCENT_FIELD_NUMBER; hash = (53 * hash) + getCpuUtilizationPercent(); + hash = (37 * hash) + STORAGE_UTILIZATION_GIB_PER_NODE_FIELD_NUMBER; + hash = (53 * hash) + getStorageUtilizationGibPerNode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -336,6 +374,8 @@ public Builder clear() { super.clear(); cpuUtilizationPercent_ = 0; + storageUtilizationGibPerNode_ = 0; + return this; } @@ -364,6 +404,7 @@ public com.google.bigtable.admin.v2.AutoscalingTargets buildPartial() { com.google.bigtable.admin.v2.AutoscalingTargets result = new com.google.bigtable.admin.v2.AutoscalingTargets(this); result.cpuUtilizationPercent_ = cpuUtilizationPercent_; + result.storageUtilizationGibPerNode_ = storageUtilizationGibPerNode_; onBuilt(); return result; } @@ -417,6 +458,9 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.AutoscalingTargets other) if (other.getCpuUtilizationPercent() != 0) { setCpuUtilizationPercent(other.getCpuUtilizationPercent()); } + if (other.getStorageUtilizationGibPerNode() != 0) { + setStorageUtilizationGibPerNode(other.getStorageUtilizationGibPerNode()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -507,6 +551,73 @@ public Builder clearCpuUtilizationPercent() { return this; } + private int storageUtilizationGibPerNode_; + /** + * + * + *
    +     * The storage utilization that the Autoscaler should be trying to achieve.
    +     * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
    +     * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster;
    +     * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
    +     * it will be treated as if it were set to the default value: 2560 for SSD,
    +     * 8192 for HDD.
    +     * 
    + * + * int32 storage_utilization_gib_per_node = 3; + * + * @return The storageUtilizationGibPerNode. + */ + @java.lang.Override + public int getStorageUtilizationGibPerNode() { + return storageUtilizationGibPerNode_; + } + /** + * + * + *
    +     * The storage utilization that the Autoscaler should be trying to achieve.
    +     * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
    +     * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster;
    +     * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
    +     * it will be treated as if it were set to the default value: 2560 for SSD,
    +     * 8192 for HDD.
    +     * 
    + * + * int32 storage_utilization_gib_per_node = 3; + * + * @param value The storageUtilizationGibPerNode to set. + * @return This builder for chaining. + */ + public Builder setStorageUtilizationGibPerNode(int value) { + + storageUtilizationGibPerNode_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The storage utilization that the Autoscaler should be trying to achieve.
    +     * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
    +     * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster;
    +     * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
    +     * it will be treated as if it were set to the default value: 2560 for SSD,
    +     * 8192 for HDD.
    +     * 
    + * + * int32 storage_utilization_gib_per_node = 3; + * + * @return This builder for chaining. + */ + public Builder clearStorageUtilizationGibPerNode() { + + storageUtilizationGibPerNode_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargetsOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargetsOrBuilder.java index 965b822573..c3b9e6e256 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargetsOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargetsOrBuilder.java @@ -38,4 +38,22 @@ public interface AutoscalingTargetsOrBuilder * @return The cpuUtilizationPercent. */ int getCpuUtilizationPercent(); + + /** + * + * + *
    +   * The storage utilization that the Autoscaler should be trying to achieve.
    +   * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
    +   * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster;
    +   * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
    +   * it will be treated as if it were set to the default value: 2560 for SSD,
    +   * 8192 for HDD.
    +   * 
    + * + * int32 storage_utilization_gib_per_node = 3; + * + * @return The storageUtilizationGibPerNode. + */ + int getStorageUtilizationGibPerNode(); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java index 0bfe904405..082eaffde9 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java @@ -71,6 +71,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_DeleteTableRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_bigtable_admin_v2_DeleteTableRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_admin_v2_UndeleteTableRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -214,196 +222,207 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\0162$.google.bigtable.admin.v2.Table.View\"" + "N\n\022DeleteTableRequest\0228\n\004name\030\001 \001(\tB*\340A\002" + "\372A$\n\"bigtableadmin.googleapis.com/Table\"" - + "\337\002\n\033ModifyColumnFamiliesRequest\0228\n\004name\030" - + "\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis." - + "com/Table\022^\n\rmodifications\030\002 \003(\0132B.googl" - + "e.bigtable.admin.v2.ModifyColumnFamilies" - + "Request.ModificationB\003\340A\002\032\245\001\n\014Modificati" - + "on\022\n\n\002id\030\001 \001(\t\0228\n\006create\030\002 \001(\0132&.google." - + "bigtable.admin.v2.ColumnFamilyH\000\0228\n\006upda" - + "te\030\003 \001(\0132&.google.bigtable.admin.v2.Colu" - + "mnFamilyH\000\022\016\n\004drop\030\004 \001(\010H\000B\005\n\003mod\"[\n\037Gen" - + "erateConsistencyTokenRequest\0228\n\004name\030\001 \001" - + "(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.com" - + "/Table\"=\n GenerateConsistencyTokenRespon" - + "se\022\031\n\021consistency_token\030\001 \001(\t\"s\n\027CheckCo" - + "nsistencyRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"" - + "bigtableadmin.googleapis.com/Table\022\036\n\021co" - + "nsistency_token\030\002 \001(\tB\003\340A\002\".\n\030CheckConsi" - + "stencyResponse\022\022\n\nconsistent\030\001 \001(\010\"\346\001\n\024S" - + "napshotTableRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A" - + "$\n\"bigtableadmin.googleapis.com/Table\022=\n" - + "\007cluster\030\002 \001(\tB,\340A\002\372A&\n$bigtableadmin.go" - + "ogleapis.com/Cluster\022\030\n\013snapshot_id\030\003 \001(" - + "\tB\003\340A\002\022&\n\003ttl\030\004 \001(\0132\031.google.protobuf.Du" - + "ration\022\023\n\013description\030\005 \001(\t\"Q\n\022GetSnapsh" - + "otRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%bigtabl" - + "eadmin.googleapis.com/Snapshot\"{\n\024ListSn" - + "apshotsRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\n$" - + "bigtableadmin.googleapis.com/Cluster\022\021\n\t" - + "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"g\n\025L" - + "istSnapshotsResponse\0225\n\tsnapshots\030\001 \003(\0132" - + "\".google.bigtable.admin.v2.Snapshot\022\027\n\017n" - + "ext_page_token\030\002 \001(\t\"T\n\025DeleteSnapshotRe" - + "quest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%bigtableadm" - + "in.googleapis.com/Snapshot\"\304\001\n\025SnapshotT" - + "ableMetadata\022H\n\020original_request\030\001 \001(\0132." - + ".google.bigtable.admin.v2.SnapshotTableR" - + "equest\0220\n\014request_time\030\002 \001(\0132\032.google.pr" - + "otobuf.Timestamp\022/\n\013finish_time\030\003 \001(\0132\032." - + "google.protobuf.Timestamp\"\330\001\n\037CreateTabl" - + "eFromSnapshotMetadata\022R\n\020original_reques" - + "t\030\001 \001(\01328.google.bigtable.admin.v2.Creat" - + "eTableFromSnapshotRequest\0220\n\014request_tim" - + "e\030\002 \001(\0132\032.google.protobuf.Timestamp\022/\n\013f" - + "inish_time\030\003 \001(\0132\032.google.protobuf.Times" - + "tamp\"\242\001\n\023CreateBackupRequest\022<\n\006parent\030\001" - + " \001(\tB,\340A\002\372A&\n$bigtableadmin.googleapis.c" - + "om/Cluster\022\026\n\tbackup_id\030\002 \001(\tB\003\340A\002\0225\n\006ba" - + "ckup\030\003 \001(\0132 .google.bigtable.admin.v2.Ba" - + "ckupB\003\340A\002\"\230\001\n\024CreateBackupMetadata\022\014\n\004na" - + "me\030\001 \001(\t\022\024\n\014source_table\030\002 \001(\t\022.\n\nstart_" - + "time\030\003 \001(\0132\032.google.protobuf.Timestamp\022," - + "\n\010end_time\030\004 \001(\0132\032.google.protobuf.Times" - + "tamp\"\202\001\n\023UpdateBackupRequest\0225\n\006backup\030\001" - + " \001(\0132 .google.bigtable.admin.v2.BackupB\003" - + "\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protob" - + "uf.FieldMaskB\003\340A\002\"M\n\020GetBackupRequest\0229\n" - + "\004name\030\001 \001(\tB+\340A\002\372A%\n#bigtableadmin.googl" - + "eapis.com/Backup\"P\n\023DeleteBackupRequest\022" - + "9\n\004name\030\001 \001(\tB+\340A\002\372A%\n#bigtableadmin.goo" - + "gleapis.com/Backup\"\233\001\n\022ListBackupsReques" - + "t\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\n$bigtableadmin" - + ".googleapis.com/Cluster\022\016\n\006filter\030\002 \001(\t\022" - + "\020\n\010order_by\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(\005\022\022\n\n" - + "page_token\030\005 \001(\t\"a\n\023ListBackupsResponse\022" - + "1\n\007backups\030\001 \003(\0132 .google.bigtable.admin" - + ".v2.Backup\022\027\n\017next_page_token\030\002 \001(\t2\230%\n\022" - + "BigtableTableAdmin\022\253\001\n\013CreateTable\022,.goo" - + "gle.bigtable.admin.v2.CreateTableRequest" - + "\032\037.google.bigtable.admin.v2.Table\"M\202\323\344\223\002" - + "/\"*/v2/{parent=projects/*/instances/*}/t" - + "ables:\001*\332A\025parent,table_id,table\022\212\002\n\027Cre" - + "ateTableFromSnapshot\0228.google.bigtable.a" - + "dmin.v2.CreateTableFromSnapshotRequest\032\035" - + ".google.longrunning.Operation\"\225\001\202\323\344\223\002B\"=" - + "/v2/{parent=projects/*/instances/*}/tabl" - + "es:createFromSnapshot:\001*\332A\037parent,table_" - + "id,source_snapshot\312A(\n\005Table\022\037CreateTabl" - + "eFromSnapshotMetadata\022\244\001\n\nListTables\022+.g" - + "oogle.bigtable.admin.v2.ListTablesReques" - + "t\032,.google.bigtable.admin.v2.ListTablesR" - + "esponse\";\202\323\344\223\002,\022*/v2/{parent=projects/*/" - + "instances/*}/tables\332A\006parent\022\221\001\n\010GetTabl" - + "e\022).google.bigtable.admin.v2.GetTableReq" - + "uest\032\037.google.bigtable.admin.v2.Table\"9\202" - + "\323\344\223\002,\022*/v2/{name=projects/*/instances/*/" - + "tables/*}\332A\004name\022\216\001\n\013DeleteTable\022,.googl" - + "e.bigtable.admin.v2.DeleteTableRequest\032\026" - + ".google.protobuf.Empty\"9\202\323\344\223\002,**/v2/{nam" - + "e=projects/*/instances/*/tables/*}\332A\004nam" - + "e\022\317\001\n\024ModifyColumnFamilies\0225.google.bigt" - + "able.admin.v2.ModifyColumnFamiliesReques" - + "t\032\037.google.bigtable.admin.v2.Table\"_\202\323\344\223" - + "\002D\"?/v2/{name=projects/*/instances/*/tab" - + "les/*}:modifyColumnFamilies:\001*\332A\022name,mo" - + "difications\022\231\001\n\014DropRowRange\022-.google.bi" - + "gtable.admin.v2.DropRowRangeRequest\032\026.go" - + "ogle.protobuf.Empty\"B\202\323\344\223\002<\"7/v2/{name=p" - + "rojects/*/instances/*/tables/*}:dropRowR" - + "ange:\001*\022\350\001\n\030GenerateConsistencyToken\0229.g" - + "oogle.bigtable.admin.v2.GenerateConsiste" - + "ncyTokenRequest\032:.google.bigtable.admin." - + "v2.GenerateConsistencyTokenResponse\"U\202\323\344" - + "\223\002H\"C/v2/{name=projects/*/instances/*/ta" - + "bles/*}:generateConsistencyToken:\001*\332A\004na" - + "me\022\332\001\n\020CheckConsistency\0221.google.bigtabl" - + "e.admin.v2.CheckConsistencyRequest\0322.goo" - + "gle.bigtable.admin.v2.CheckConsistencyRe" - + "sponse\"_\202\323\344\223\002@\";/v2/{name=projects/*/ins" - + "tances/*/tables/*}:checkConsistency:\001*\332A" - + "\026name,consistency_token\022\352\001\n\rSnapshotTabl" - + "e\022..google.bigtable.admin.v2.SnapshotTab" - + "leRequest\032\035.google.longrunning.Operation" - + "\"\211\001\202\323\344\223\0028\"3/v2/{name=projects/*/instance" - + "s/*/tables/*}:snapshot:\001*\332A$name,cluster" - + ",snapshot_id,description\312A!\n\010Snapshot\022\025S" - + "napshotTableMetadata\022\250\001\n\013GetSnapshot\022,.g" - + "oogle.bigtable.admin.v2.GetSnapshotReque" - + "st\032\".google.bigtable.admin.v2.Snapshot\"G" - + "\202\323\344\223\002:\0228/v2/{name=projects/*/instances/*" - + "/clusters/*/snapshots/*}\332A\004name\022\273\001\n\rList" - + "Snapshots\022..google.bigtable.admin.v2.Lis" - + "tSnapshotsRequest\032/.google.bigtable.admi" - + "n.v2.ListSnapshotsResponse\"I\202\323\344\223\002:\0228/v2/" - + "{parent=projects/*/instances/*/clusters/" - + "*}/snapshots\332A\006parent\022\242\001\n\016DeleteSnapshot" - + "\022/.google.bigtable.admin.v2.DeleteSnapsh" - + "otRequest\032\026.google.protobuf.Empty\"G\202\323\344\223\002" - + ":*8/v2/{name=projects/*/instances/*/clus" - + "ters/*/snapshots/*}\332A\004name\022\340\001\n\014CreateBac" - + "kup\022-.google.bigtable.admin.v2.CreateBac" - + "kupRequest\032\035.google.longrunning.Operatio" - + "n\"\201\001\202\323\344\223\002@\"6/v2/{parent=projects/*/insta" - + "nces/*/clusters/*}/backups:\006backup\332A\027par" - + "ent,backup_id,backup\312A\036\n\006Backup\022\024CreateB" - + "ackupMetadata\022\240\001\n\tGetBackup\022*.google.big" - + "table.admin.v2.GetBackupRequest\032 .google" - + ".bigtable.admin.v2.Backup\"E\202\323\344\223\0028\0226/v2/{" - + "name=projects/*/instances/*/clusters/*/b" - + "ackups/*}\332A\004name\022\303\001\n\014UpdateBackup\022-.goog" - + "le.bigtable.admin.v2.UpdateBackupRequest" - + "\032 .google.bigtable.admin.v2.Backup\"b\202\323\344\223" - + "\002G2=/v2/{backup.name=projects/*/instance" - + "s/*/clusters/*/backups/*}:\006backup\332A\022back" - + "up,update_mask\022\234\001\n\014DeleteBackup\022-.google" - + ".bigtable.admin.v2.DeleteBackupRequest\032\026" - + ".google.protobuf.Empty\"E\202\323\344\223\0028*6/v2/{nam" - + "e=projects/*/instances/*/clusters/*/back" - + "ups/*}\332A\004name\022\263\001\n\013ListBackups\022,.google.b" - + "igtable.admin.v2.ListBackupsRequest\032-.go" - + "ogle.bigtable.admin.v2.ListBackupsRespon" - + "se\"G\202\323\344\223\0028\0226/v2/{parent=projects/*/insta" - + "nces/*/clusters/*}/backups\332A\006parent\022\273\001\n\014" - + "RestoreTable\022-.google.bigtable.admin.v2." - + "RestoreTableRequest\032\035.google.longrunning" - + ".Operation\"]\202\323\344\223\0027\"2/v2/{parent=projects" - + "/*/instances/*}/tables:restore:\001*\312A\035\n\005Ta" - + "ble\022\024RestoreTableMetadata\022\354\001\n\014GetIamPoli" - + "cy\022\".google.iam.v1.GetIamPolicyRequest\032\025" - + ".google.iam.v1.Policy\"\240\001\202\323\344\223\002\216\001\";/v2/{re" - + "source=projects/*/instances/*/tables/*}:" - + "getIamPolicy:\001*ZL\"G/v2/{resource=project" - + "s/*/instances/*/clusters/*/backups/*}:ge" - + "tIamPolicy:\001*\332A\010resource\022\363\001\n\014SetIamPolic" - + "y\022\".google.iam.v1.SetIamPolicyRequest\032\025." - + "google.iam.v1.Policy\"\247\001\202\323\344\223\002\216\001\";/v2/{res" - + "ource=projects/*/instances/*/tables/*}:s" - + "etIamPolicy:\001*ZL\"G/v2/{resource=projects" - + "/*/instances/*/clusters/*/backups/*}:set" - + "IamPolicy:\001*\332A\017resource,policy\022\244\002\n\022TestI" - + "amPermissions\022(.google.iam.v1.TestIamPer" - + "missionsRequest\032).google.iam.v1.TestIamP" - + "ermissionsResponse\"\270\001\202\323\344\223\002\232\001\"A/v2/{resou" - + "rce=projects/*/instances/*/tables/*}:tes" - + "tIamPermissions:\001*ZR\"M/v2/{resource=proj" - + "ects/*/instances/*/clusters/*/backups/*}" - + ":testIamPermissions:\001*\332A\024resource,permis" - + "sions\032\336\002\312A\034bigtableadmin.googleapis.com\322" - + "A\273\002https://www.googleapis.com/auth/bigta" - + "ble.admin,https://www.googleapis.com/aut" - + "h/bigtable.admin.table,https://www.googl" - + "eapis.com/auth/cloud-bigtable.admin,http" - + "s://www.googleapis.com/auth/cloud-bigtab" - + "le.admin.table,https://www.googleapis.co" - + "m/auth/cloud-platform,https://www.google" - + "apis.com/auth/cloud-platform.read-onlyB\337" - + "\001\n\034com.google.bigtable.admin.v2B\027Bigtabl" - + "eTableAdminProtoP\001Z=google.golang.org/ge" - + "nproto/googleapis/bigtable/admin/v2;admi" - + "n\252\002\036Google.Cloud.Bigtable.Admin.V2\312\002\036Goo" - + "gle\\Cloud\\Bigtable\\Admin\\V2\352\002\"Google::Cl" - + "oud::Bigtable::Admin::V2b\006proto3" + + "P\n\024UndeleteTableRequest\0228\n\004name\030\001 \001(\tB*\340" + + "A\002\372A$\n\"bigtableadmin.googleapis.com/Tabl" + + "e\"\203\001\n\025UndeleteTableMetadata\022\014\n\004name\030\001 \001(" + + "\t\022.\n\nstart_time\030\002 \001(\0132\032.google.protobuf." + + "Timestamp\022,\n\010end_time\030\003 \001(\0132\032.google.pro" + + "tobuf.Timestamp\"\337\002\n\033ModifyColumnFamilies" + + "Request\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"bigtablea" + + "dmin.googleapis.com/Table\022^\n\rmodificatio" + + "ns\030\002 \003(\0132B.google.bigtable.admin.v2.Modi" + + "fyColumnFamiliesRequest.ModificationB\003\340A" + + "\002\032\245\001\n\014Modification\022\n\n\002id\030\001 \001(\t\0228\n\006create" + + "\030\002 \001(\0132&.google.bigtable.admin.v2.Column" + + "FamilyH\000\0228\n\006update\030\003 \001(\0132&.google.bigtab" + + "le.admin.v2.ColumnFamilyH\000\022\016\n\004drop\030\004 \001(\010" + + "H\000B\005\n\003mod\"[\n\037GenerateConsistencyTokenReq" + + "uest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmi" + + "n.googleapis.com/Table\"=\n GenerateConsis" + + "tencyTokenResponse\022\031\n\021consistency_token\030" + + "\001 \001(\t\"s\n\027CheckConsistencyRequest\0228\n\004name" + + "\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis" + + ".com/Table\022\036\n\021consistency_token\030\002 \001(\tB\003\340" + + "A\002\".\n\030CheckConsistencyResponse\022\022\n\nconsis" + + "tent\030\001 \001(\010\"\346\001\n\024SnapshotTableRequest\0228\n\004n" + + "ame\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.googlea" + + "pis.com/Table\022=\n\007cluster\030\002 \001(\tB,\340A\002\372A&\n$" + + "bigtableadmin.googleapis.com/Cluster\022\030\n\013" + + "snapshot_id\030\003 \001(\tB\003\340A\002\022&\n\003ttl\030\004 \001(\0132\031.go" + + "ogle.protobuf.Duration\022\023\n\013description\030\005 " + + "\001(\t\"Q\n\022GetSnapshotRequest\022;\n\004name\030\001 \001(\tB" + + "-\340A\002\372A\'\n%bigtableadmin.googleapis.com/Sn" + + "apshot\"{\n\024ListSnapshotsRequest\022<\n\006parent" + + "\030\001 \001(\tB,\340A\002\372A&\n$bigtableadmin.googleapis" + + ".com/Cluster\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" + + "token\030\003 \001(\t\"g\n\025ListSnapshotsResponse\0225\n\t" + + "snapshots\030\001 \003(\0132\".google.bigtable.admin." + + "v2.Snapshot\022\027\n\017next_page_token\030\002 \001(\t\"T\n\025" + + "DeleteSnapshotRequest\022;\n\004name\030\001 \001(\tB-\340A\002" + + "\372A\'\n%bigtableadmin.googleapis.com/Snapsh" + + "ot\"\304\001\n\025SnapshotTableMetadata\022H\n\020original" + + "_request\030\001 \001(\0132..google.bigtable.admin.v" + + "2.SnapshotTableRequest\0220\n\014request_time\030\002" + + " \001(\0132\032.google.protobuf.Timestamp\022/\n\013fini" + + "sh_time\030\003 \001(\0132\032.google.protobuf.Timestam" + + "p\"\330\001\n\037CreateTableFromSnapshotMetadata\022R\n" + + "\020original_request\030\001 \001(\01328.google.bigtabl" + + "e.admin.v2.CreateTableFromSnapshotReques" + + "t\0220\n\014request_time\030\002 \001(\0132\032.google.protobu" + + "f.Timestamp\022/\n\013finish_time\030\003 \001(\0132\032.googl" + + "e.protobuf.Timestamp\"\242\001\n\023CreateBackupReq" + + "uest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\n$bigtablead" + + "min.googleapis.com/Cluster\022\026\n\tbackup_id\030" + + "\002 \001(\tB\003\340A\002\0225\n\006backup\030\003 \001(\0132 .google.bigt" + + "able.admin.v2.BackupB\003\340A\002\"\230\001\n\024CreateBack" + + "upMetadata\022\014\n\004name\030\001 \001(\t\022\024\n\014source_table" + + "\030\002 \001(\t\022.\n\nstart_time\030\003 \001(\0132\032.google.prot" + + "obuf.Timestamp\022,\n\010end_time\030\004 \001(\0132\032.googl" + + "e.protobuf.Timestamp\"\202\001\n\023UpdateBackupReq" + + "uest\0225\n\006backup\030\001 \001(\0132 .google.bigtable.a" + + "dmin.v2.BackupB\003\340A\002\0224\n\013update_mask\030\002 \001(\013" + + "2\032.google.protobuf.FieldMaskB\003\340A\002\"M\n\020Get" + + "BackupRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#big" + + "tableadmin.googleapis.com/Backup\"P\n\023Dele" + + "teBackupRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#b" + + "igtableadmin.googleapis.com/Backup\"\233\001\n\022L" + + "istBackupsRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A" + + "&\n$bigtableadmin.googleapis.com/Cluster\022" + + "\016\n\006filter\030\002 \001(\t\022\020\n\010order_by\030\003 \001(\t\022\021\n\tpag" + + "e_size\030\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"a\n\023List" + + "BackupsResponse\0221\n\007backups\030\001 \003(\0132 .googl" + + "e.bigtable.admin.v2.Backup\022\027\n\017next_page_" + + "token\030\002 \001(\t2\341&\n\022BigtableTableAdmin\022\253\001\n\013C" + + "reateTable\022,.google.bigtable.admin.v2.Cr" + + "eateTableRequest\032\037.google.bigtable.admin" + + ".v2.Table\"M\202\323\344\223\002/\"*/v2/{parent=projects/" + + "*/instances/*}/tables:\001*\332A\025parent,table_" + + "id,table\022\212\002\n\027CreateTableFromSnapshot\0228.g" + + "oogle.bigtable.admin.v2.CreateTableFromS" + + "napshotRequest\032\035.google.longrunning.Oper" + + "ation\"\225\001\202\323\344\223\002B\"=/v2/{parent=projects/*/i" + + "nstances/*}/tables:createFromSnapshot:\001*" + + "\332A\037parent,table_id,source_snapshot\312A(\n\005T" + + "able\022\037CreateTableFromSnapshotMetadata\022\244\001" + + "\n\nListTables\022+.google.bigtable.admin.v2." + + "ListTablesRequest\032,.google.bigtable.admi" + + "n.v2.ListTablesResponse\";\202\323\344\223\002,\022*/v2/{pa" + + "rent=projects/*/instances/*}/tables\332A\006pa" + + "rent\022\221\001\n\010GetTable\022).google.bigtable.admi" + + "n.v2.GetTableRequest\032\037.google.bigtable.a" + + "dmin.v2.Table\"9\202\323\344\223\002,\022*/v2/{name=project" + + "s/*/instances/*/tables/*}\332A\004name\022\216\001\n\013Del" + + "eteTable\022,.google.bigtable.admin.v2.Dele" + + "teTableRequest\032\026.google.protobuf.Empty\"9" + + "\202\323\344\223\002,**/v2/{name=projects/*/instances/*" + + "/tables/*}\332A\004name\022\306\001\n\rUndeleteTable\022..go" + + "ogle.bigtable.admin.v2.UndeleteTableRequ" + + "est\032\035.google.longrunning.Operation\"f\202\323\344\223" + + "\0028\"3/v2/{name=projects/*/instances/*/tab" + + "les/*}:undelete:\001*\332A\004name\312A\036\n\005Table\022\025Und" + + "eleteTableMetadata\022\317\001\n\024ModifyColumnFamil" + + "ies\0225.google.bigtable.admin.v2.ModifyCol" + + "umnFamiliesRequest\032\037.google.bigtable.adm" + + "in.v2.Table\"_\202\323\344\223\002D\"?/v2/{name=projects/" + + "*/instances/*/tables/*}:modifyColumnFami" + + "lies:\001*\332A\022name,modifications\022\231\001\n\014DropRow" + + "Range\022-.google.bigtable.admin.v2.DropRow" + + "RangeRequest\032\026.google.protobuf.Empty\"B\202\323" + + "\344\223\002<\"7/v2/{name=projects/*/instances/*/t" + + "ables/*}:dropRowRange:\001*\022\350\001\n\030GenerateCon" + + "sistencyToken\0229.google.bigtable.admin.v2" + + ".GenerateConsistencyTokenRequest\032:.googl" + + "e.bigtable.admin.v2.GenerateConsistencyT" + + "okenResponse\"U\202\323\344\223\002H\"C/v2/{name=projects" + + "/*/instances/*/tables/*}:generateConsist" + + "encyToken:\001*\332A\004name\022\332\001\n\020CheckConsistency" + + "\0221.google.bigtable.admin.v2.CheckConsist" + + "encyRequest\0322.google.bigtable.admin.v2.C" + + "heckConsistencyResponse\"_\202\323\344\223\002@\";/v2/{na" + + "me=projects/*/instances/*/tables/*}:chec" + + "kConsistency:\001*\332A\026name,consistency_token" + + "\022\352\001\n\rSnapshotTable\022..google.bigtable.adm" + + "in.v2.SnapshotTableRequest\032\035.google.long" + + "running.Operation\"\211\001\202\323\344\223\0028\"3/v2/{name=pr" + + "ojects/*/instances/*/tables/*}:snapshot:" + + "\001*\332A$name,cluster,snapshot_id,descriptio" + + "n\312A!\n\010Snapshot\022\025SnapshotTableMetadata\022\250\001" + + "\n\013GetSnapshot\022,.google.bigtable.admin.v2" + + ".GetSnapshotRequest\032\".google.bigtable.ad" + + "min.v2.Snapshot\"G\202\323\344\223\002:\0228/v2/{name=proje" + + "cts/*/instances/*/clusters/*/snapshots/*" + + "}\332A\004name\022\273\001\n\rListSnapshots\022..google.bigt" + + "able.admin.v2.ListSnapshotsRequest\032/.goo" + + "gle.bigtable.admin.v2.ListSnapshotsRespo" + + "nse\"I\202\323\344\223\002:\0228/v2/{parent=projects/*/inst" + + "ances/*/clusters/*}/snapshots\332A\006parent\022\242" + + "\001\n\016DeleteSnapshot\022/.google.bigtable.admi" + + "n.v2.DeleteSnapshotRequest\032\026.google.prot" + + "obuf.Empty\"G\202\323\344\223\002:*8/v2/{name=projects/*" + + "/instances/*/clusters/*/snapshots/*}\332A\004n" + + "ame\022\340\001\n\014CreateBackup\022-.google.bigtable.a" + + "dmin.v2.CreateBackupRequest\032\035.google.lon" + + "grunning.Operation\"\201\001\202\323\344\223\002@\"6/v2/{parent" + + "=projects/*/instances/*/clusters/*}/back" + + "ups:\006backup\332A\027parent,backup_id,backup\312A\036" + + "\n\006Backup\022\024CreateBackupMetadata\022\240\001\n\tGetBa" + + "ckup\022*.google.bigtable.admin.v2.GetBacku" + + "pRequest\032 .google.bigtable.admin.v2.Back" + + "up\"E\202\323\344\223\0028\0226/v2/{name=projects/*/instanc" + + "es/*/clusters/*/backups/*}\332A\004name\022\303\001\n\014Up" + + "dateBackup\022-.google.bigtable.admin.v2.Up" + + "dateBackupRequest\032 .google.bigtable.admi" + + "n.v2.Backup\"b\202\323\344\223\002G2=/v2/{backup.name=pr" + + "ojects/*/instances/*/clusters/*/backups/" + + "*}:\006backup\332A\022backup,update_mask\022\234\001\n\014Dele" + + "teBackup\022-.google.bigtable.admin.v2.Dele" + + "teBackupRequest\032\026.google.protobuf.Empty\"" + + "E\202\323\344\223\0028*6/v2/{name=projects/*/instances/" + + "*/clusters/*/backups/*}\332A\004name\022\263\001\n\013ListB" + + "ackups\022,.google.bigtable.admin.v2.ListBa" + + "ckupsRequest\032-.google.bigtable.admin.v2." + + "ListBackupsResponse\"G\202\323\344\223\0028\0226/v2/{parent" + + "=projects/*/instances/*/clusters/*}/back" + + "ups\332A\006parent\022\273\001\n\014RestoreTable\022-.google.b" + + "igtable.admin.v2.RestoreTableRequest\032\035.g" + + "oogle.longrunning.Operation\"]\202\323\344\223\0027\"2/v2" + + "/{parent=projects/*/instances/*}/tables:" + + "restore:\001*\312A\035\n\005Table\022\024RestoreTableMetada" + + "ta\022\354\001\n\014GetIamPolicy\022\".google.iam.v1.GetI" + + "amPolicyRequest\032\025.google.iam.v1.Policy\"\240" + + "\001\202\323\344\223\002\216\001\";/v2/{resource=projects/*/insta" + + "nces/*/tables/*}:getIamPolicy:\001*ZL\"G/v2/" + + "{resource=projects/*/instances/*/cluster" + + "s/*/backups/*}:getIamPolicy:\001*\332A\010resourc" + + "e\022\363\001\n\014SetIamPolicy\022\".google.iam.v1.SetIa" + + "mPolicyRequest\032\025.google.iam.v1.Policy\"\247\001" + + "\202\323\344\223\002\216\001\";/v2/{resource=projects/*/instan" + + "ces/*/tables/*}:setIamPolicy:\001*ZL\"G/v2/{" + + "resource=projects/*/instances/*/clusters" + + "/*/backups/*}:setIamPolicy:\001*\332A\017resource" + + ",policy\022\244\002\n\022TestIamPermissions\022(.google." + + "iam.v1.TestIamPermissionsRequest\032).googl" + + "e.iam.v1.TestIamPermissionsResponse\"\270\001\202\323" + + "\344\223\002\232\001\"A/v2/{resource=projects/*/instance" + + "s/*/tables/*}:testIamPermissions:\001*ZR\"M/" + + "v2/{resource=projects/*/instances/*/clus" + + "ters/*/backups/*}:testIamPermissions:\001*\332" + + "A\024resource,permissions\032\336\002\312A\034bigtableadmi" + + "n.googleapis.com\322A\273\002https://www.googleap" + + "is.com/auth/bigtable.admin,https://www.g" + + "oogleapis.com/auth/bigtable.admin.table," + + "https://www.googleapis.com/auth/cloud-bi" + + "gtable.admin,https://www.googleapis.com/" + + "auth/cloud-bigtable.admin.table,https://" + + "www.googleapis.com/auth/cloud-platform,h" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tform.read-onlyB\337\001\n\034com.google.bigtable." + + "admin.v2B\027BigtableTableAdminProtoP\001Z=goo" + + "gle.golang.org/genproto/googleapis/bigta" + + "ble/admin/v2;admin\252\002\036Google.Cloud.Bigtab" + + "le.Admin.V2\312\002\036Google\\Cloud\\Bigtable\\Admi" + + "n\\V2\352\002\"Google::Cloud::Bigtable::Admin::V" + + "2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -518,8 +537,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); - internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_descriptor = + internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor = getDescriptor().getMessageTypes().get(10); + internal_static_google_bigtable_admin_v2_UndeleteTableRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor, + new java.lang.String[] { + "Name", "StartTime", "EndTime", + }); + internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_descriptor = + getDescriptor().getMessageTypes().get(12); internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_descriptor, @@ -537,7 +572,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Id", "Create", "Update", "Drop", "Mod", }); internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(13); internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_descriptor, @@ -545,7 +580,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(14); internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_descriptor, @@ -553,7 +588,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConsistencyToken", }); internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(15); internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_descriptor, @@ -561,7 +596,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ConsistencyToken", }); internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(16); internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_descriptor, @@ -569,7 +604,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Consistent", }); internal_static_google_bigtable_admin_v2_SnapshotTableRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(17); internal_static_google_bigtable_admin_v2_SnapshotTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_SnapshotTableRequest_descriptor, @@ -577,7 +612,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Cluster", "SnapshotId", "Ttl", "Description", }); internal_static_google_bigtable_admin_v2_GetSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(18); internal_static_google_bigtable_admin_v2_GetSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GetSnapshotRequest_descriptor, @@ -585,7 +620,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(19); internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_descriptor, @@ -593,7 +628,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(20); internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_descriptor, @@ -601,7 +636,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshots", "NextPageToken", }); internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(21); internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_descriptor, @@ -609,7 +644,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(22); internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_descriptor, @@ -617,7 +652,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OriginalRequest", "RequestTime", "FinishTime", }); internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(23); internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_descriptor, @@ -625,7 +660,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OriginalRequest", "RequestTime", "FinishTime", }); internal_static_google_bigtable_admin_v2_CreateBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(24); internal_static_google_bigtable_admin_v2_CreateBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateBackupRequest_descriptor, @@ -633,7 +668,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "BackupId", "Backup", }); internal_static_google_bigtable_admin_v2_CreateBackupMetadata_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(25); internal_static_google_bigtable_admin_v2_CreateBackupMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateBackupMetadata_descriptor, @@ -641,7 +676,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "SourceTable", "StartTime", "EndTime", }); internal_static_google_bigtable_admin_v2_UpdateBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(26); internal_static_google_bigtable_admin_v2_UpdateBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_UpdateBackupRequest_descriptor, @@ -649,7 +684,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Backup", "UpdateMask", }); internal_static_google_bigtable_admin_v2_GetBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(27); internal_static_google_bigtable_admin_v2_GetBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GetBackupRequest_descriptor, @@ -657,7 +692,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_DeleteBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(28); internal_static_google_bigtable_admin_v2_DeleteBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_DeleteBackupRequest_descriptor, @@ -665,7 +700,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_ListBackupsRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(29); internal_static_google_bigtable_admin_v2_ListBackupsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListBackupsRequest_descriptor, @@ -673,7 +708,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "OrderBy", "PageSize", "PageToken", }); internal_static_google_bigtable_admin_v2_ListBackupsResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(30); internal_static_google_bigtable_admin_v2_ListBackupsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListBackupsResponse_descriptor, diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java index a93744b0a9..d73caea850 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java @@ -102,66 +102,67 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "E_UNSPECIFIED\020\000\022\016\n\nPRODUCTION\020\001\022\017\n\013DEVEL" + "OPMENT\020\002:S\352AP\n%bigtableadmin.googleapis." + "com/Instance\022\'projects/{project}/instanc" - + "es/{instance}\"5\n\022AutoscalingTargets\022\037\n\027c" - + "pu_utilization_percent\030\002 \001(\005\"O\n\021Autoscal" - + "ingLimits\022\034\n\017min_serve_nodes\030\001 \001(\005B\003\340A\002\022" - + "\034\n\017max_serve_nodes\030\002 \001(\005B\003\340A\002\"\321\007\n\007Cluste" - + "r\022\014\n\004name\030\001 \001(\t\022;\n\010location\030\002 \001(\tB)\340A\005\372A" - + "#\n!locations.googleapis.com/Location\022;\n\005" - + "state\030\003 \001(\0162\'.google.bigtable.admin.v2.C" - + "luster.StateB\003\340A\003\022\023\n\013serve_nodes\030\004 \001(\005\022I" - + "\n\016cluster_config\030\007 \001(\0132/.google.bigtable" - + ".admin.v2.Cluster.ClusterConfigH\000\022H\n\024def" - + "ault_storage_type\030\005 \001(\0162%.google.bigtabl" - + "e.admin.v2.StorageTypeB\003\340A\005\022R\n\021encryptio" - + "n_config\030\006 \001(\01322.google.bigtable.admin.v" - + "2.Cluster.EncryptionConfigB\003\340A\005\032\270\001\n\030Clus" - + "terAutoscalingConfig\022L\n\022autoscaling_limi" - + "ts\030\001 \001(\0132+.google.bigtable.admin.v2.Auto" - + "scalingLimitsB\003\340A\002\022N\n\023autoscaling_target" - + "s\030\002 \001(\0132,.google.bigtable.admin.v2.Autos" - + "calingTargetsB\003\340A\002\032o\n\rClusterConfig\022^\n\032c" - + "luster_autoscaling_config\030\001 \001(\0132:.google" - + ".bigtable.admin.v2.Cluster.ClusterAutosc" - + "alingConfig\032P\n\020EncryptionConfig\022<\n\014kms_k" - + "ey_name\030\001 \001(\tB&\372A#\n!cloudkms.googleapis." - + "com/CryptoKey\"Q\n\005State\022\023\n\017STATE_NOT_KNOW" - + "N\020\000\022\t\n\005READY\020\001\022\014\n\010CREATING\020\002\022\014\n\010RESIZING" - + "\020\003\022\014\n\010DISABLED\020\004:e\352Ab\n$bigtableadmin.goo" - + "gleapis.com/Cluster\022:projects/{project}/" - + "instances/{instance}/clusters/{cluster}B" - + "\010\n\006config\"\210\004\n\nAppProfile\022\014\n\004name\030\001 \001(\t\022\014" - + "\n\004etag\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022g\n\035mul" - + "ti_cluster_routing_use_any\030\005 \001(\0132>.googl" - + "e.bigtable.admin.v2.AppProfile.MultiClus" - + "terRoutingUseAnyH\000\022[\n\026single_cluster_rou" - + "ting\030\006 \001(\01329.google.bigtable.admin.v2.Ap" - + "pProfile.SingleClusterRoutingH\000\0320\n\031Multi" - + "ClusterRoutingUseAny\022\023\n\013cluster_ids\030\001 \003(" - + "\t\032N\n\024SingleClusterRouting\022\022\n\ncluster_id\030" - + "\001 \001(\t\022\"\n\032allow_transactional_writes\030\002 \001(" - + "\010:o\352Al\n\'bigtableadmin.googleapis.com/App" - + "Profile\022Aprojects/{project}/instances/{i" - + "nstance}/appProfiles/{app_profile}B\020\n\016ro" - + "uting_policy\"\210\003\n\tHotTablet\022\014\n\004name\030\001 \001(\t" - + "\022;\n\ntable_name\030\002 \001(\tB\'\372A$\n\"bigtableadmin" - + ".googleapis.com/Table\0223\n\nstart_time\030\003 \001(" - + "\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n\010en" - + "d_time\030\004 \001(\0132\032.google.protobuf.Timestamp" - + "B\003\340A\003\022\021\n\tstart_key\030\005 \001(\t\022\017\n\007end_key\030\006 \001(" - + "\t\022#\n\026node_cpu_usage_percent\030\007 \001(\002B\003\340A\003:\177" - + "\352A|\n&bigtableadmin.googleapis.com/HotTab" - + "let\022Rprojects/{project}/instances/{insta" - + "nce}/clusters/{cluster}/hotTablets/{hot_" - + "tablet}B\320\002\n\034com.google.bigtable.admin.v2" - + "B\rInstanceProtoP\001Z=google.golang.org/gen" - + "proto/googleapis/bigtable/admin/v2;admin" - + "\252\002\036Google.Cloud.Bigtable.Admin.V2\312\002\036Goog" - + "le\\Cloud\\Bigtable\\Admin\\V2\352\002\"Google::Clo" - + "ud::Bigtable::Admin::V2\352Ax\n!cloudkms.goo" - + "gleapis.com/CryptoKey\022Sprojects/{project" - + "}/locations/{location}/keyRings/{key_rin" - + "g}/cryptoKeys/{crypto_key}b\006proto3" + + "es/{instance}\"_\n\022AutoscalingTargets\022\037\n\027c" + + "pu_utilization_percent\030\002 \001(\005\022(\n storage_" + + "utilization_gib_per_node\030\003 \001(\005\"O\n\021Autosc" + + "alingLimits\022\034\n\017min_serve_nodes\030\001 \001(\005B\003\340A" + + "\002\022\034\n\017max_serve_nodes\030\002 \001(\005B\003\340A\002\"\321\007\n\007Clus" + + "ter\022\014\n\004name\030\001 \001(\t\022;\n\010location\030\002 \001(\tB)\340A\005" + + "\372A#\n!locations.googleapis.com/Location\022;" + + "\n\005state\030\003 \001(\0162\'.google.bigtable.admin.v2" + + ".Cluster.StateB\003\340A\003\022\023\n\013serve_nodes\030\004 \001(\005" + + "\022I\n\016cluster_config\030\007 \001(\0132/.google.bigtab" + + "le.admin.v2.Cluster.ClusterConfigH\000\022H\n\024d" + + "efault_storage_type\030\005 \001(\0162%.google.bigta" + + "ble.admin.v2.StorageTypeB\003\340A\005\022R\n\021encrypt" + + "ion_config\030\006 \001(\01322.google.bigtable.admin" + + ".v2.Cluster.EncryptionConfigB\003\340A\005\032\270\001\n\030Cl" + + "usterAutoscalingConfig\022L\n\022autoscaling_li" + + "mits\030\001 \001(\0132+.google.bigtable.admin.v2.Au" + + "toscalingLimitsB\003\340A\002\022N\n\023autoscaling_targ" + + "ets\030\002 \001(\0132,.google.bigtable.admin.v2.Aut" + + "oscalingTargetsB\003\340A\002\032o\n\rClusterConfig\022^\n" + + "\032cluster_autoscaling_config\030\001 \001(\0132:.goog" + + "le.bigtable.admin.v2.Cluster.ClusterAuto" + + "scalingConfig\032P\n\020EncryptionConfig\022<\n\014kms" + + "_key_name\030\001 \001(\tB&\372A#\n!cloudkms.googleapi" + + "s.com/CryptoKey\"Q\n\005State\022\023\n\017STATE_NOT_KN" + + "OWN\020\000\022\t\n\005READY\020\001\022\014\n\010CREATING\020\002\022\014\n\010RESIZI" + + "NG\020\003\022\014\n\010DISABLED\020\004:e\352Ab\n$bigtableadmin.g" + + "oogleapis.com/Cluster\022:projects/{project" + + "}/instances/{instance}/clusters/{cluster" + + "}B\010\n\006config\"\210\004\n\nAppProfile\022\014\n\004name\030\001 \001(\t" + + "\022\014\n\004etag\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022g\n\035m" + + "ulti_cluster_routing_use_any\030\005 \001(\0132>.goo" + + "gle.bigtable.admin.v2.AppProfile.MultiCl" + + "usterRoutingUseAnyH\000\022[\n\026single_cluster_r" + + "outing\030\006 \001(\01329.google.bigtable.admin.v2." + + "AppProfile.SingleClusterRoutingH\000\0320\n\031Mul" + + "tiClusterRoutingUseAny\022\023\n\013cluster_ids\030\001 " + + "\003(\t\032N\n\024SingleClusterRouting\022\022\n\ncluster_i" + + "d\030\001 \001(\t\022\"\n\032allow_transactional_writes\030\002 " + + "\001(\010:o\352Al\n\'bigtableadmin.googleapis.com/A" + + "ppProfile\022Aprojects/{project}/instances/" + + "{instance}/appProfiles/{app_profile}B\020\n\016" + + "routing_policy\"\210\003\n\tHotTablet\022\014\n\004name\030\001 \001" + + "(\t\022;\n\ntable_name\030\002 \001(\tB\'\372A$\n\"bigtableadm" + + "in.googleapis.com/Table\0223\n\nstart_time\030\003 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n\010" + + "end_time\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\022\021\n\tstart_key\030\005 \001(\t\022\017\n\007end_key\030\006 " + + "\001(\t\022#\n\026node_cpu_usage_percent\030\007 \001(\002B\003\340A\003" + + ":\177\352A|\n&bigtableadmin.googleapis.com/HotT" + + "ablet\022Rprojects/{project}/instances/{ins" + + "tance}/clusters/{cluster}/hotTablets/{ho" + + "t_tablet}B\320\002\n\034com.google.bigtable.admin." + + "v2B\rInstanceProtoP\001Z=google.golang.org/g" + + "enproto/googleapis/bigtable/admin/v2;adm" + + "in\252\002\036Google.Cloud.Bigtable.Admin.V2\312\002\036Go" + + "ogle\\Cloud\\Bigtable\\Admin\\V2\352\002\"Google::C" + + "loud::Bigtable::Admin::V2\352Ax\n!cloudkms.g" + + "oogleapis.com/CryptoKey\022Sprojects/{proje" + + "ct}/locations/{location}/keyRings/{key_r" + + "ing}/cryptoKeys/{crypto_key}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -194,7 +195,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AutoscalingTargets_descriptor, new java.lang.String[] { - "CpuUtilizationPercent", + "CpuUtilizationPercent", "StorageUtilizationGibPerNode", }); internal_static_google_bigtable_admin_v2_AutoscalingLimits_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java new file mode 100644 index 0000000000..b4488d0427 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java @@ -0,0 +1,1176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Metadata type for the operation returned by
    + * [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UndeleteTableMetadata} + */ +public final class UndeleteTableMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UndeleteTableMetadata) + UndeleteTableMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UndeleteTableMetadata.newBuilder() to construct. + private UndeleteTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UndeleteTableMetadata() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UndeleteTableMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UndeleteTableMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UndeleteTableMetadata.class, + com.google.bigtable.admin.v2.UndeleteTableMetadata.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * The name of the table being restored.
    +   * 
    + * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * The name of the table being restored.
    +   * 
    + * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
    +   * If set, the time at which this operation finished or was cancelled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
    +   * If set, the time at which this operation finished or was cancelled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
    +   * If set, the time at which this operation finished or was cancelled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (startTime_ != null) { + output.writeMessage(2, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.admin.v2.UndeleteTableMetadata)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.UndeleteTableMetadata other = + (com.google.bigtable.admin.v2.UndeleteTableMetadata) obj; + + if (!getName().equals(other.getName())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.admin.v2.UndeleteTableMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Metadata type for the operation returned by
    +   * [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UndeleteTableMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.UndeleteTableMetadata) + com.google.bigtable.admin.v2.UndeleteTableMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UndeleteTableMetadata.class, + com.google.bigtable.admin.v2.UndeleteTableMetadata.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.UndeleteTableMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UndeleteTableMetadata getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.UndeleteTableMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UndeleteTableMetadata build() { + com.google.bigtable.admin.v2.UndeleteTableMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UndeleteTableMetadata buildPartial() { + com.google.bigtable.admin.v2.UndeleteTableMetadata result = + new com.google.bigtable.admin.v2.UndeleteTableMetadata(this); + result.name_ = name_; + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.UndeleteTableMetadata) { + return mergeFrom((com.google.bigtable.admin.v2.UndeleteTableMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.UndeleteTableMetadata other) { + if (other == com.google.bigtable.admin.v2.UndeleteTableMetadata.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.bigtable.admin.v2.UndeleteTableMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.bigtable.admin.v2.UndeleteTableMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * The name of the table being restored.
    +     * 
    + * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The name of the table being restored.
    +     * 
    + * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The name of the table being restored.
    +     * 
    + * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The name of the table being restored.
    +     * 
    + * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The name of the table being restored.
    +     * 
    + * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
    +     * If set, the time at which this operation finished or was cancelled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was cancelled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was cancelled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was cancelled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was cancelled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was cancelled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was cancelled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was cancelled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was cancelled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UndeleteTableMetadata) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.UndeleteTableMetadata) + private static final com.google.bigtable.admin.v2.UndeleteTableMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.UndeleteTableMetadata(); + } + + public static com.google.bigtable.admin.v2.UndeleteTableMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UndeleteTableMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UndeleteTableMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UndeleteTableMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadataOrBuilder.java new file mode 100644 index 0000000000..11ec2851d4 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadataOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +package com.google.bigtable.admin.v2; + +public interface UndeleteTableMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UndeleteTableMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The name of the table being restored.
    +   * 
    + * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * The name of the table being restored.
    +   * 
    + * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
    +   * If set, the time at which this operation finished or was cancelled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
    +   * If set, the time at which this operation finished or was cancelled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
    +   * If set, the time at which this operation finished or was cancelled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java new file mode 100644 index 0000000000..8cecfc37af --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java @@ -0,0 +1,668 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for
    + * [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UndeleteTableRequest} + */ +public final class UndeleteTableRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UndeleteTableRequest) + UndeleteTableRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UndeleteTableRequest.newBuilder() to construct. + private UndeleteTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UndeleteTableRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UndeleteTableRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UndeleteTableRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UndeleteTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UndeleteTableRequest.class, + com.google.bigtable.admin.v2.UndeleteTableRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. The unique name of the table to be restored.
    +   * Values are of the form
    +   * `projects/{project}/instances/{instance}/tables/{table}`.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The unique name of the table to be restored.
    +   * Values are of the form
    +   * `projects/{project}/instances/{instance}/tables/{table}`.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.admin.v2.UndeleteTableRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.UndeleteTableRequest other = + (com.google.bigtable.admin.v2.UndeleteTableRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.admin.v2.UndeleteTableRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UndeleteTableRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.UndeleteTableRequest) + com.google.bigtable.admin.v2.UndeleteTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UndeleteTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UndeleteTableRequest.class, + com.google.bigtable.admin.v2.UndeleteTableRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.UndeleteTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UndeleteTableRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.UndeleteTableRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UndeleteTableRequest build() { + com.google.bigtable.admin.v2.UndeleteTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UndeleteTableRequest buildPartial() { + com.google.bigtable.admin.v2.UndeleteTableRequest result = + new com.google.bigtable.admin.v2.UndeleteTableRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.UndeleteTableRequest) { + return mergeFrom((com.google.bigtable.admin.v2.UndeleteTableRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.UndeleteTableRequest other) { + if (other == com.google.bigtable.admin.v2.UndeleteTableRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.bigtable.admin.v2.UndeleteTableRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.bigtable.admin.v2.UndeleteTableRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. The unique name of the table to be restored.
    +     * Values are of the form
    +     * `projects/{project}/instances/{instance}/tables/{table}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The unique name of the table to be restored.
    +     * Values are of the form
    +     * `projects/{project}/instances/{instance}/tables/{table}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The unique name of the table to be restored.
    +     * Values are of the form
    +     * `projects/{project}/instances/{instance}/tables/{table}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The unique name of the table to be restored.
    +     * Values are of the form
    +     * `projects/{project}/instances/{instance}/tables/{table}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The unique name of the table to be restored.
    +     * Values are of the form
    +     * `projects/{project}/instances/{instance}/tables/{table}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UndeleteTableRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.UndeleteTableRequest) + private static final com.google.bigtable.admin.v2.UndeleteTableRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.UndeleteTableRequest(); + } + + public static com.google.bigtable.admin.v2.UndeleteTableRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UndeleteTableRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UndeleteTableRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UndeleteTableRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequestOrBuilder.java new file mode 100644 index 0000000000..15fe8edcae --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +package com.google.bigtable.admin.v2; + +public interface UndeleteTableRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UndeleteTableRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The unique name of the table to be restored.
    +   * Values are of the form
    +   * `projects/{project}/instances/{instance}/tables/{table}`.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. The unique name of the table to be restored.
    +   * Values are of the form
    +   * `projects/{project}/instances/{instance}/tables/{table}`.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto index 88bd870474..92b9f690b2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -108,6 +108,19 @@ service BigtableTableAdmin { option (google.api.method_signature) = "name"; } + // Restores a specified table which was accidentally deleted. + rpc UndeleteTable(UndeleteTableRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{name=projects/*/instances/*/tables/*}:undelete" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Table" + metadata_type: "UndeleteTableMetadata" + }; + } + // Performs a series of column family modifications on the specified table. // Either all or none of the modifications will occur before this method // returns, but data requests received prior to that point may see a table @@ -580,6 +593,33 @@ message DeleteTableRequest { ]; } +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable] +message UndeleteTableRequest { + // Required. The unique name of the table to be restored. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; +} + +// Metadata type for the operation returned by +// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]. +message UndeleteTableMetadata { + // The name of the table being restored. + string name = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was cancelled. + google.protobuf.Timestamp end_time = 3; +} + // Request message for // [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies] message ModifyColumnFamiliesRequest { @@ -588,7 +628,7 @@ message ModifyColumnFamiliesRequest { // The ID of the column family to be modified. string id = 1; - // Column familiy modifications. + // Column family modifications. oneof mod { // Create a new column family with the specified schema, or fail if // one already exists with the given ID. diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto index bbbc5bfaa6..4dbbbbbfc4 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto @@ -115,6 +115,14 @@ message AutoscalingTargets { // 100 (total utilization), and is limited between 10 and 80, otherwise it // will return INVALID_ARGUMENT error. int32 cpu_utilization_percent = 2; + + // The storage utilization that the Autoscaler should be trying to achieve. + // This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD + // cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster; + // otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, + // it will be treated as if it were set to the default value: 2560 for SSD, + // 8192 for HDD. + int32 storage_utilization_gib_per_node = 3; } // Limits for the number of nodes a Cluster can autoscale up/down to. From 2705a477f70247f16401901be9e0cd38733bdd2f Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Wed, 29 Jun 2022 17:02:11 -0400 Subject: [PATCH 20/23] fix: rename response observer and callbacks (#1291) Rename HeaderTracer* to BigtableTracer* --- .../v2/stub/metrics/BigtableTracerStreamingCallable.java | 8 ++++---- .../data/v2/stub/metrics/BigtableTracerUnaryCallable.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java index 09bb906a89..6a902029eb 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java @@ -58,8 +58,8 @@ public void call( final GrpcResponseMetadata responseMetadata = new GrpcResponseMetadata(); // tracer should always be an instance of bigtable tracer if (context.getTracer() instanceof BigtableTracer) { - HeaderTracerResponseObserver innerObserver = - new HeaderTracerResponseObserver<>( + BigtableTracerResponseObserver innerObserver = + new BigtableTracerResponseObserver<>( responseObserver, (BigtableTracer) context.getTracer(), responseMetadata); innerCallable.call(request, innerObserver, responseMetadata.addHandlers(context)); } else { @@ -67,13 +67,13 @@ public void call( } } - private class HeaderTracerResponseObserver implements ResponseObserver { + private class BigtableTracerResponseObserver implements ResponseObserver { private final BigtableTracer tracer; private final ResponseObserver outerObserver; private final GrpcResponseMetadata responseMetadata; - HeaderTracerResponseObserver( + BigtableTracerResponseObserver( ResponseObserver observer, BigtableTracer tracer, GrpcResponseMetadata metadata) { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java index fd2eb60f27..de53a0c94e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java @@ -53,8 +53,8 @@ public ApiFuture futureCall(RequestT request, ApiCallContext context) { if (context.getTracer() instanceof BigtableTracer) { final GrpcResponseMetadata responseMetadata = new GrpcResponseMetadata(); final ApiCallContext contextWithResponseMetadata = responseMetadata.addHandlers(context); - HeaderTracerUnaryCallback callback = - new HeaderTracerUnaryCallback((BigtableTracer) context.getTracer(), responseMetadata); + BigtableTracerUnaryCallback callback = + new BigtableTracerUnaryCallback((BigtableTracer) context.getTracer(), responseMetadata); ApiFuture future = innerCallable.futureCall(request, contextWithResponseMetadata); ApiFutures.addCallback(future, callback, MoreExecutors.directExecutor()); return future; @@ -63,12 +63,12 @@ public ApiFuture futureCall(RequestT request, ApiCallContext context) { } } - class HeaderTracerUnaryCallback implements ApiFutureCallback { + class BigtableTracerUnaryCallback implements ApiFutureCallback { private final BigtableTracer tracer; private final GrpcResponseMetadata responseMetadata; - HeaderTracerUnaryCallback(BigtableTracer tracer, GrpcResponseMetadata responseMetadata) { + BigtableTracerUnaryCallback(BigtableTracer tracer, GrpcResponseMetadata responseMetadata) { this.tracer = tracer; this.responseMetadata = responseMetadata; } From 1d75ec65f47dec77ae53383341cb979280592db4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 02:16:11 +0000 Subject: [PATCH 21/23] chore: Disable CLIRR checks on releas (#1474) (#1292) Source-Link: https://github.com/googleapis/synthtool/commit/7a220e27993a25ab3cda26510d5619d97b6952a9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/release/stage.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index f0625e4d94..a454a61e8d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 -# created: 2022-06-27T15:01:06.405564326Z + digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 +# created: 2022-06-29T23:17:33.110417661Z diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 77dc4e8f0f..1dba8de108 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -32,6 +32,7 @@ retry_with_backoff 3 10 \ mvn clean deploy -B \ --settings ${MAVEN_SETTINGS_FILE} \ -DskipTests=true \ + -Dclirr.skip=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ @@ -42,4 +43,4 @@ then mvn nexus-staging:release -B \ -DperformRelease=true \ --settings=settings.xml -fi \ No newline at end of file +fi From 146c824962b48b2023ddb93d92e4a61297722f0f Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Thu, 30 Jun 2022 10:02:14 -0400 Subject: [PATCH 22/23] fix: fix flaky test (#1293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). --- .../bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java index 9294033f26..133f06767a 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java @@ -331,7 +331,7 @@ public void testMutateRowAttempts() { // calls releaseWaiters(). onOperationComplete() is called in TracerFinisher which will be // called after the mutateRow call is returned. So there's a race between when the call returns // and when the record() is called in onOperationCompletion(). - verify(statsRecorderWrapper, timeout(20).times(fakeService.getAttemptCounter().get() + 1)) + verify(statsRecorderWrapper, timeout(50).times(fakeService.getAttemptCounter().get() + 1)) .record(status.capture(), tableId.capture(), zone.capture(), cluster.capture()); assertThat(zone.getAllValues()).containsExactly(UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED); assertThat(cluster.getAllValues()).containsExactly(UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED); From 333c1f6988cf6519ac29497e2a1fc50536ea023d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 14:32:15 +0000 Subject: [PATCH 23/23] chore(main): release 2.9.0 (#1275) :robot: I have created a release *beep* *boop* --- ## [2.9.0](https://github.com/googleapis/java-bigtable/compare/v2.8.0...v2.9.0) (2022-06-30) ### Features * add built-in metric constants ([#1243](https://github.com/googleapis/java-bigtable/issues/1243)) ([b1fc00a](https://github.com/googleapis/java-bigtable/commit/b1fc00aa09129185b4e4db8edb9c4af2dbfd1ec8)) * **generated:** Add storage_utilization_gib_per_node to Autoscaling target ([a4c6621](https://github.com/googleapis/java-bigtable/commit/a4c662153c98f8043059a068a66d784761b7c2cb)) * **generated:** Cloud Bigtable Undelete Table service and message proto files ([a4c6621](https://github.com/googleapis/java-bigtable/commit/a4c662153c98f8043059a068a66d784761b7c2cb)) * update tracers to use built in metrics ([#1244](https://github.com/googleapis/java-bigtable/issues/1244)) ([df77560](https://github.com/googleapis/java-bigtable/commit/df77560debadec8b3aecc08e95a58558c418df86)) ### Bug Fixes * fix flaky test ([#1293](https://github.com/googleapis/java-bigtable/issues/1293)) ([146c824](https://github.com/googleapis/java-bigtable/commit/146c824962b48b2023ddb93d92e4a61297722f0f)) * remove the shaded profile from root pom ([#1274](https://github.com/googleapis/java-bigtable/issues/1274)) ([5eafcc3](https://github.com/googleapis/java-bigtable/commit/5eafcc3be3986692e64c95dcfc0d675208f2218c)) * rename HeaderTracer callables to BigtableTracer callables ([#1276](https://github.com/googleapis/java-bigtable/issues/1276)) ([e0bd6c9](https://github.com/googleapis/java-bigtable/commit/e0bd6c922ed2adfc8d6dddeced84cb87fc9f2e91)) * rename response observer and callbacks ([#1291](https://github.com/googleapis/java-bigtable/issues/1291)) ([2705a47](https://github.com/googleapis/java-bigtable/commit/2705a477f70247f16401901be9e0cd38733bdd2f)) ### Documentation * **sample:** update README for native image sample ([#1281](https://github.com/googleapis/java-bigtable/issues/1281)) ([4a3a2c9](https://github.com/googleapis/java-bigtable/commit/4a3a2c947642678c3011db616ebe7cbaed677f96)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#1285](https://github.com/googleapis/java-bigtable/issues/1285)) ([1dc7787](https://github.com/googleapis/java-bigtable/commit/1dc77879ea51fd397b75020a16728adec72f1b9b)) * update dependency org.graalvm.buildtools:junit-platform-native to v0.9.12 ([#1283](https://github.com/googleapis/java-bigtable/issues/1283)) ([ba7844a](https://github.com/googleapis/java-bigtable/commit/ba7844acb6a4a3c47f1fc12b426f517b7fe3e55e)) * update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.12 ([#1284](https://github.com/googleapis/java-bigtable/issues/1284)) ([75d0066](https://github.com/googleapis/java-bigtable/commit/75d006601e51263786f38b445a9cc6f08cbee403)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 30 +++++++++++++++++++ google-cloud-bigtable-bom/pom.xml | 18 +++++------ google-cloud-bigtable-deps-bom/pom.xml | 2 +- google-cloud-bigtable-emulator-core/pom.xml | 4 +-- google-cloud-bigtable-emulator/pom.xml | 10 +++---- google-cloud-bigtable-stats/pom.xml | 6 ++-- google-cloud-bigtable/pom.xml | 10 +++---- .../com/google/cloud/bigtable/Version.java | 2 +- grpc-google-cloud-bigtable-admin-v2/pom.xml | 8 ++--- grpc-google-cloud-bigtable-v2/pom.xml | 8 ++--- pom.xml | 12 ++++---- proto-google-cloud-bigtable-admin-v2/pom.xml | 8 ++--- proto-google-cloud-bigtable-v2/pom.xml | 8 ++--- samples/snapshot/pom.xml | 2 +- versions.txt | 14 ++++----- 15 files changed, 86 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 497e7a0ffb..78b9bfbe8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,35 @@ # Changelog +## [2.9.0](https://github.com/googleapis/java-bigtable/compare/v2.8.0...v2.9.0) (2022-06-30) + + +### Features + +* add built-in metric constants ([#1243](https://github.com/googleapis/java-bigtable/issues/1243)) ([b1fc00a](https://github.com/googleapis/java-bigtable/commit/b1fc00aa09129185b4e4db8edb9c4af2dbfd1ec8)) +* **generated:** Add storage_utilization_gib_per_node to Autoscaling target ([a4c6621](https://github.com/googleapis/java-bigtable/commit/a4c662153c98f8043059a068a66d784761b7c2cb)) +* **generated:** Cloud Bigtable Undelete Table service and message proto files ([a4c6621](https://github.com/googleapis/java-bigtable/commit/a4c662153c98f8043059a068a66d784761b7c2cb)) +* update tracers to use built in metrics ([#1244](https://github.com/googleapis/java-bigtable/issues/1244)) ([df77560](https://github.com/googleapis/java-bigtable/commit/df77560debadec8b3aecc08e95a58558c418df86)) + + +### Bug Fixes + +* fix flaky test ([#1293](https://github.com/googleapis/java-bigtable/issues/1293)) ([146c824](https://github.com/googleapis/java-bigtable/commit/146c824962b48b2023ddb93d92e4a61297722f0f)) +* remove the shaded profile from root pom ([#1274](https://github.com/googleapis/java-bigtable/issues/1274)) ([5eafcc3](https://github.com/googleapis/java-bigtable/commit/5eafcc3be3986692e64c95dcfc0d675208f2218c)) +* rename HeaderTracer callables to BigtableTracer callables ([#1276](https://github.com/googleapis/java-bigtable/issues/1276)) ([e0bd6c9](https://github.com/googleapis/java-bigtable/commit/e0bd6c922ed2adfc8d6dddeced84cb87fc9f2e91)) +* rename response observer and callbacks ([#1291](https://github.com/googleapis/java-bigtable/issues/1291)) ([2705a47](https://github.com/googleapis/java-bigtable/commit/2705a477f70247f16401901be9e0cd38733bdd2f)) + + +### Documentation + +* **sample:** update README for native image sample ([#1281](https://github.com/googleapis/java-bigtable/issues/1281)) ([4a3a2c9](https://github.com/googleapis/java-bigtable/commit/4a3a2c947642678c3011db616ebe7cbaed677f96)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#1285](https://github.com/googleapis/java-bigtable/issues/1285)) ([1dc7787](https://github.com/googleapis/java-bigtable/commit/1dc77879ea51fd397b75020a16728adec72f1b9b)) +* update dependency org.graalvm.buildtools:junit-platform-native to v0.9.12 ([#1283](https://github.com/googleapis/java-bigtable/issues/1283)) ([ba7844a](https://github.com/googleapis/java-bigtable/commit/ba7844acb6a4a3c47f1fc12b426f517b7fe3e55e)) +* update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.12 ([#1284](https://github.com/googleapis/java-bigtable/issues/1284)) ([75d0066](https://github.com/googleapis/java-bigtable/commit/75d006601e51263786f38b445a9cc6f08cbee403)) + ## [2.8.0](https://github.com/googleapis/java-bigtable/compare/v2.7.0...v2.8.0) (2022-05-27) diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml index cc7eac753d..e2ae065c7a 100644 --- a/google-cloud-bigtable-bom/pom.xml +++ b/google-cloud-bigtable-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigtable-bom - 2.8.1-SNAPSHOT + 2.9.0 pom com.google.cloud @@ -62,42 +62,42 @@ com.google.cloud google-cloud-bigtable - 2.8.1-SNAPSHOT + 2.9.0 com.google.cloud google-cloud-bigtable-emulator - 0.145.1-SNAPSHOT + 0.146.0 com.google.cloud google-cloud-bigtable-emulator-core - 0.145.1-SNAPSHOT + 0.146.0 com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.8.1-SNAPSHOT + 2.9.0 com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.8.1-SNAPSHOT + 2.9.0 com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.8.1-SNAPSHOT + 2.9.0 com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.8.1-SNAPSHOT + 2.9.0 com.google.cloud google-cloud-bigtable-stats - 2.8.1-SNAPSHOT + 2.9.0 diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml index ac9ee970ff..d346bb3bf4 100644 --- a/google-cloud-bigtable-deps-bom/pom.xml +++ b/google-cloud-bigtable-deps-bom/pom.xml @@ -12,7 +12,7 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.1-SNAPSHOT + 2.9.0 pom diff --git a/google-cloud-bigtable-emulator-core/pom.xml b/google-cloud-bigtable-emulator-core/pom.xml index 1f2ac127ca..142a99beee 100644 --- a/google-cloud-bigtable-emulator-core/pom.xml +++ b/google-cloud-bigtable-emulator-core/pom.xml @@ -7,11 +7,11 @@ google-cloud-bigtable-parent com.google.cloud - 2.8.1-SNAPSHOT + 2.9.0 google-cloud-bigtable-emulator-core - 0.145.1-SNAPSHOT + 0.146.0 A Java wrapper for the Cloud Bigtable emulator. diff --git a/google-cloud-bigtable-emulator/pom.xml b/google-cloud-bigtable-emulator/pom.xml index b0c75bc3d8..ad6c113788 100644 --- a/google-cloud-bigtable-emulator/pom.xml +++ b/google-cloud-bigtable-emulator/pom.xml @@ -5,7 +5,7 @@ 4.0.0 google-cloud-bigtable-emulator - 0.145.1-SNAPSHOT + 0.146.0 Google Cloud Java - Bigtable Emulator https://github.com/googleapis/java-bigtable @@ -14,7 +14,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.8.1-SNAPSHOT + 2.9.0 scm:git:git@github.com:googleapis/java-bigtable.git @@ -81,14 +81,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import com.google.cloud google-cloud-bigtable-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import @@ -99,7 +99,7 @@ com.google.cloud google-cloud-bigtable-emulator-core - 0.145.1-SNAPSHOT + 0.146.0 diff --git a/google-cloud-bigtable-stats/pom.xml b/google-cloud-bigtable-stats/pom.xml index a62e898fe3..c4c1bf16b8 100644 --- a/google-cloud-bigtable-stats/pom.xml +++ b/google-cloud-bigtable-stats/pom.xml @@ -5,7 +5,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.8.1-SNAPSHOT + 2.9.0 4.0.0 @@ -13,7 +13,7 @@ through Stackdriver. Built-in metrics will be implemented with shaded OpenCensus so it won't interfere with customer's application metrics. --> google-cloud-bigtable-stats - 2.8.1-SNAPSHOT + 2.9.0 Experimental project to shade OpenCensus dependencies. @@ -21,7 +21,7 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index b5128af7ae..6290ca95c9 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-bigtable - 2.8.1-SNAPSHOT + 2.9.0 jar Google Cloud Bigtable https://github.com/googleapis/java-bigtable @@ -12,11 +12,11 @@ com.google.cloud google-cloud-bigtable-parent - 2.8.1-SNAPSHOT + 2.9.0 - 2.8.1-SNAPSHOT + 2.9.0 google-cloud-bigtable @@ -43,14 +43,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import com.google.cloud google-cloud-bigtable-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java index 7409f2d556..891b79a557 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java @@ -20,6 +20,6 @@ @InternalApi("For internal use only") public final class Version { // {x-version-update-start:google-cloud-bigtable:current} - public static String VERSION = "2.8.1-SNAPSHOT"; + public static String VERSION = "2.9.0"; // {x-version-update-end} } diff --git a/grpc-google-cloud-bigtable-admin-v2/pom.xml b/grpc-google-cloud-bigtable-admin-v2/pom.xml index bac7da3855..b682c527fd 100644 --- a/grpc-google-cloud-bigtable-admin-v2/pom.xml +++ b/grpc-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.8.1-SNAPSHOT + 2.9.0 grpc-google-cloud-bigtable-admin-v2 GRPC library for grpc-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.8.1-SNAPSHOT + 2.9.0 @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import com.google.cloud google-cloud-bigtable-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import diff --git a/grpc-google-cloud-bigtable-v2/pom.xml b/grpc-google-cloud-bigtable-v2/pom.xml index 25605a7072..b6982779fb 100644 --- a/grpc-google-cloud-bigtable-v2/pom.xml +++ b/grpc-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.8.1-SNAPSHOT + 2.9.0 grpc-google-cloud-bigtable-v2 GRPC library for grpc-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.8.1-SNAPSHOT + 2.9.0 @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import com.google.cloud google-cloud-bigtable-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import diff --git a/pom.xml b/pom.xml index 74f02cdeb4..a6c449872e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ google-cloud-bigtable-parent pom - 2.8.1-SNAPSHOT + 2.9.0 Google Cloud Bigtable Parent https://github.com/googleapis/java-bigtable @@ -152,27 +152,27 @@ com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.8.1-SNAPSHOT + 2.9.0 com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.8.1-SNAPSHOT + 2.9.0 com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.8.1-SNAPSHOT + 2.9.0 com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.8.1-SNAPSHOT + 2.9.0 com.google.cloud google-cloud-bigtable - 2.8.1-SNAPSHOT + 2.9.0 diff --git a/proto-google-cloud-bigtable-admin-v2/pom.xml b/proto-google-cloud-bigtable-admin-v2/pom.xml index 51bd17abe3..a2ce7a79de 100644 --- a/proto-google-cloud-bigtable-admin-v2/pom.xml +++ b/proto-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.8.1-SNAPSHOT + 2.9.0 proto-google-cloud-bigtable-admin-v2 PROTO library for proto-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.8.1-SNAPSHOT + 2.9.0 @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import com.google.cloud google-cloud-bigtable-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import diff --git a/proto-google-cloud-bigtable-v2/pom.xml b/proto-google-cloud-bigtable-v2/pom.xml index 362a6e89ff..4a0dce7001 100644 --- a/proto-google-cloud-bigtable-v2/pom.xml +++ b/proto-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.8.1-SNAPSHOT + 2.9.0 proto-google-cloud-bigtable-v2 PROTO library for proto-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.8.1-SNAPSHOT + 2.9.0 @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import com.google.cloud google-cloud-bigtable-bom - 2.8.1-SNAPSHOT + 2.9.0 pom import diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 6ef2c48ae7..57320a9292 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigtable - 2.8.1-SNAPSHOT + 2.9.0 diff --git a/versions.txt b/versions.txt index 2bcd3fb41d..01c6e47293 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -google-cloud-bigtable:2.8.0:2.8.1-SNAPSHOT -grpc-google-cloud-bigtable-admin-v2:2.8.0:2.8.1-SNAPSHOT -grpc-google-cloud-bigtable-v2:2.8.0:2.8.1-SNAPSHOT -proto-google-cloud-bigtable-admin-v2:2.8.0:2.8.1-SNAPSHOT -proto-google-cloud-bigtable-v2:2.8.0:2.8.1-SNAPSHOT -google-cloud-bigtable-emulator:0.145.0:0.145.1-SNAPSHOT -google-cloud-bigtable-emulator-core:2.8.0:2.8.1-SNAPSHOT +google-cloud-bigtable:2.9.0:2.9.0 +grpc-google-cloud-bigtable-admin-v2:2.9.0:2.9.0 +grpc-google-cloud-bigtable-v2:2.9.0:2.9.0 +proto-google-cloud-bigtable-admin-v2:2.9.0:2.9.0 +proto-google-cloud-bigtable-v2:2.9.0:2.9.0 +google-cloud-bigtable-emulator:0.146.0:0.146.0 +google-cloud-bigtable-emulator-core:2.9.0:2.9.0