Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 2ffad8d

Browse files
committed
misc: Address review comments
Change-Id: I7fa8e047bc3485509742545f88143782476b2f02
1 parent 7ac6ce2 commit 2ffad8d

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

samples/install-without-bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<dependency>
3030
<groupId>com.google.cloud</groupId>
3131
<artifactId>google-cloud-bigtable</artifactId>
32-
<version>2.62.0</version>
32+
<version>2.67.0</version>
3333
</dependency>
3434
<!-- [END bigtable_install_without_bom] -->
3535

samples/snippets/src/main/java/com/example/bigtable/SchemaBundleExample.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,26 @@
3232
import java.util.ArrayList;
3333
import java.util.List;
3434

35+
/**
36+
* This example demonstrates the usage of BigtableTableAdminClient to create, configure and delete a
37+
* Cloud Bigtable schema bundle.
38+
*
39+
* <p>The example follows these steps:
40+
*
41+
* <ol>
42+
* <li>Creates a Bigtable table.
43+
* <li>Creates a schema bundle.
44+
* <li>Updates a schema bundle.
45+
* <li>Gets the schema bundle.
46+
* <li>Lists all schema bundles for the table.
47+
* <li>Deletes the schema bundle.
48+
* <li>Deletes the table.
49+
* </ol>
50+
*/
3551
public class SchemaBundleExample {
3652

3753
private static final String COLUMN_FAMILY = "cf";
54+
private static final String PROTO_FILE_PATH = "descriptors.pb";
3855
private final String tableId;
3956
private final String schemaBundleId;
4057
private final BigtableTableAdminClient adminClient;
@@ -115,7 +132,7 @@ public void createSchemaBundle() {
115132
System.out.printf("%nCreating schema bundle %s in table %s%n", schemaBundleId, tableId);
116133
// [START bigtable_create_schema_bundle]
117134
try {
118-
InputStream in = getClass().getClassLoader().getResourceAsStream("descriptors.pb");
135+
InputStream in = getClass().getClassLoader().getResourceAsStream(PROTO_FILE_PATH);
119136
CreateSchemaBundleRequest request =
120137
CreateSchemaBundleRequest.of(tableId, schemaBundleId)
121138
.setProtoSchema(ByteString.readFrom(in));
@@ -136,7 +153,7 @@ public void updateSchemaBundle() {
136153
System.out.printf("%nUpdating schema bundle %s in table %s%n", schemaBundleId, tableId);
137154
// [START bigtable_update_schema_bundle]
138155
try {
139-
InputStream in = getClass().getClassLoader().getResourceAsStream("descriptors.pb");
156+
InputStream in = getClass().getClassLoader().getResourceAsStream(PROTO_FILE_PATH);
140157
UpdateSchemaBundleRequest request =
141158
UpdateSchemaBundleRequest.of(tableId, schemaBundleId)
142159
.setProtoSchema(ByteString.readFrom(in));

0 commit comments

Comments
 (0)