From 2834bc89bd00bb4752680b88b39b478fb52abe76 Mon Sep 17 00:00:00 2001 From: Ron Gal Date: Fri, 9 Aug 2024 02:47:46 +0000 Subject: [PATCH 1/5] feat(bigtable): Remove deprecated Bytes from BigEndianBytesEncoding --- .../cloud/bigtable/admin/v2/models/Type.java | 14 +++++--------- .../google/cloud/bigtable/admin/v2/TypeProtos.java | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java index e6a77dc2bf..4840ead819 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java @@ -166,10 +166,9 @@ public abstract static class Encoding { static Encoding fromProto(com.google.bigtable.admin.v2.Type.Int64.Encoding source) { switch (source.getEncodingCase()) { case BIG_ENDIAN_BYTES: - return BigEndianBytes.create( - Bytes.fromProto(source.getBigEndianBytes().getBytesType())); + return BigEndianBytes.create(); case ENCODING_NOT_SET: - return BigEndianBytes.create(Bytes.rawBytes()); + return BigEndianBytes.create(); } throw new UnsupportedOperationException(); } @@ -177,18 +176,15 @@ static Encoding fromProto(com.google.bigtable.admin.v2.Type.Int64.Encoding sourc @AutoValue public abstract static class BigEndianBytes extends Encoding { - public static BigEndianBytes create(Bytes bytes) { - return new AutoValue_Type_Int64_Encoding_BigEndianBytes(bytes); + public static BigEndianBytes create() { + return new AutoValue_Type_Int64_Encoding_BigEndianBytes(); } - @Nonnull - public abstract Bytes getBytes(); - @Override com.google.bigtable.admin.v2.Type.Int64.Encoding toProto() { com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder builder = com.google.bigtable.admin.v2.Type.Int64.Encoding.newBuilder(); - builder.getBigEndianBytesBuilder().setBytesType(getBytes().toProto().getBytesType()); + builder.getBigEndianBytesBuilder(); return builder.build(); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/TypeProtos.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/TypeProtos.java index 0e73f923f6..025401f61a 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/TypeProtos.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/TypeProtos.java @@ -34,7 +34,6 @@ public static com.google.bigtable.admin.v2.Type int64Type() { .setBigEndianBytes( com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes .newBuilder() - .setBytesType(bytesType()) .build()) .build())) .build(); From 54b595f406cc1a2a62ca43aa646939d5e854a08d Mon Sep 17 00:00:00 2001 From: Ron Gal Date: Fri, 9 Aug 2024 02:53:47 +0000 Subject: [PATCH 2/5] minor fix --- .../java/com/google/cloud/bigtable/admin/v2/models/Type.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java index 2c572e4983..99f7f98c79 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java @@ -76,7 +76,7 @@ public static Bytes bytes(Bytes.Encoding encoding) { * Creates an Int64 type with a big-endian encoding. The bytes are then encoded in "raw" format. */ public static Int64 bigEndianInt64() { - return Int64.create(Int64.Encoding.BigEndianBytes.create(Type.rawBytes())); + return Int64.create(Int64.Encoding.BigEndianBytes.create()); } /** Creates an Int64 type with the specified encoding. */ From 7c5b99fa78ea3508b79241db5bc895ac3f5d6c41 Mon Sep 17 00:00:00 2001 From: Ron Gal Date: Fri, 9 Aug 2024 02:59:14 +0000 Subject: [PATCH 3/5] minor fix --- .../com/google/cloud/bigtable/admin/v2/models/TypeTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TypeTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TypeTest.java index 047c286838..c08415a5c1 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TypeTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TypeTest.java @@ -55,7 +55,7 @@ public void bigEndianInt64() { @Test public void int64WithEncoding() { - Type type = Type.int64(Int64.Encoding.BigEndianBytes.create(Type.rawBytes())); + Type type = Type.int64(Int64.Encoding.BigEndianBytes.create()); assertThat(type.toProto()).isEqualTo(TypeProtos.int64Type()); } From fbd46f954200849c47dc0d51109b100b55752b34 Mon Sep 17 00:00:00 2001 From: Ron Gal Date: Fri, 9 Aug 2024 03:04:18 +0000 Subject: [PATCH 4/5] minor fix --- google-cloud-bigtable/clirr-ignored-differences.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/google-cloud-bigtable/clirr-ignored-differences.xml b/google-cloud-bigtable/clirr-ignored-differences.xml index ecd4934995..fb5b514b3d 100644 --- a/google-cloud-bigtable/clirr-ignored-differences.xml +++ b/google-cloud-bigtable/clirr-ignored-differences.xml @@ -249,4 +249,14 @@ com/google/cloud/bigtable/admin/v2/models/Type$Raw com/google/cloud/bigtable/admin/v2/models/Type + + 7004 + com/google/cloud/bigtable/admin/v2/models/Type$Int64$Encoding$BigEndianBytes + * + + + 7002 + com/google/cloud/bigtable/admin/v2/models/Type$Int64$Encoding$BigEndianBytes + * + From 2f67692209c5cab4845f9ef379d263d162773deb Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 9 Aug 2024 17:33:32 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 640ea976e7..645ea12695 100644 --- a/README.md +++ b/README.md @@ -50,20 +50,20 @@ If you are using Maven without the 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:26.43.0') +implementation platform('com.google.cloud:libraries-bom:26.44.0') 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.41.0' +implementation 'com.google.cloud:google-cloud-bigtable:2.42.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.41.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.42.0" ``` @@ -542,7 +542,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigtable.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.41.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.42.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles