Skip to content

Commit

Permalink
Merge branch 'main' into ping-test
Browse files Browse the repository at this point in the history
  • Loading branch information
igorbernstein2 authored Dec 3, 2024
2 parents 91ef979 + 73557c3 commit dce3075
Show file tree
Hide file tree
Showing 40 changed files with 721 additions and 420 deletions.
2 changes: 2 additions & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ branchProtectionRules:
- 'Kokoro - Test: Java 17 GraalVM Native Image'
- javadoc
- conformance
- library_generation
- unmanaged_dependency_check
- pattern: 1.22.0-sp
isAdminEnforced: true
requiredApprovingReviewCount: 1
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## [2.48.0](https://github.com/googleapis/java-bigtable/compare/v2.47.0...v2.48.0) (2024-11-19)


### Features

* Enable trailer optimization by default ([#2421](https://github.com/googleapis/java-bigtable/issues/2421)) ([7b2c4e4](https://github.com/googleapis/java-bigtable/commit/7b2c4e45dce828f506dac16ffc2b71995564a477))


### Bug Fixes

* **deps:** Update the Java code generator (gapic-generator-java) to 2.50.0 ([6b35b47](https://github.com/googleapis/java-bigtable/commit/6b35b478e10efce77d95bffcd7a64e84e1bcc5b0))
* Make client side metrics tag in sync with server ([#2401](https://github.com/googleapis/java-bigtable/issues/2401)) ([bba4183](https://github.com/googleapis/java-bigtable/commit/bba41837febc10e9507afc7117e2e4ec2d15fb11))


### Dependencies

* Revert downgrade grpc to 1.67.1 [#2366](https://github.com/googleapis/java-bigtable/issues/2366) ([#2414](https://github.com/googleapis/java-bigtable/issues/2414)) ([710fa52](https://github.com/googleapis/java-bigtable/commit/710fa52a05ce4fc81ee8e980d87e0ca86676219f))
* Update dependency com.google.cloud:gapic-libraries-bom to v1.48.0 ([#2422](https://github.com/googleapis/java-bigtable/issues/2422)) ([2088a39](https://github.com/googleapis/java-bigtable/commit/2088a399bd8b71e98035cc475637f41d5873082d))
* Update sdk-platform-java dependencies ([#2418](https://github.com/googleapis/java-bigtable/issues/2418)) ([c12bb01](https://github.com/googleapis/java-bigtable/commit/c12bb01a6c5be0a72285db0505407f3e1c2534fb))

## [2.47.0](https://github.com/googleapis/java-bigtable/compare/v2.46.0...v2.47.0) (2024-11-13)


Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.47.0'
implementation 'com.google.cloud:google-cloud-bigtable:2.48.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.47.0"
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.48.0"
```

## Authentication
Expand Down Expand Up @@ -543,7 +543,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.47.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.48.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
Expand Down
2 changes: 1 addition & 1 deletion generation_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
gapic_generator_version: 2.50.0
googleapis_commitish: c6eb517e76204c0cd71ab298c165eebbf12682eb
googleapis_commitish: 349841abac6c3e580ccce6e3d6fcc182ed2512c2
libraries_bom_version: 26.50.0
template_excludes:
- .gitignore
Expand Down
16 changes: 8 additions & 8 deletions google-cloud-bigtable-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-bom</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<packaging>pom</packaging>
<parent>
<groupId>com.google.cloud</groupId>
Expand Down Expand Up @@ -63,37 +63,37 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator</artifactId>
<version>0.184.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<version>0.185.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<version>0.184.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<version>0.185.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-bigtable-admin-v2</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-admin-v2:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-admin-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-bigtable-v2</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-v2:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-bigtable-admin-v2</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-bigtable-admin-v2:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-bigtable-admin-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-bigtable-v2</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-bigtable-v2:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-bigtable-v2:current} -->
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-bigtable-deps-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->

<packaging>pom</packaging>
<description>
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-bigtable-emulator-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<artifactId>google-cloud-bigtable-parent</artifactId>
<groupId>com.google.cloud</groupId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
</parent>

<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<version>0.184.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<version>0.185.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->

<description>
A Java wrapper for the Cloud Bigtable emulator.
Expand Down
10 changes: 5 additions & 5 deletions google-cloud-bigtable-emulator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>google-cloud-bigtable-emulator</artifactId>
<version>0.184.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<version>0.185.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<name>Google Cloud Java - Bigtable Emulator</name>
<url>https://github.com/googleapis/java-bigtable</url>
<description>
Expand All @@ -14,7 +14,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-parent</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
</parent>
<scm>
<connection>scm:git:[email protected]:googleapis/java-bigtable.git</connection>
Expand Down Expand Up @@ -81,14 +81,14 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-bom</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -99,7 +99,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<version>0.184.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<version>0.185.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
</dependency>

<dependency>
Expand Down
10 changes: 5 additions & 5 deletions google-cloud-bigtable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>google-cloud-bigtable</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<packaging>jar</packaging>
<name>Google Cloud Bigtable</name>
<url>https://github.com/googleapis/java-bigtable</url>
Expand All @@ -12,11 +12,11 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-parent</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
</parent>
<properties>
<!-- The version that will be embedded in the published jar via maven-resources-plugin -->
<java-bigtable.version>2.47.1-SNAPSHOT</java-bigtable.version><!-- {x-version-update:google-cloud-bigtable:current} -->
<java-bigtable.version>2.48.1-SNAPSHOT</java-bigtable.version><!-- {x-version-update:google-cloud-bigtable:current} -->

<site.installationModule>google-cloud-bigtable</site.installationModule>

Expand Down Expand Up @@ -52,14 +52,14 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-bom</artifactId>
<version>2.47.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.48.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.47.1-SNAPSHOT";
public static String VERSION = "2.48.1-SNAPSHOT";
// {x-version-update-end}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ public CreateTableRequest addChangeStreamRetention(Duration retention) {
return this;
}

/** Configures if the table is deletion protected. */
public CreateTableRequest setDeletionProtection(boolean deletionProtection) {
requestBuilder.getTableBuilder().setDeletionProtection(deletionProtection);
return this;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public com.google.bigtable.admin.v2.Table.ClusterState.ReplicationState toProto(
private final List<ColumnFamily> columnFamilies;

private final Duration changeStreamRetention;
private final boolean deletionProtection;

@InternalApi
public static Table fromProto(@Nonnull com.google.bigtable.admin.v2.Table proto) {
Expand Down Expand Up @@ -135,19 +136,22 @@ public static Table fromProto(@Nonnull com.google.bigtable.admin.v2.Table proto)
TableName.parse(proto.getName()),
replicationStates.build(),
columnFamilies.build(),
changeStreamConfig);
changeStreamConfig,
proto.getDeletionProtection());
}

private Table(
TableName tableName,
Map<String, ReplicationState> replicationStatesByClusterId,
List<ColumnFamily> columnFamilies,
Duration changeStreamRetention) {
Duration changeStreamRetention,
boolean deletionProtection) {
this.instanceId = tableName.getInstance();
this.id = tableName.getTable();
this.replicationStatesByClusterId = replicationStatesByClusterId;
this.columnFamilies = columnFamilies;
this.changeStreamRetention = changeStreamRetention;
this.deletionProtection = deletionProtection;
}

/** Gets the table's id. */
Expand All @@ -172,6 +176,11 @@ public Duration getChangeStreamRetention() {
return changeStreamRetention;
}

/** Returns whether this table is deletion protected. */
public boolean isDeletionProtected() {
return deletionProtection;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -185,12 +194,18 @@ public boolean equals(Object o) {
&& Objects.equal(instanceId, table.instanceId)
&& Objects.equal(replicationStatesByClusterId, table.replicationStatesByClusterId)
&& Objects.equal(columnFamilies, table.columnFamilies)
&& Objects.equal(changeStreamRetention, table.changeStreamRetention);
&& Objects.equal(changeStreamRetention, table.changeStreamRetention)
&& Objects.equal(deletionProtection, table.deletionProtection);
}

@Override
public int hashCode() {
return Objects.hashCode(
id, instanceId, replicationStatesByClusterId, columnFamilies, changeStreamRetention);
id,
instanceId,
replicationStatesByClusterId,
columnFamilies,
changeStreamRetention,
deletionProtection);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ public UpdateTableRequest disableChangeStreamRetention() {
return addChangeStreamRetention(Duration.ZERO);
}

/** Changes the deletion protection of an existing table. */
public UpdateTableRequest setDeletionProtection(boolean deletionProtection) {
requestBuilder.getTableBuilder().setDeletionProtection(deletionProtection);
requestBuilder.getUpdateMaskBuilder().addPaths("deletion_protection");
return this;
}

@InternalApi
public com.google.bigtable.admin.v2.UpdateTableRequest toProto(
String projectId, String instanceId) {
Expand Down
Loading

0 comments on commit dce3075

Please sign in to comment.