Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add fields and the BackupType proto for Hot Backups #2300

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,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.40.0'
implementation 'com.google.cloud:google-cloud-bigtable:2.41.0'
```

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

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.40.0"
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.41.0"
```
<!-- {x-version-update-end} -->

Expand Down Expand Up @@ -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.40.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.41.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
Original file line number Diff line number Diff line change
Expand Up @@ -4068,7 +4068,7 @@ public final UnaryCallable<ListBackupsRequest, ListBackupsResponse> listBackupsC
* Create a new table by restoring from a completed backup. The returned table [long-running
* operation][google.longrunning.Operation] can be used to track the progress of the operation,
* and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
*
Expand Down Expand Up @@ -4104,7 +4104,7 @@ public final OperationFuture<Table, RestoreTableMetadata> restoreTableAsync(
* Create a new table by restoring from a completed backup. The returned table [long-running
* operation][google.longrunning.Operation] can be used to track the progress of the operation,
* and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
*
Expand Down Expand Up @@ -4140,7 +4140,7 @@ public final OperationFuture<Table, RestoreTableMetadata> restoreTableAsync(
* Create a new table by restoring from a completed backup. The returned table [long-running
* operation][google.longrunning.Operation] can be used to track the progress of the operation,
* and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
*
Expand Down Expand Up @@ -4197,7 +4197,7 @@ public final UnaryCallable<RestoreTableRequest, Operation> restoreTableCallable(
* }</pre>
*
* @param parent Required. The name of the destination cluster that will contain the backup copy.
* The cluster must already exists. Values are of the form:
* The cluster must already exist. Values are of the form:
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* @param backupId Required. The id of the new backup. The `backup_id` along with `parent` are
* combined as {parent}/backups/{backup_id} to create the full backup name, of the form:
Expand Down Expand Up @@ -4255,7 +4255,7 @@ public final OperationFuture<Backup, CopyBackupMetadata> copyBackupAsync(
* }</pre>
*
* @param parent Required. The name of the destination cluster that will contain the backup copy.
* The cluster must already exists. Values are of the form:
* The cluster must already exist. Values are of the form:
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* @param backupId Required. The id of the new backup. The `backup_id` along with `parent` are
* combined as {parent}/backups/{backup_id} to create the full backup name, of the form:
Expand Down Expand Up @@ -4312,7 +4312,7 @@ public final OperationFuture<Backup, CopyBackupMetadata> copyBackupAsync(
* }</pre>
*
* @param parent Required. The name of the destination cluster that will contain the backup copy.
* The cluster must already exists. Values are of the form:
* The cluster must already exist. Values are of the form:
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* @param backupId Required. The id of the new backup. The `backup_id` along with `parent` are
* combined as {parent}/backups/{backup_id} to create the full backup name, of the form:
Expand Down Expand Up @@ -4370,7 +4370,7 @@ public final OperationFuture<Backup, CopyBackupMetadata> copyBackupAsync(
* }</pre>
*
* @param parent Required. The name of the destination cluster that will contain the backup copy.
* The cluster must already exists. Values are of the form:
* The cluster must already exist. Values are of the form:
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* @param backupId Required. The id of the new backup. The `backup_id` along with `parent` are
* combined as {parent}/backups/{backup_id} to create the full backup name, of the form:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ObsoleteApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
Expand Down Expand Up @@ -467,6 +468,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild
}

/** Returns the default service endpoint. */
@ObsoleteApi("Use getEndpoint() instead")
public static String getDefaultEndpoint() {
return "bigtableadmin.googleapis.com:443";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ObsoleteApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
Expand Down Expand Up @@ -683,6 +684,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild
}

/** Returns the default service endpoint. */
@ObsoleteApi("Use getEndpoint() instead")
public static String getDefaultEndpoint() {
return "bigtableadmin.googleapis.com:443";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.google.api.core.ApiFunction;
import com.google.api.core.InternalApi;
import com.google.api.core.ObsoleteApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
Expand Down Expand Up @@ -180,6 +181,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild
}

/** Returns the default service endpoint. */
@ObsoleteApi("Use getEndpoint() instead")
public static String getDefaultEndpoint() {
return "bigtable.googleapis.com:443";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,15 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.bigtable.admin.v2.Backup$BackupType",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.bigtable.admin.v2.Backup$Builder",
"queryAllDeclaredConstructors": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2096,6 +2096,7 @@ public void createBackupTest() throws Exception {
.setEndTime(Timestamp.newBuilder().build())
.setSizeBytes(-1796325715)
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setHotToStandardTime(Timestamp.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -2155,6 +2156,7 @@ public void createBackupTest2() throws Exception {
.setEndTime(Timestamp.newBuilder().build())
.setSizeBytes(-1796325715)
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setHotToStandardTime(Timestamp.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -2214,6 +2216,7 @@ public void getBackupTest() throws Exception {
.setEndTime(Timestamp.newBuilder().build())
.setSizeBytes(-1796325715)
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setHotToStandardTime(Timestamp.newBuilder().build())
.build();
mockBigtableTableAdmin.addResponse(expectedResponse);

Expand Down Expand Up @@ -2259,6 +2262,7 @@ public void getBackupTest2() throws Exception {
.setEndTime(Timestamp.newBuilder().build())
.setSizeBytes(-1796325715)
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setHotToStandardTime(Timestamp.newBuilder().build())
.build();
mockBigtableTableAdmin.addResponse(expectedResponse);

Expand Down Expand Up @@ -2304,6 +2308,7 @@ public void updateBackupTest() throws Exception {
.setEndTime(Timestamp.newBuilder().build())
.setSizeBytes(-1796325715)
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setHotToStandardTime(Timestamp.newBuilder().build())
.build();
mockBigtableTableAdmin.addResponse(expectedResponse);

Expand Down Expand Up @@ -2569,6 +2574,7 @@ public void copyBackupTest() throws Exception {
.setEndTime(Timestamp.newBuilder().build())
.setSizeBytes(-1796325715)
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setHotToStandardTime(Timestamp.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -2632,6 +2638,7 @@ public void copyBackupTest2() throws Exception {
.setEndTime(Timestamp.newBuilder().build())
.setSizeBytes(-1796325715)
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setHotToStandardTime(Timestamp.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -2695,6 +2702,7 @@ public void copyBackupTest3() throws Exception {
.setEndTime(Timestamp.newBuilder().build())
.setSizeBytes(-1796325715)
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setHotToStandardTime(Timestamp.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -2758,6 +2766,7 @@ public void copyBackupTest4() throws Exception {
.setEndTime(Timestamp.newBuilder().build())
.setSizeBytes(-1796325715)
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setHotToStandardTime(Timestamp.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,7 @@ default void listBackups(
* returned table [long-running operation][google.longrunning.Operation] can
* be used to track the progress of the operation, and to cancel it. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
* </pre>
Expand Down Expand Up @@ -2402,7 +2402,7 @@ public void listBackups(
* returned table [long-running operation][google.longrunning.Operation] can
* be used to track the progress of the operation, and to cancel it. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
* </pre>
Expand Down Expand Up @@ -2887,7 +2887,7 @@ public com.google.bigtable.admin.v2.ListBackupsResponse listBackups(
* returned table [long-running operation][google.longrunning.Operation] can
* be used to track the progress of the operation, and to cancel it. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
* </pre>
Expand Down Expand Up @@ -3364,7 +3364,7 @@ protected BigtableTableAdminFutureStub build(
* returned table [long-running operation][google.longrunning.Operation] can
* be used to track the progress of the operation, and to cancel it. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
* </pre>
Expand Down
Loading
Loading