From 7c5a68b8e1ccffb16eb7180165e9975861daa0cd Mon Sep 17 00:00:00 2001 From: Derrick Williams Date: Mon, 21 Sep 2026 18:32:16 +0000 Subject: [PATCH 1/6] update BigTable to Bigtable --- .../beam_StressTests_Java_BigTableIO.yml | 4 +- .test-infra/tools/refresh_looker_metrics.py | 4 +- .../datatokenization/DataTokenization.java | 20 +++++----- .../complete/datatokenization/README.md | 14 +++---- .../options/DataTokenizationOptions.java | 4 +- .../transforms/io/TokenizationBigQueryIO.java | 2 +- ...bleIO.java => TokenizationBigtableIO.java} | 40 +++++++++++-------- it/build.gradle | 4 ++ it/google-cloud-platform/build.gradle | 15 +++++-- .../{BigTableIOLT.java => BigtableIOLT.java} | 10 ++--- .../{BigTableIOST.java => BigtableIOST.java} | 6 +-- .../code-generation/java/04_io_bigtable.md | 4 +- .../beam/checkstyle/suppressions.xml | 2 +- .../sdk/io/gcp/bigtable/BigtableConfig.java | 4 +- .../beam/sdk/io/gcp/bigtable/BigtableIO.java | 2 +- .../sdk/io/gcp/bigtable/BigtableIOTest.java | 4 +- .../testing/analyzers/io_tests_config.yaml | 4 +- .../content/en/documentation/io/connectors.md | 2 +- .../en/documentation/io/developing-io-java.md | 2 +- .../en/documentation/io/io-standards.md | 4 +- .../www/site/content/en/performance/_index.md | 2 +- .../content/en/performance/bigtable/_index.md | 18 ++++----- website/www/site/data/performance.yaml | 4 +- website/www/site/i18n/navbar/en.yaml | 2 +- 24 files changed, 99 insertions(+), 78 deletions(-) rename examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/{TokenizationBigTableIO.java => TokenizationBigtableIO.java} (83%) rename it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/{BigTableIOLT.java => BigtableIOLT.java} (97%) rename it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/{BigTableIOST.java => BigtableIOST.java} (98%) diff --git a/.github/workflows/beam_StressTests_Java_BigTableIO.yml b/.github/workflows/beam_StressTests_Java_BigTableIO.yml index 1ddb10e84439..bc552da200b1 100644 --- a/.github/workflows/beam_StressTests_Java_BigTableIO.yml +++ b/.github/workflows/beam_StressTests_Java_BigTableIO.yml @@ -73,7 +73,7 @@ jobs: github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }}) - name: Setup environment uses: ./.github/actions/setup-environment-action - - name: run BigTable StressTest Large + - name: run Bigtable StressTest Large uses: ./.github/actions/gradle-command-self-hosted-action with: - gradle-command: :it:google-cloud-platform:BigTableStressTestLarge --info -DinfluxHost="http://10.128.0.96:8086" -DinfluxDatabase="beam_test_metrics" -DinfluxMeasurement="java_stress_test_bigtable" + gradle-command: :it:google-cloud-platform:BigtableStressTestLarge --info -DinfluxHost="http://10.128.0.96:8086" -DinfluxDatabase="beam_test_metrics" -DinfluxMeasurement="java_stress_test_bigtable" diff --git a/.test-infra/tools/refresh_looker_metrics.py b/.test-infra/tools/refresh_looker_metrics.py index b0800905e140..58b3f4458542 100644 --- a/.test-infra/tools/refresh_looker_metrics.py +++ b/.test-infra/tools/refresh_looker_metrics.py @@ -30,8 +30,8 @@ LOOKS_TO_DOWNLOAD = [ ("30", ["18", "50", "92", "49", "91"]), # BigQueryIO_Read ("31", ["19", "52", "88", "51", "87"]), # BigQueryIO_Write - ("32", ["20", "60", "104", "59", "103"]), # BigTableIO_Read - ("33", ["21", "70", "116", "69", "115"]), # BigTableIO_Write + ("32", ["20", "60", "104", "59", "103"]), # BigtableIO_Read + ("33", ["21", "70", "116", "69", "115"]), # BigtableIO_Write ("34", ["22", "56", "96", "55", "95"]), # TextIO_Read ("35", ["23", "64", "110", "63", "109"]), # TextIO_Write ("113", ["386", "388", "390", "392", "394"]), # IcebergIO_Read diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/DataTokenization.java b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/DataTokenization.java index b27479e7fc9b..f988495998c8 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/DataTokenization.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/DataTokenization.java @@ -28,7 +28,7 @@ import org.apache.beam.examples.complete.datatokenization.transforms.JsonToBeamRow; import org.apache.beam.examples.complete.datatokenization.transforms.SerializableFunctions; import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationBigQueryIO; -import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationBigTableIO; +import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationBigtableIO; import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationFileSystemIO; import org.apache.beam.examples.complete.datatokenization.utils.ErrorConverters; import org.apache.beam.examples.complete.datatokenization.utils.FailsafeElement; @@ -78,7 +78,7 @@ * *
  • A configured tokenization server * @@ -138,13 +138,13 @@ * - bigQueryTableName: Cloud BigQuery table name to write into * - tempLocation: Folder in a Google Cloud Storage bucket, which is needed for * BigQuery to handle data writing - * - Cloud BigTable - * - bigTableProjectId: Id of the project where the Cloud BigTable instance to write into + * - Cloud Bigtable + * - bigTableProjectId: Id of the project where the Cloud Bigtable instance to write into * is located - * - bigTableInstanceId: Id of the Cloud BigTable instance to write into - * - bigTableTableId: Id of the Cloud BigTable table to write into - * - bigTableKeyColumnName: Column name to use as a key in Cloud BigTable - * - bigTableColumnFamilyName: Column family name to use in Cloud BigTable + * - bigTableInstanceId: Id of the Cloud Bigtable instance to write into + * - bigTableTableId: Id of the Cloud Bigtable table to write into + * - bigTableKeyColumnName: Column name to use as a key in Cloud Bigtable + * - bigTableColumnFamilyName: Column family name to use in Cloud Bigtable * - RPC server parameters * - rpcUri: URI for the API calls to RPC server * - batchSize: Size of the batch to send to RPC server per request @@ -331,11 +331,11 @@ public static PipelineResult run(DataTokenizationOptions options) { .setErrorRecordsTableSchema(DEADLETTER_SCHEMA) .build()); } else if (options.getBigTableInstanceId() != null) { - new TokenizationBigTableIO(options) + new TokenizationBigtableIO(options) .write(tokenizedRows.get(TOKENIZATION_OUT), schema.getBeamSchema()); } else { throw new IllegalStateException( - "No sink is provided, please configure BigQuery or BigTable."); + "No sink is provided, please configure BigQuery or Bigtable."); } return pipeline.run(); diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/README.md b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/README.md index 800838195b0c..741f5f601a60 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/README.md +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/README.md @@ -36,7 +36,7 @@ Supported destination sinks: - File system - [Google Cloud BigQuery](https://cloud.google.com/bigquery) -- [Cloud BigTable](https://cloud.google.com/bigtable) +- [Cloud Bigtable](https://cloud.google.com/bigtable) Supported data schema format: @@ -122,13 +122,13 @@ To execute this pipeline, specify the parameters: - **bigQueryTableName**: Cloud BigQuery table name to write into - **tempLocation**: Folder in a Google Cloud Storage bucket, which is needed for BigQuery to handle data writing - - Cloud BigTable - - **bigTableProjectId**: Id of the project where the Cloud BigTable instance to write into + - Cloud Bigtable + - **bigTableProjectId**: Id of the project where the Cloud Bigtable instance to write into is located - - **bigTableInstanceId**: Id of the Cloud BigTable instance to write into - - **bigTableTableId**: Id of the Cloud BigTable table to write into - - **bigTableKeyColumnName**: Column name to use as a key in Cloud BigTable - - **bigTableColumnFamilyName**: Column family name to use in Cloud BigTable + - **bigTableInstanceId**: Id of the Cloud Bigtable instance to write into + - **bigTableTableId**: Id of the Cloud Bigtable table to write into + - **bigTableKeyColumnName**: Column name to use as a key in Cloud Bigtable + - **bigTableColumnFamilyName**: Column family name to use in Cloud Bigtable - RPC server parameters - **rpcUri**: URI for the API calls to RPC server - **batchSize**: Size of the batch to send to RPC server per request diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/options/DataTokenizationOptions.java b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/options/DataTokenizationOptions.java index c68a5378e487..1d52ff780222 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/options/DataTokenizationOptions.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/options/DataTokenizationOptions.java @@ -17,7 +17,7 @@ */ package org.apache.beam.examples.complete.datatokenization.options; -import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationBigTableIO; +import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationBigtableIO; import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationFileSystemIO.FileSystemPipelineOptions; import org.apache.beam.sdk.options.Default; import org.apache.beam.sdk.options.Description; @@ -28,7 +28,7 @@ * executor at the command-line. */ public interface DataTokenizationOptions - extends PipelineOptions, FileSystemPipelineOptions, TokenizationBigTableIO.BigTableOptions { + extends PipelineOptions, FileSystemPipelineOptions, TokenizationBigtableIO.BigtableOptions { @Description("Path to data schema (JSON format) compatible with BigQuery.") String getDataSchemaPath(); diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigQueryIO.java b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigQueryIO.java index 667e26fa9c2d..8ba4e4a9909c 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigQueryIO.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigQueryIO.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** The {@link TokenizationBigQueryIO} class for writing data from template to BigTable. */ +/** The {@link TokenizationBigQueryIO} class for writing data from template to BigQuery. */ public class TokenizationBigQueryIO { /** Logger for class. */ diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigTableIO.java b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigtableIO.java similarity index 83% rename from examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigTableIO.java rename to examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigtableIO.java index 435620a4b011..d1a6759d7acc 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigTableIO.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigtableIO.java @@ -40,23 +40,23 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** The {@link TokenizationBigTableIO} class for writing data from template to BigTable. */ -public class TokenizationBigTableIO { +/** The {@link TokenizationBigtableIO} class for writing data from template to Bigtable. */ +public class TokenizationBigtableIO { /** Logger for class. */ - private static final Logger LOG = LoggerFactory.getLogger(TokenizationBigTableIO.class); + private static final Logger LOG = LoggerFactory.getLogger(TokenizationBigtableIO.class); private final DataTokenizationOptions options; - public TokenizationBigTableIO(DataTokenizationOptions options) { + public TokenizationBigtableIO(DataTokenizationOptions options) { this.options = options; } public PDone write(PCollection input, Schema schema) { return input - .apply("ConvertToBigTableFormat", ParDo.of(new TransformToBigTableFormat(schema))) + .apply("ConvertToBigtableFormat", ParDo.of(new TransformToBigtableFormat(schema))) .apply( - "WriteToBigTable", + "WriteToBigtable", BigtableIO.write() .withProjectId(options.getBigTableProjectId()) .withInstanceId(options.getBigTableInstanceId()) @@ -65,11 +65,11 @@ public PDone write(PCollection input, Schema schema) { .apply("LogRowCount", new LogSuccessfulRows()); } - static class TransformToBigTableFormat extends DoFn>> { + static class TransformToBigtableFormat extends DoFn>> { private final Schema schema; - TransformToBigTableFormat(Schema schema) { + TransformToBigtableFormat(Schema schema) { this.schema = schema; } @@ -101,7 +101,7 @@ public void processElement( .build()) .build()) .collect(Collectors.toSet()); - // Converting key value to BigTable format + // Converting key value to Bigtable format String columnName = in.getString(options.getBigTableKeyColumnName()); if (columnName != null) { ByteString key = ByteString.copyFrom(columnName, StandardCharsets.UTF_8); @@ -128,33 +128,41 @@ public void processElement(@Element BigtableWriteResult in) { /** * Necessary {@link PipelineOptions} options for Pipelines that perform write operations to - * BigTable. + * Bigtable. */ - public interface BigTableOptions extends PipelineOptions { + public interface BigtableOptions extends PipelineOptions { - @Description("Id of the project where the Cloud BigTable instance to write into is located.") + @Description("Id of the project where the Cloud Bigtable instance to write into is located.") String getBigTableProjectId(); void setBigTableProjectId(String bigTableProjectId); - @Description("Id of the Cloud BigTable instance to write into.") + @Description("Id of the Cloud Bigtable instance to write into.") String getBigTableInstanceId(); void setBigTableInstanceId(String bigTableInstanceId); - @Description("Id of the Cloud BigTable table to write into.") + @Description("Id of the Cloud Bigtable table to write into.") String getBigTableTableId(); void setBigTableTableId(String bigTableTableId); - @Description("Column name to use as a key in Cloud BigTable.") + @Description("Column name to use as a key in Cloud Bigtable.") String getBigTableKeyColumnName(); void setBigTableKeyColumnName(String bigTableKeyColumnName); - @Description("Column family name to use in Cloud BigTable.") + @Description("Column family name to use in Cloud Bigtable.") String getBigTableColumnFamilyName(); void setBigTableColumnFamilyName(String bigTableColumnFamilyName); } + + /** + * Backward-compatible alias for {@link BigtableOptions}. + * + * @deprecated Use {@link BigtableOptions} instead. + */ + @Deprecated + public interface BigTableOptions extends BigtableOptions {} } diff --git a/it/build.gradle b/it/build.gradle index ad6ba19f383d..ba12f31d9cfc 100644 --- a/it/build.gradle +++ b/it/build.gradle @@ -28,6 +28,10 @@ tasks.register('GCSPerformanceTest') { dependsOn(":it:google-cloud-platform:GCSPerformanceTest") } +tasks.register('BigtablePerformanceTest') { + dependsOn(":it:google-cloud-platform:BigtablePerformanceTest") +} + tasks.register('BigTablePerformanceTest') { dependsOn(":it:google-cloud-platform:BigTablePerformanceTest") } diff --git a/it/google-cloud-platform/build.gradle b/it/google-cloud-platform/build.gradle index 164a75c06ba0..2ba9fe066503 100644 --- a/it/google-cloud-platform/build.gradle +++ b/it/google-cloud-platform/build.gradle @@ -84,10 +84,13 @@ tasks.register( + System.properties ) tasks.register( - "BigTablePerformanceTest", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigTableIOLT', + "BigtablePerformanceTest", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOLT', ['configuration':'large', 'project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] + System.properties ) +tasks.register("BigTablePerformanceTest") { + dependsOn("BigtablePerformanceTest") +} tasks.register( "BigQueryPerformanceTest", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigQueryIOLT', ['configuration':'medium', 'project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] @@ -124,15 +127,21 @@ tasks.register( + System.properties ) tasks.register( - "BigTableStressTestMedium", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigTableIOST', + "BigtableStressTestMedium", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOST', ['configuration':'medium','project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] + System.properties ) +tasks.register("BigTableStressTestMedium") { + dependsOn("BigtableStressTestMedium") +} tasks.register( - "BigTableStressTestLarge", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigTableIOST', + "BigtableStressTestLarge", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOST', ['configuration':'large','project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] + System.properties ) +tasks.register("BigTableStressTestLarge") { + dependsOn("BigtableStressTestLarge") +} tasks.register( "SpannerStressTestMedium", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'SpannerIOST', ['configuration':'medium','project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] diff --git a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOLT.java b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOLT.java similarity index 97% rename from it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOLT.java rename to it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOLT.java index 27773121e79d..eb35536b16ae 100644 --- a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOLT.java +++ b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOLT.java @@ -53,17 +53,17 @@ import org.junit.Test; /** - * BigTableIO performance tests. + * BigtableIO performance tests. * *

    Example trigger command for all tests: "mvn test -pl it/google-cloud-platform -am - * -Dtest=BigTableIOLT \ -Dproject=[gcpProject] -DartifactBucket=[temp bucket] + * -Dtest=BigtableIOLT \ -Dproject=[gcpProject] -DartifactBucket=[temp bucket] * -DfailIfNoTests=false". * *

    Example trigger command for specific test: "mvn test -pl it/google-cloud-platform -am \ - * -Dtest="BigTableIOLT#testBigtableWriteAndRead" -Dconfiguration=local -Dproject=[gcpProject] \ + * -Dtest="BigtableIOLT#testBigtableWriteAndRead" -Dconfiguration=local -Dproject=[gcpProject] \ * -DartifactBucket=[temp bucket] -DfailIfNoTests=false". */ -public class BigTableIOLT extends IOLoadTestBase { +public class BigtableIOLT extends IOLoadTestBase { private static final String COLUMN_FAMILY_NAME = "cf"; private static final long TABLE_MAX_AGE_MINUTES = 100L; @@ -224,7 +224,7 @@ abstract static class Configuration { abstract int getValueSizeBytes(); static Configuration of(long numRows, int pipelineTimeout, String runner, int valueSizeBytes) { - return new AutoValue_BigTableIOLT_Configuration.Builder() + return new AutoValue_BigtableIOLT_Configuration.Builder() .setNumRows(numRows) .setPipelineTimeout(pipelineTimeout) .setRunner(runner) diff --git a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOST.java b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java similarity index 98% rename from it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOST.java rename to it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java index b86f13a0de10..dc9c420b2adc 100644 --- a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOST.java +++ b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java @@ -62,7 +62,7 @@ import org.junit.Test; /** - * BigTableIO stress test. The test is designed to assess the performance of BigTableIO under + * BigtableIO stress test. The test is designed to assess the performance of BigtableIO under * various conditions. * *

    Usage:
    @@ -70,7 +70,7 @@ * :it:google-cloud-platform:BigTableStressTestMedium} - To run large-scale stress tests: {@code * gradle :it:google-cloud-platform:BigTableStressTestLarge} */ -public final class BigTableIOST extends IOStressTestBase { +public final class BigtableIOST extends IOStressTestBase { private static final String WRITE_ELEMENT_METRIC_NAME = "write_count"; private static final String READ_ELEMENT_METRIC_NAME = "read_count"; @@ -338,7 +338,7 @@ static class Configuration extends SyntheticSourceOptions { @JsonProperty public boolean exportMetricsToInfluxDB = true; /** InfluxDB measurement to publish results to. * */ - @JsonProperty public String influxMeasurement = BigTableIOST.class.getName(); + @JsonProperty public String influxMeasurement = BigtableIOST.class.getName(); /** InfluxDB host to publish metrics. * */ @JsonProperty public String influxHost; diff --git a/learning/prompts/code-generation/java/04_io_bigtable.md b/learning/prompts/code-generation/java/04_io_bigtable.md index 6b126947e042..164971d1b139 100644 --- a/learning/prompts/code-generation/java/04_io_bigtable.md +++ b/learning/prompts/code-generation/java/04_io_bigtable.md @@ -2,9 +2,9 @@ Prompt: Write a sample Java code snippet that writes data to a Google Bigtable table using Apache Beam. Response: -Your Apache Beam pipeline can write data to a Bigtable table using the Apache Beam BigTableIO connector. +Your Apache Beam pipeline can write data to a Bigtable table using the Apache Beam BigtableIO connector. -Here is an example of how to use the BigTableIO connector to accomplish this: +Here is an example of how to use the BigtableIO connector to accomplish this: ```java package bigtable; diff --git a/sdks/java/build-tools/src/main/resources/beam/checkstyle/suppressions.xml b/sdks/java/build-tools/src/main/resources/beam/checkstyle/suppressions.xml index 833fd30cf218..96ec13ab4822 100644 --- a/sdks/java/build-tools/src/main/resources/beam/checkstyle/suppressions.xml +++ b/sdks/java/build-tools/src/main/resources/beam/checkstyle/suppressions.xml @@ -71,7 +71,7 @@ - + diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableConfig.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableConfig.java index a69b4dbfc694..6a35ae1507c9 100644 --- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableConfig.java +++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableConfig.java @@ -128,12 +128,12 @@ abstract Builder setBigtableOptionsConfigurator( } public BigtableConfig withProjectId(ValueProvider projectId) { - checkArgument(projectId != null, "Project Id of BigTable can not be null"); + checkArgument(projectId != null, "Project Id of Bigtable can not be null"); return toBuilder().setProjectId(projectId).build(); } public BigtableConfig withInstanceId(ValueProvider instanceId) { - checkArgument(instanceId != null, "Instance Id of BigTable can not be null"); + checkArgument(instanceId != null, "Instance Id of Bigtable can not be null"); return toBuilder().setInstanceId(instanceId).build(); } diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java index 02236469e325..6ca2e1ed33bb 100644 --- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java +++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java @@ -112,7 +112,7 @@ /** * {@link PTransform Transforms} for reading from and writing to Google Cloud Bigtable. * - *

    Please note the Cloud BigTable HBase connector available Please note the Cloud Bigtable HBase connector available here. * We recommend using that connector over this one if HBase API works for your diff --git a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIOTest.java b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIOTest.java index 8d9a0f1bcfa5..076b717be63c 100644 --- a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIOTest.java +++ b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIOTest.java @@ -1641,7 +1641,7 @@ public void testGetSplitPointsConsumed() throws Exception { } @Test - public void testReadWithBigTableOptionsSetsRetryOptions() { + public void testReadWithBigtableOptionsSetsRetryOptions() { final int initialBackoffMillis = -1; BigtableOptions.Builder optionsBuilder = BIGTABLE_OPTIONS.toBuilder(); @@ -1660,7 +1660,7 @@ public void testReadWithBigTableOptionsSetsRetryOptions() { } @Test - public void testWriteWithBigTableOptionsSetsBulkOptionsAndRetryOptions() { + public void testWriteWithBigtableOptionsSetsBulkOptionsAndRetryOptions() { final int maxInflightRpcs = 1; final int initialBackoffMillis = -1; diff --git a/sdks/python/apache_beam/testing/analyzers/io_tests_config.yaml b/sdks/python/apache_beam/testing/analyzers/io_tests_config.yaml index 2a33ae31797d..633737811fc4 100644 --- a/sdks/python/apache_beam/testing/analyzers/io_tests_config.yaml +++ b/sdks/python/apache_beam/testing/analyzers/io_tests_config.yaml @@ -185,7 +185,7 @@ bigquery_io_json_file_loads_write: bigtable_io_read: test_description: | - BigTableIO read test 100 GB. + BigtableIO read test 100 GB. project: apache-beam-testing metrics_dataset: performance_tests metrics_table: io_performance_metrics @@ -197,7 +197,7 @@ bigtable_io_read: bigtable_io_write: test_description: | - BigTableIO write test 100 GB. + BigtableIO write test 100 GB. project: apache-beam-testing metrics_dataset: performance_tests metrics_table: io_performance_metrics diff --git a/website/www/site/content/en/documentation/io/connectors.md b/website/www/site/content/en/documentation/io/connectors.md index f3078c6b378a..235c72dda726 100644 --- a/website/www/site/content/en/documentation/io/connectors.md +++ b/website/www/site/content/en/documentation/io/connectors.md @@ -652,7 +652,7 @@ This table provides a consolidated, at-a-glance overview of the available built- ✔ - BigTableIO (metrics) + BigtableIO (metrics) ✔ ✔ diff --git a/website/www/site/content/en/documentation/io/developing-io-java.md b/website/www/site/content/en/documentation/io/developing-io-java.md index 0d792149bfff..d52968a350a4 100644 --- a/website/www/site/content/en/documentation/io/developing-io-java.md +++ b/website/www/site/content/en/documentation/io/developing-io-java.md @@ -147,7 +147,7 @@ abstract methods: `BoundedSource`. You can see a model of how to implement `BoundedSource` and the required -abstract methods in Beam’s implementations for Cloud BigTable +abstract methods in Beam’s implementations for Cloud Bigtable ([BigtableIO.java](https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java)) and BigQuery ([BigQuerySourceBase.java](https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySourceBase.java)). diff --git a/website/www/site/content/en/documentation/io/io-standards.md b/website/www/site/content/en/documentation/io/io-standards.md index 94aa48323fd1..1f1ee505b0b4 100644 --- a/website/www/site/content/en/documentation/io/io-standards.md +++ b/website/www/site/content/en/documentation/io/io-standards.md @@ -1180,7 +1180,7 @@ When possible, unit tests are favored over integration tests due to faster execu

    For every option available to users. For example, writing to dynamic destinations. -

    BigTableIOTest.testReadWithBigTableOptionsSetsRetryOptions +

    BigtableIOTest.testReadWithBigtableOptionsSetsRetryOptions

    BigQueryIOWriteTest.testWriteDynamicDestinations @@ -1238,7 +1238,7 @@ When possible, unit tests are favored over integration tests due to faster execu

    There can be many variations of these tests. Please refer to examples for details. -

    BigTableIOTest.testReadingSplitAtFractionExhaustive +

    BigtableIOTest.testReadingSplitAtFractionExhaustive

    avroio_test.AvroBase.test_dynamic_work_rebalancing_exhaustive diff --git a/website/www/site/content/en/performance/_index.md b/website/www/site/content/en/performance/_index.md index 08fd368809c8..c19cf55dbfe4 100644 --- a/website/www/site/content/en/performance/_index.md +++ b/website/www/site/content/en/performance/_index.md @@ -36,7 +36,7 @@ See the following pages for performance measures recorded when reading from and writing to various Beam IOs. - [BigQuery](/performance/bigquery) -- [BigTable](/performance/bigtable) +- [Bigtable](/performance/bigtable) - [TextIO](/performance/textio) - [IcebergIO](/performance/icebergio) diff --git a/website/www/site/content/en/performance/bigtable/_index.md b/website/www/site/content/en/performance/bigtable/_index.md index 413cd5393eaa..567377d38c42 100644 --- a/website/www/site/content/en/performance/bigtable/_index.md +++ b/website/www/site/content/en/performance/bigtable/_index.md @@ -1,5 +1,5 @@ --- -title: "BigTable Performance" +title: "Bigtable Performance" --- -# BigTable Performance +# Bigtable Performance The following graphs show various metrics when reading from and writing to -BigTable. See the [glossary](/performance/glossary) for definitions. +Bigtable. See the [glossary](/performance/glossary) for definitions. ## Read -### What is the estimated cost to read from BigTable? +### What is the estimated cost to read from Bigtable? {{< performance_looks io="bigtable" read_or_write="read" section="test_name" >}} -### How has various metrics changed when reading from BigTable for different Beam SDK versions? +### How has various metrics changed when reading from Bigtable for different Beam SDK versions? {{< performance_looks io="bigtable" read_or_write="read" section="version" >}} -### How has various metrics changed over time when reading from BigTable? +### How has various metrics changed over time when reading from Bigtable? {{< performance_looks io="bigtable" read_or_write="read" section="date" >}} ## Write -### What is the estimated cost to write to BigTable? +### What is the estimated cost to write to Bigtable? {{< performance_looks io="bigtable" read_or_write="write" section="test_name" >}} -### How has various metrics changed when writing to BigTable for different Beam SDK versions? +### How has various metrics changed when writing to Bigtable for different Beam SDK versions? {{< performance_looks io="bigtable" read_or_write="write" section="version" >}} -### How has various metrics changed over time when writing to BigTable? +### How has various metrics changed over time when writing to Bigtable? {{< performance_looks io="bigtable" read_or_write="write" section="date" >}} diff --git a/website/www/site/data/performance.yaml b/website/www/site/data/performance.yaml index 03eaad774b0b..9a8e7c8bd8fd 100644 --- a/website/www/site/data/performance.yaml +++ b/website/www/site/data/performance.yaml @@ -50,7 +50,7 @@ looks: folder: 32 test_name: - id: YQ2W3wdNnBXMgDgpzCRbmQWMHjyPvZny - title: Read BigTable RunTime and EstimatedCost + title: Read Bigtable RunTime and EstimatedCost date: - id: szvwNfPrwTtmRmMHWv3QFh6wTKxm26TF title: AvgOutputThroughputBytesPerSec by Date @@ -65,7 +65,7 @@ looks: folder: 33 test_name: - id: 2sC27RQwWy2MP9DXVHjbvTYSNFYpFvxj - title: Write BigTable RunTime and EstimatedCost + title: Write Bigtable RunTime and EstimatedCost date: - id: X22sDqD8krBQQ4mRXTFMmpKFvgkZ529g title: AvgInputThroughputBytesPerSec by Date diff --git a/website/www/site/i18n/navbar/en.yaml b/website/www/site/i18n/navbar/en.yaml index aeb1988183b0..db658c710327 100644 --- a/website/www/site/i18n/navbar/en.yaml +++ b/website/www/site/i18n/navbar/en.yaml @@ -53,7 +53,7 @@ - id: nav-performance-bigquery translation: "BigQuery" - id: nav-performance-bigtable - translation: "BigTable" + translation: "Bigtable" - id: nav-performance-textio translation: "TextIO" - id: nav-performance-glossary From 88398a8f7c542cb9fd234fe35f0b6d25e4a983a9 Mon Sep 17 00:00:00 2001 From: Derrick Williams Date: Mon, 21 Sep 2026 19:55:31 +0000 Subject: [PATCH 2/6] more changes that were missed --- .../beam/it/gcp/bigtable/BigtableIOLT.java | 14 ++--- .../beam/it/gcp/bigtable/BigtableIOST.java | 24 ++++---- .../prompts/code-generation/04_io_bigtable.md | 2 +- .../beam/sdk/io/range/RangeTracker.java | 2 +- .../bigtable/BigtableTableProvider.java | 2 +- .../meta/provider/bigtable/package-info.java | 2 +- .../StorageApiWriteUnshardedRecords.java | 2 +- .../examples/cookbook/bigtableio_it_test.py | 4 +- .../transforms/elementwise/enrichment.py | 6 +- sdks/python/apache_beam/io/gcp/bigtableio.py | 27 +++++---- .../apache_beam/io/gcp/bigtableio_it_test.py | 6 +- .../apache_beam/io/gcp/bigtableio_test.py | 18 +++--- sdks/python/apache_beam/io/iobase.py | 2 +- sdks/python/apache_beam/io/requestresponse.py | 2 +- .../apache_beam/transforms/enrichment.py | 2 +- .../enrichment_handlers/bigtable.py | 31 +++++----- .../enrichment_handlers/bigtable_it_test.py | 58 +++++++++---------- .../enrichment_handlers/bigtable_test.py | 8 ++- .../vertex_ai_feature_store.py | 4 +- sdks/python/setup.py | 2 +- .../en/documentation/io/io-standards.md | 2 +- .../python/elementwise/enrichment-bigtable.md | 6 +- 22 files changed, 120 insertions(+), 106 deletions(-) diff --git a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOLT.java b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOLT.java index eb35536b16ae..f2ecb7061b36 100644 --- a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOLT.java +++ b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOLT.java @@ -149,7 +149,7 @@ public void testBigtableWriteAndRead() throws IOException { MetricsConfiguration metricsConfig = MetricsConfiguration.builder() .setInputPCollection("Map records.out0") - .setInputPCollectionV2("Map records/ParMultiDo(MapToBigTableFormat).out0") + .setInputPCollectionV2("Map records/ParMultiDo(MapToBigtableFormat).out0") .setOutputPCollection("Counting element.out0") .setOutputPCollectionV2("Counting element/ParMultiDo(Counting).out0") .build(); @@ -171,8 +171,8 @@ private PipelineLauncher.LaunchInfo testWrite() throws IOException { writePipeline .apply(GenerateSequence.from(0).to(configuration.getNumRows())) - .apply("Map records", ParDo.of(new MapToBigTableFormat(configuration.getValueSizeBytes()))) - .apply("Write to BigTable", writeIO); + .apply("Map records", ParDo.of(new MapToBigtableFormat(configuration.getValueSizeBytes()))) + .apply("Write to Bigtable", writeIO); PipelineLauncher.LaunchConfig options = PipelineLauncher.LaunchConfig.builder("write-bigtable") @@ -196,7 +196,7 @@ private PipelineLauncher.LaunchInfo testRead() throws IOException { .withTableId(tableId); readPipeline - .apply("Read from BigTable", readIO) + .apply("Read from Bigtable", readIO) .apply("Counting element", ParDo.of(new CountingFn<>(READ_ELEMENT_METRIC_NAME))); PipelineLauncher.LaunchConfig options = @@ -248,13 +248,13 @@ abstract static class Builder { abstract Builder toBuilder(); } - /** Maps long number to the BigTable format record. */ - private static class MapToBigTableFormat extends DoFn>> + /** Maps long number to the Bigtable format record. */ + private static class MapToBigtableFormat extends DoFn>> implements Serializable { private final int valueSizeBytes; - public MapToBigTableFormat(int valueSizeBytes) { + public MapToBigtableFormat(int valueSizeBytes) { this.valueSizeBytes = valueSizeBytes; } diff --git a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java index dc9c420b2adc..227dac8eb0d9 100644 --- a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java +++ b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java @@ -67,8 +67,8 @@ * *

    Usage:
    * - To run medium-scale stress tests: {@code gradle - * :it:google-cloud-platform:BigTableStressTestMedium} - To run large-scale stress tests: {@code - * gradle :it:google-cloud-platform:BigTableStressTestLarge} + * :it:google-cloud-platform:BigtableStressTestMedium} - To run large-scale stress tests: {@code + * gradle :it:google-cloud-platform:BigtableStressTestLarge} */ public final class BigtableIOST extends IOStressTestBase { @@ -229,7 +229,7 @@ public void runTest() throws IOException, ParseException, InterruptedException { } /** - * The method creates a pipeline to simulate data generation and write operations to BigTable, + * The method creates a pipeline to simulate data generation and write operations to Bigtable, * based on the specified configuration parameters. The stress test involves varying the load * dynamically over time, with options to use configurable parameters. */ @@ -252,10 +252,10 @@ private PipelineLauncher.LaunchInfo generateDataAndWrite() throws IOException { } source .apply( - "Map records to BigTable format", - ParDo.of(new MapToBigTableFormat((int) configuration.valueSizeBytes))) + "Map records to Bigtable format", + ParDo.of(new MapToBigtableFormat((int) configuration.valueSizeBytes))) .apply( - "Write to BigTable", + "Write to Bigtable", BigtableIO.write() .withProjectId(project) .withInstanceId(resourceManager.getInstanceId()) @@ -278,7 +278,7 @@ private PipelineLauncher.LaunchInfo generateDataAndWrite() throws IOException { return pipelineLauncher.launch(project, region, options); } - /** The method reads data from BigTable in batch mode. */ + /** The method reads data from Bigtable in batch mode. */ private PipelineLauncher.LaunchInfo readData() throws IOException { BigtableIO.Read readIO = BigtableIO.read() @@ -288,7 +288,7 @@ private PipelineLauncher.LaunchInfo readData() throws IOException { .withTableId(tableId); readPipeline - .apply("Read from BigTable", readIO) + .apply("Read from Bigtable", readIO) .apply("Counting element", ParDo.of(new CountingFn<>(READ_ELEMENT_METRIC_NAME))); PipelineLauncher.LaunchConfig options = @@ -307,7 +307,7 @@ private PipelineLauncher.LaunchInfo readData() throws IOException { return pipelineLauncher.launch(project, region, options); } - /** Options for BigTableIO stress test. */ + /** Options for BigtableIO stress test. */ static class Configuration extends SyntheticSourceOptions { /** Pipeline timeout in minutes. Must be a positive value. */ @JsonProperty public int pipelineTimeout = 20; @@ -347,13 +347,13 @@ static class Configuration extends SyntheticSourceOptions { @JsonProperty public String influxDatabase; } - /** Maps Instant to the BigTable format record. */ - private static class MapToBigTableFormat + /** Maps Instant to the Bigtable format record. */ + private static class MapToBigtableFormat extends DoFn, KV>> implements Serializable { private final int valueSizeBytes; - public MapToBigTableFormat(int valueSizeBytes) { + public MapToBigtableFormat(int valueSizeBytes) { this.valueSizeBytes = valueSizeBytes; } diff --git a/learning/prompts/code-generation/04_io_bigtable.md b/learning/prompts/code-generation/04_io_bigtable.md index e4b09153a692..5f1e1ee01a6e 100644 --- a/learning/prompts/code-generation/04_io_bigtable.md +++ b/learning/prompts/code-generation/04_io_bigtable.md @@ -60,7 +60,7 @@ if __name__ == "__main__": ``` The `ReadFromBigtable` transform returns a `PCollection` of `PartialRowData` objects, each representing a Bigtable row. For more information about this row object, see [PartialRowData (row_key)](https://cloud.google.com/python/docs/reference/bigtable/latest/row#class-googlecloudbigtablerowpartialrowdatarowkey). -For more information, see the [BigTable I/O connector documentation](https://beam.apache.org/releases/pydoc/current/apache_beam.io.gcp.bigtableio.html). +For more information, see the [Bigtable I/O connector documentation](https://beam.apache.org/releases/pydoc/current/apache_beam.io.gcp.bigtableio.html). For samples that show common pipeline configurations, see [Pipeline option patterns](https://beam.apache.org/documentation/patterns/pipeline-options/). diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/range/RangeTracker.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/range/RangeTracker.java index 89185187a0f0..3832b83d316d 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/range/RangeTracker.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/range/RangeTracker.java @@ -76,7 +76,7 @@ * after A, up to but not including the first record starting at or after B". * *

    Some examples of such sources include reading lines or CSV from a text file, reading keys and - * values from a BigTable, etc. + * values from a Bigtable, etc. * *

    The concept of split points allows to extend the definitions for dealing with sources * where some records cannot be identified by a unique starting position. diff --git a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/bigtable/BigtableTableProvider.java b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/bigtable/BigtableTableProvider.java index 9e36cb1eb5e2..4f99cce339fe 100644 --- a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/bigtable/BigtableTableProvider.java +++ b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/bigtable/BigtableTableProvider.java @@ -27,7 +27,7 @@ /** * {@link TableProvider} for {@link BigtableTable}. * - *

    A sample of BigTable table is: + *

    A sample of Bigtable table is: * *

    {@code
      *   CREATE EXTERNAL TABLE beamTable(
    diff --git a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/bigtable/package-info.java b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/bigtable/package-info.java
    index 683d60ee90d2..e056524ac9a9 100644
    --- a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/bigtable/package-info.java
    +++ b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/bigtable/package-info.java
    @@ -16,5 +16,5 @@
      * limitations under the License.
      */
     
    -/** Table schema for BigTable. */
    +/** Table schema for Bigtable. */
     package org.apache.beam.sdk.extensions.sql.meta.provider.bigtable;
    diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java
    index 0f52900e9e0b..170de2ed2c5d 100644
    --- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java
    +++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java
    @@ -839,7 +839,7 @@ long flush(
                   }
                   if (schemaMismatchError) {
                     LOG.info(
    -                    "Vortex failed stream open due to incompatible fields. This is likely because the BigTable "
    +                    "Vortex failed stream open due to incompatible fields. This is likely because the Bigtable "
                             + "schema was recently updated and Vortex hasn't noticed yet, so retrying. error {}",
                         Preconditions.checkStateNotNull(error).toString());
                   }
    diff --git a/sdks/python/apache_beam/examples/cookbook/bigtableio_it_test.py b/sdks/python/apache_beam/examples/cookbook/bigtableio_it_test.py
    index 84087dee5607..195bc06326f9 100644
    --- a/sdks/python/apache_beam/examples/cookbook/bigtableio_it_test.py
    +++ b/sdks/python/apache_beam/examples/cookbook/bigtableio_it_test.py
    @@ -30,7 +30,7 @@
     import pytz
     
     import apache_beam as beam
    -from apache_beam.io.gcp.bigtableio import WriteToBigTable
    +from apache_beam.io.gcp.bigtableio import WriteToBigtable
     from apache_beam.metrics.metric import MetricsFilter
     from apache_beam.options.pipeline_options import PipelineOptions
     from apache_beam.runners.runner import PipelineState
    @@ -94,7 +94,7 @@ def expand(self, pvalue):
         return (
             pvalue
             | beam.Create(self._generate())
    -        | WriteToBigTable(
    +        | WriteToBigtable(
                 beam_options['project_id'],
                 beam_options['instance_id'],
                 beam_options['table_id']))
    diff --git a/sdks/python/apache_beam/examples/snippets/transforms/elementwise/enrichment.py b/sdks/python/apache_beam/examples/snippets/transforms/elementwise/enrichment.py
    index 12ec205d2e62..7e94847c8325 100644
    --- a/sdks/python/apache_beam/examples/snippets/transforms/elementwise/enrichment.py
    +++ b/sdks/python/apache_beam/examples/snippets/transforms/elementwise/enrichment.py
    @@ -24,7 +24,7 @@ def enrichment_with_bigtable():
       # [START enrichment_with_bigtable]
       import apache_beam as beam
       from apache_beam.transforms.enrichment import Enrichment
    -  from apache_beam.transforms.enrichment_handlers.bigtable import BigTableEnrichmentHandler
    +  from apache_beam.transforms.enrichment_handlers.bigtable import BigtableEnrichmentHandler
     
       project_id = 'apache-beam-testing'
       instance_id = 'beam-test'
    @@ -37,7 +37,7 @@ def enrichment_with_bigtable():
           beam.Row(sale_id=5, customer_id=5, product_id=4, quantity=2)
       ]
     
    -  bigtable_handler = BigTableEnrichmentHandler(
    +  bigtable_handler = BigtableEnrichmentHandler(
           project_id=project_id,
           instance_id=instance_id,
           table_id=table_id,
    @@ -46,7 +46,7 @@ def enrichment_with_bigtable():
         _ = (
             p
             | "Create" >> beam.Create(data)
    -        | "Enrich W/ BigTable" >> Enrichment(bigtable_handler)
    +        | "Enrich W/ Bigtable" >> Enrichment(bigtable_handler)
             | "Print" >> beam.Map(print))
       # [END enrichment_with_bigtable]
     
    diff --git a/sdks/python/apache_beam/io/gcp/bigtableio.py b/sdks/python/apache_beam/io/gcp/bigtableio.py
    index cd78deb7466c..00396308993f 100644
    --- a/sdks/python/apache_beam/io/gcp/bigtableio.py
    +++ b/sdks/python/apache_beam/io/gcp/bigtableio.py
    @@ -15,23 +15,23 @@
     # limitations under the License.
     #
     
    -"""BigTable connector
    +"""Bigtable connector
     
    -This module implements writing to BigTable tables.
    -The default mode is to set row data to write to BigTable tables.
    +This module implements writing to Bigtable tables.
    +The default mode is to set row data to write to Bigtable tables.
     The syntax supported is described here:
     https://cloud.google.com/bigtable/docs/quickstart-cbt
     
    -BigTable connector can be used as main outputs. A main output
    +Bigtable connector can be used as main outputs. A main output
     (common case) is expected to be massive and will be split into
     manageable chunks and processed in parallel. In the example below
     we created a list of rows then passed to the GeneratedDirectRows
    -DoFn to set the Cells and then we call the BigTableWriteFn to insert
    +DoFn to set the Cells and then we call the _BigtableWriteFn to insert
     those generated rows in the table.
     
       main_table = (p
                     | beam.Create(self._generate())
    -                | WriteToBigTable(project_id,
    +                | WriteToBigtable(project_id,
                                       instance_id,
                                       table_id))
     """
    @@ -68,10 +68,10 @@
       _LOGGER.warning(
           'ImportError: from google.cloud.bigtable import Client', exc_info=True)
     
    -__all__ = ['WriteToBigTable', 'ReadFromBigtable']
    +__all__ = ['WriteToBigtable', 'ReadFromBigtable']
     
     
    -class _BigTableWriteFn(beam.DoFn):
    +class _BigtableWriteFn(beam.DoFn):
       """ Creates the connector can call and add_row to the batcher using each
       row in beam pipe line
       Args:
    @@ -192,7 +192,7 @@ def display_data(self):
         }
     
     
    -class WriteToBigTable(beam.PTransform):
    +class WriteToBigtable(beam.PTransform):
       """A transform that writes rows to a Bigtable table.
     
       Takes an input PCollection of `DirectRow` objects containing un-committed
    @@ -215,7 +215,7 @@ def __init__(
           flush_count=FLUSH_COUNT,
           max_row_bytes=MAX_ROW_BYTES,
       ):
    -    """Initialize an WriteToBigTable transform.
    +    """Initialize a WriteToBigtable transform.
     
         :param table_id:
           The ID of the table to write to.
    @@ -272,7 +272,7 @@ def expand(self, input):
           return (
               input
               | beam.ParDo(
    -              _BigTableWriteFn(
    +              _BigtableWriteFn(
                       self._project_id,
                       self._instance_id,
                       self._table_id,
    @@ -329,6 +329,11 @@ def process(self, direct_row):
           yield beam.Row(**args)
     
     
    +# Backward compatibility aliases
    +WriteToBigTable = WriteToBigtable
    +_BigTableWriteFn = _BigtableWriteFn
    +
    +
     class ReadFromBigtable(PTransform):
       """Reads rows from Bigtable.
     
    diff --git a/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py b/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py
    index 488914c4b198..b36167fac36e 100644
    --- a/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py
    +++ b/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py
    @@ -15,7 +15,7 @@
     # limitations under the License.
     #
     
    -"""Integration tests for BigTable service."""
    +"""Integration tests for Bigtable service."""
     
     import logging
     import os
    @@ -66,7 +66,7 @@ def instance_prefix(instance):
         os.environ.get('TRANSFORM_SERVICE_PORT'),
         "A valid expansion service is not available for executing the "
         "cross-language test.")
    -class TestReadFromBigTableIT(unittest.TestCase):
    +class TestReadFromBigtableIT(unittest.TestCase):
       INSTANCE = "bt-read-tests"
       TABLE_ID = "test-table"
     
    @@ -225,7 +225,7 @@ def run_pipeline(self, rows):
           _ = (
               p
               | beam.Create(rows)
    -          | bigtableio.WriteToBigTable(
    +          | bigtableio.WriteToBigtable(
                   project_id=self.project,
                   instance_id=self.instance.instance_id,
                   table_id=self.table.table_id,
    diff --git a/sdks/python/apache_beam/io/gcp/bigtableio_test.py b/sdks/python/apache_beam/io/gcp/bigtableio_test.py
    index 08c33017f9c7..ec427940872f 100644
    --- a/sdks/python/apache_beam/io/gcp/bigtableio_test.py
    +++ b/sdks/python/apache_beam/io/gcp/bigtableio_test.py
    @@ -15,7 +15,7 @@
     # limitations under the License.
     #
     
    -"""Unit tests for BigTable service."""
    +"""Unit tests for Bigtable service."""
     
     import logging
     import string
    @@ -117,7 +117,7 @@ def test_beam_row_to_bigtable_row(self):
     
     @unittest.skipIf(client is None, 'Bigtable dependencies are not installed')
     class TestBigtableDirectRowToBeamRow(unittest.TestCase):
    -  doFn = bigtableio.WriteToBigTable._DirectRowMutationsToBeamRow()
    +  doFn = bigtableio.WriteToBigtable._DirectRowMutationsToBeamRow()
     
       @staticmethod
       def _get_mutation_pbs(direct_row):
    @@ -270,7 +270,7 @@ def test_delete_row(self):
     
     
     @unittest.skipIf(client is None, 'Bigtable dependencies are not installed')
    -class TestWriteBigTable(unittest.TestCase):
    +class TestWriteBigtable(unittest.TestCase):
       TABLE_PREFIX = "python-test"
       _PROJECT_ID = TABLE_PREFIX + "-" + str(uuid.uuid4())[:8]
       _INSTANCE_ID = TABLE_PREFIX + "-" + str(uuid.uuid4())[:8]
    @@ -289,7 +289,7 @@ def test_write(self):
         runner = 'FnApiRunner'
         with patch.object(MutationsBatcher, 'mutate'), \
           patch.object(MutationsBatcher, 'close'), TestPipeline(runner) as p:
    -      _ = p | beam.Create(direct_rows) | bigtableio.WriteToBigTable(
    +      _ = p | beam.Create(direct_rows) | bigtableio.WriteToBigtable(
               self._PROJECT_ID, self._INSTANCE_ID, self._TABLE_ID)
         self.assertSetEqual(
             Lineage.query(p.result.metrics(), Lineage.SINK),
    @@ -299,7 +299,7 @@ def test_write(self):
     
       def test_write_metrics(self):
         MetricsEnvironment.process_wide_container().reset()
    -    write_fn = bigtableio._BigTableWriteFn(
    +    write_fn = bigtableio._BigtableWriteFn(
             self._PROJECT_ID,
             self._INSTANCE_ID,
             self._TABLE_ID,
    @@ -341,7 +341,7 @@ def test_write_metrics(self):
               2)
     
       def test_write_batch_error_surfaces_from_async_flush(self):
    -    write_fn = bigtableio._BigTableWriteFn(
    +    write_fn = bigtableio._BigtableWriteFn(
             self._PROJECT_ID,
             self._INSTANCE_ID,
             self._TABLE_ID,
    @@ -360,7 +360,7 @@ def test_write_batch_error_surfaces_from_async_flush(self):
             write_fn.finish_bundle()
     
       def test_write_batch_error_surfaces_from_buffered_rows(self):
    -    write_fn = bigtableio._BigTableWriteFn(
    +    write_fn = bigtableio._BigtableWriteFn(
             self._PROJECT_ID,
             self._INSTANCE_ID,
             self._TABLE_ID,
    @@ -378,7 +378,7 @@ def test_write_batch_error_surfaces_from_buffered_rows(self):
               mock_mutate.call_count, 0, 'buffered row was never flushed')
     
       def test_write_close_error_is_surfaced(self):
    -    write_fn = bigtableio._BigTableWriteFn(
    +    write_fn = bigtableio._BigtableWriteFn(
             self._PROJECT_ID,
             self._INSTANCE_ID,
             self._TABLE_ID,
    @@ -444,7 +444,7 @@ def test_custom_flush_config(self):
             MutationsBatcher, '__init__', return_value=None) as mock_init, \
           patch.object(MutationsBatcher, 'mutate'), \
           patch.object(MutationsBatcher, 'close'), TestPipeline() as p:
    -      _ = p | beam.Create(direct_rows) | bigtableio.WriteToBigTable(
    +      _ = p | beam.Create(direct_rows) | bigtableio.WriteToBigtable(
               self._PROJECT_ID,
               self._INSTANCE_ID,
               self._TABLE_ID,
    diff --git a/sdks/python/apache_beam/io/iobase.py b/sdks/python/apache_beam/io/iobase.py
    index b7be85935997..34ee781d87a1 100644
    --- a/sdks/python/apache_beam/io/iobase.py
    +++ b/sdks/python/apache_beam/io/iobase.py
    @@ -295,7 +295,7 @@ class RangeTracker(object):
       at or after 'B'".
     
       Some examples of such sources include reading lines or CSV from a text file,
    -  reading keys and values from a BigTable, etc.
    +  reading keys and values from a Bigtable, etc.
     
       The concept of *split points* allows to extend the definitions for dealing
       with sources where some records cannot be identified by a unique starting
    diff --git a/sdks/python/apache_beam/io/requestresponse.py b/sdks/python/apache_beam/io/requestresponse.py
    index ef570f4d8556..0d6fc7a24fbf 100644
    --- a/sdks/python/apache_beam/io/requestresponse.py
    +++ b/sdks/python/apache_beam/io/requestresponse.py
    @@ -143,7 +143,7 @@ def get_cache_key(self, request: RequestT) -> str:
         This is how the response will be looked up in the cache as well.
         By default, entire request is cached as the key for the cache.
         Implement this method to override the key for the cache.
    -    For example, in `BigTableEnrichmentHandler`, the row key for the element
    +    For example, in `BigtableEnrichmentHandler`, the row key for the element
         is returned here.
         """
         return ""
    diff --git a/sdks/python/apache_beam/transforms/enrichment.py b/sdks/python/apache_beam/transforms/enrichment.py
    index 0c8e3a2d48df..92b2a9e73673 100644
    --- a/sdks/python/apache_beam/transforms/enrichment.py
    +++ b/sdks/python/apache_beam/transforms/enrichment.py
    @@ -94,7 +94,7 @@ def get_cache_key(self, request: InputT) -> str:
         Implement this method to provide the key for the cache.
         By default, the entire request is stored as the cache key.
     
    -    For example, in `BigTableEnrichmentHandler`, the row key for the element
    +    For example, in `BigtableEnrichmentHandler`, the row key for the element
         is returned here.
         """
         return "request: %s" % request
    diff --git a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py
    index c251ab05ecab..aef0523b3b86 100644
    --- a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py
    +++ b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py
    @@ -30,6 +30,7 @@
     from apache_beam.transforms.enrichment_handlers.utils import ExceptionLevel
     
     __all__ = [
    +    'BigtableEnrichmentHandler',
         'BigTableEnrichmentHandler',
     ]
     
    @@ -38,28 +39,28 @@
     _LOGGER = logging.getLogger(__name__)
     
     
    -class BigTableEnrichmentHandler(EnrichmentSourceHandler[beam.Row, beam.Row]):
    +class BigtableEnrichmentHandler(EnrichmentSourceHandler[beam.Row, beam.Row]):
       """A handler for :class:`apache_beam.transforms.enrichment.Enrichment`
    -  transform to interact with GCP BigTable.
    +  transform to interact with GCP Bigtable.
     
       Args:
    -    project_id (str): GCP project-id of the BigTable cluster.
    -    instance_id (str): GCP instance-id of the BigTable cluster.
    -    table_id (str): GCP table-id of the BigTable.
    +    project_id (str): GCP project-id of the Bigtable cluster.
    +    instance_id (str): GCP instance-id of the Bigtable cluster.
    +    table_id (str): GCP table-id of the Bigtable.
         row_key (str): unique row-key field name from the input `beam.Row` object
    -      to use as `row_key` for BigTable querying.
    +      to use as `row_key` for Bigtable querying.
         row_filter: a ``:class:`google.cloud.bigtable.row_filters.RowFilter``` to
           filter data read with ``read_row()``.
           Defaults to `CellsColumnLimitFilter(1)`.
    -    app_profile_id (str): App profile ID to use for BigTable.
    +    app_profile_id (str): App profile ID to use for Bigtable.
           See https://cloud.google.com/bigtable/docs/app-profiles for more details.
         encoding (str): encoding type to convert the string to bytes and vice-versa
    -      from BigTable. Default is `utf-8`.
    +      from Bigtable. Default is `utf-8`.
         row_key_fn: a lambda function that returns a string row key from the
           input row. It is used to build/extract the row key for Bigtable.
         exception_level: a `enum.Enum` value from
           ``apache_beam.transforms.enrichment_handlers.utils.ExceptionLevel``
    -      to set the level when an empty row is returned from the BigTable query.
    +      to set the level when an empty row is returned from the Bigtable query.
           Defaults to ``ExceptionLevel.WARN``.
         include_timestamp (bool): If enabled, the timestamp associated with the
           value is returned as `(value, timestamp)` for each `row_key`.
    @@ -98,7 +99,7 @@ def __init__(
               "from the input row.")
     
       def __enter__(self):
    -    """connect to the Google BigTable cluster."""
    +    """connect to the Google Bigtable cluster."""
         self.client = Client(project=self._project_id)
         self.instance = self.client.instance(self._instance_id)
         self._table = bigtable.table.Table(
    @@ -108,7 +109,7 @@ def __enter__(self):
     
       def __call__(self, request: beam.Row, *args, **kwargs):
         """
    -    Reads a row from the GCP BigTable and returns
    +    Reads a row from the GCP Bigtable and returns
         a `Tuple` of request and response.
     
         Args:
    @@ -147,7 +148,7 @@ def __call__(self, request: beam.Row, *args, **kwargs):
           raise KeyError('row_key %s not found in input PCollection.' % row_key_str)
         except NotFound:
           raise NotFound(
    -          'GCP BigTable cluster `%s:%s:%s` not found.' %
    +          'GCP Bigtable cluster `%s:%s:%s` not found.' %
               (self._project_id, self._instance_id, self._table_id))
         except Exception as e:
           raise e
    @@ -155,7 +156,7 @@ def __call__(self, request: beam.Row, *args, **kwargs):
         return request, beam.Row(**response_dict)
     
       def __exit__(self, exc_type, exc_val, exc_tb):
    -    """Clean the instantiated BigTable client."""
    +    """Clean the instantiated Bigtable client."""
         self.client = None
         self.instance = None
         self._table = None
    @@ -166,3 +167,7 @@ def get_cache_key(self, request: beam.Row) -> str:
         if self._row_key_fn:
           return "row_key: %s" % str(self._row_key_fn(request))
         return "%s: %s" % (self._row_key, request._asdict()[self._row_key])
    +
    +
    +# Backward compatibility alias
    +BigTableEnrichmentHandler = BigtableEnrichmentHandler
    diff --git a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_it_test.py b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_it_test.py
    index e8e66fdcc48d..d292ae071372 100644
    --- a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_it_test.py
    +++ b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_it_test.py
    @@ -36,7 +36,7 @@
       from testcontainers.redis import RedisContainer
     
       from apache_beam.transforms.enrichment import Enrichment
    -  from apache_beam.transforms.enrichment_handlers.bigtable import BigTableEnrichmentHandler
    +  from apache_beam.transforms.enrichment_handlers.bigtable import BigtableEnrichmentHandler
       from apache_beam.transforms.enrichment_handlers.bigtable import ExceptionLevel
     except ImportError:
       raise unittest.SkipTest('Bigtable test dependencies are not installed.')
    @@ -152,7 +152,7 @@ def create_rows(table):
     
     
     @pytest.mark.uses_testcontainer
    -class TestBigTableEnrichment(unittest.TestCase):
    +class TestBigtableEnrichment(unittest.TestCase):
       def setUp(self):
         self.project_id = 'apache-beam-testing'
         self.instance_id = 'beam-test'
    @@ -199,7 +199,7 @@ def test_enrichment_with_bigtable(self):
         expected_enriched_fields = {
             'product': ['product_id', 'product_name', 'product_stock'],
         }
    -    bigtable = BigTableEnrichmentHandler(
    +    bigtable = BigtableEnrichmentHandler(
             project_id=self.project_id,
             instance_id=self.instance_id,
             table_id=self.table_id,
    @@ -208,7 +208,7 @@ def test_enrichment_with_bigtable(self):
           _ = (
               test_pipeline
               | "Create" >> beam.Create(self.req)
    -          | "Enrich W/ BigTable" >> Enrichment(bigtable)
    +          | "Enrich W/ Bigtable" >> Enrichment(bigtable)
               | "Validate Response" >> beam.ParDo(
                   ValidateResponse(
                       len(expected_fields),
    @@ -224,7 +224,7 @@ def test_enrichment_with_bigtable_row_filter(self):
         }
         start_column = 'product_name'.encode()
         column_filter = ColumnRangeFilter(self.column_family_id, start_column)
    -    bigtable = BigTableEnrichmentHandler(
    +    bigtable = BigtableEnrichmentHandler(
             project_id=self.project_id,
             instance_id=self.instance_id,
             table_id=self.table_id,
    @@ -234,7 +234,7 @@ def test_enrichment_with_bigtable_row_filter(self):
           _ = (
               test_pipeline
               | "Create" >> beam.Create(self.req)
    -          | "Enrich W/ BigTable" >> Enrichment(bigtable)
    +          | "Enrich W/ Bigtable" >> Enrichment(bigtable)
               | "Validate Response" >> beam.ParDo(
                   ValidateResponse(
                       len(expected_fields),
    @@ -246,7 +246,7 @@ def test_enrichment_with_bigtable_no_enrichment(self):
         # won't be added. Hence, the response is same as the request.
         expected_fields = ['sale_id', 'customer_id', 'product_id', 'quantity']
         expected_enriched_fields = {}
    -    bigtable = BigTableEnrichmentHandler(
    +    bigtable = BigtableEnrichmentHandler(
             project_id=self.project_id,
             instance_id=self.instance_id,
             table_id=self.table_id,
    @@ -256,7 +256,7 @@ def test_enrichment_with_bigtable_no_enrichment(self):
           _ = (
               test_pipeline
               | "Create" >> beam.Create(req)
    -          | "Enrich W/ BigTable" >> Enrichment(bigtable)
    +          | "Enrich W/ Bigtable" >> Enrichment(bigtable)
               | "Validate Response" >> beam.ParDo(
                   ValidateResponse(
                       len(expected_fields),
    @@ -269,7 +269,7 @@ def test_enrichment_with_bigtable_bad_row_filter(self):
         # column names then all columns in that column_family are returned.
         start_column = 'car_name'.encode()
         column_filter = ColumnRangeFilter('car_name', start_column)
    -    bigtable = BigTableEnrichmentHandler(
    +    bigtable = BigtableEnrichmentHandler(
             project_id=self.project_id,
             instance_id=self.instance_id,
             table_id=self.table_id,
    @@ -280,14 +280,14 @@ def test_enrichment_with_bigtable_bad_row_filter(self):
           _ = (
               test_pipeline
               | "Create" >> beam.Create(self.req)
    -          | "Enrich W/ BigTable" >> Enrichment(bigtable))
    +          | "Enrich W/ Bigtable" >> Enrichment(bigtable))
           res = test_pipeline.run()
           res.wait_until_finish()
     
       def test_enrichment_with_bigtable_raises_key_error(self):
         """raises a `KeyError` when the row_key doesn't exist in
         the input PCollection."""
    -    bigtable = BigTableEnrichmentHandler(
    +    bigtable = BigtableEnrichmentHandler(
             project_id=self.project_id,
             instance_id=self.instance_id,
             table_id=self.table_id,
    @@ -297,14 +297,14 @@ def test_enrichment_with_bigtable_raises_key_error(self):
           _ = (
               test_pipeline
               | "Create" >> beam.Create(self.req)
    -          | "Enrich W/ BigTable" >> Enrichment(bigtable))
    +          | "Enrich W/ Bigtable" >> Enrichment(bigtable))
           res = test_pipeline.run()
           res.wait_until_finish()
     
       def test_enrichment_with_bigtable_raises_not_found(self):
    -    """raises a `NotFound` exception when the GCP BigTable Cluster
    +    """raises a `NotFound` exception when the GCP Bigtable Cluster
         doesn't exist."""
    -    bigtable = BigTableEnrichmentHandler(
    +    bigtable = BigtableEnrichmentHandler(
             project_id=self.project_id,
             instance_id=self.instance_id,
             table_id='invalid_table',
    @@ -314,14 +314,14 @@ def test_enrichment_with_bigtable_raises_not_found(self):
           _ = (
               test_pipeline
               | "Create" >> beam.Create(self.req)
    -          | "Enrich W/ BigTable" >> Enrichment(bigtable))
    +          | "Enrich W/ Bigtable" >> Enrichment(bigtable))
           res = test_pipeline.run()
           res.wait_until_finish()
     
       def test_enrichment_with_bigtable_exception_level(self):
    -    """raises a `ValueError` exception when the GCP BigTable query returns
    +    """raises a `ValueError` exception when the GCP Bigtable query returns
         an empty row."""
    -    bigtable = BigTableEnrichmentHandler(
    +    bigtable = BigtableEnrichmentHandler(
             project_id=self.project_id,
             instance_id=self.instance_id,
             table_id=self.table_id,
    @@ -333,7 +333,7 @@ def test_enrichment_with_bigtable_exception_level(self):
           _ = (
               test_pipeline
               | "Create" >> beam.Create(req)
    -          | "Enrich W/ BigTable" >> Enrichment(bigtable))
    +          | "Enrich W/ Bigtable" >> Enrichment(bigtable))
           res = test_pipeline.run()
           res.wait_until_finish()
     
    @@ -346,7 +346,7 @@ def test_enrichment_with_bigtable_with_timestamp(self):
         expected_enriched_fields = {
             'product': ['product_id', 'product_name', 'product_stock'],
         }
    -    bigtable = BigTableEnrichmentHandler(
    +    bigtable = BigtableEnrichmentHandler(
             project_id=self.project_id,
             instance_id=self.instance_id,
             table_id=self.table_id,
    @@ -356,7 +356,7 @@ def test_enrichment_with_bigtable_with_timestamp(self):
           _ = (
               test_pipeline
               | "Create" >> beam.Create(self.req)
    -          | "Enrich W/ BigTable" >> Enrichment(bigtable)
    +          | "Enrich W/ Bigtable" >> Enrichment(bigtable)
               | "Validate Response" >> beam.ParDo(
                   ValidateResponse(
                       len(expected_fields),
    @@ -372,7 +372,7 @@ def test_bigtable_enrichment_with_redis(self):
         zero cache records. Therefore, it makes call to the Bigtable source and
         ultimately writes to the cache with a TTL of 300 seconds.
     
    -    For the second pipeline, we mock the `BigTableEnrichmentHandler`'s
    +    For the second pipeline, we mock the `BigtableEnrichmentHandler`'s
         `__call__` method to always return a `None` response. However, this change
         won't impact the second pipeline because the Enrichment transform first
         checks the cache to fulfill requests. Since all requests are cached, it
    @@ -386,7 +386,7 @@ def test_bigtable_enrichment_with_redis(self):
         }
         start_column = 'product_name'.encode()
         column_filter = ColumnRangeFilter(self.column_family_id, start_column)
    -    bigtable = BigTableEnrichmentHandler(
    +    bigtable = BigtableEnrichmentHandler(
             project_id=self.project_id,
             instance_id=self.instance_id,
             table_id=self.table_id,
    @@ -396,7 +396,7 @@ def test_bigtable_enrichment_with_redis(self):
           _ = (
               test_pipeline
               | "Create1" >> beam.Create(self.req)
    -          | "Enrich W/ BigTable1" >> Enrichment(bigtable).with_redis_cache(
    +          | "Enrich W/ Bigtable1" >> Enrichment(bigtable).with_redis_cache(
                   self.host, self.port, 300)
               | "Validate Response" >> beam.ParDo(
                   ValidateResponse(
    @@ -412,8 +412,8 @@ def test_bigtable_enrichment_with_redis(self):
           if not response:
             raise ValueError("No cache entry found for %s" % key)
     
    -    actual = BigTableEnrichmentHandler.__call__
    -    BigTableEnrichmentHandler.__call__ = MagicMock(
    +    actual = BigtableEnrichmentHandler.__call__
    +    BigtableEnrichmentHandler.__call__ = MagicMock(
             return_value=(
                 beam.Row(sale_id=1, customer_id=1, product_id=1, quantity=1),
                 beam.Row()))
    @@ -422,14 +422,14 @@ def test_bigtable_enrichment_with_redis(self):
           _ = (
               test_pipeline
               | "Create2" >> beam.Create(self.req)
    -          | "Enrich W/ BigTable2" >> Enrichment(bigtable).with_redis_cache(
    +          | "Enrich W/ Bigtable2" >> Enrichment(bigtable).with_redis_cache(
                   self.host, self.port)
               | "Validate Response" >> beam.ParDo(
                   ValidateResponse(
                       len(expected_fields),
                       expected_fields,
                       expected_enriched_fields)))
    -    BigTableEnrichmentHandler.__call__ = actual
    +    BigtableEnrichmentHandler.__call__ = actual
     
       def test_bigtable_enrichment_with_lambda(self):
         expected_fields = [
    @@ -438,7 +438,7 @@ def test_bigtable_enrichment_with_lambda(self):
         expected_enriched_fields = {
             'product': ['product_id', 'product_name', 'product_stock'],
         }
    -    bigtable = BigTableEnrichmentHandler(
    +    bigtable = BigtableEnrichmentHandler(
             project_id=self.project_id,
             instance_id=self.instance_id,
             table_id=self.table_id,
    @@ -447,7 +447,7 @@ def test_bigtable_enrichment_with_lambda(self):
           _ = (
               test_pipeline
               | "Create" >> beam.Create(self.req)
    -          | "Enrich W/ BigTable" >> Enrichment(bigtable)
    +          | "Enrich W/ Bigtable" >> Enrichment(bigtable)
               | "Validate Response" >> beam.ParDo(
                   ValidateResponse(
                       len(expected_fields),
    diff --git a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_test.py b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_test.py
    index 1c5cb4064e0e..8fb5e830c039 100644
    --- a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_test.py
    +++ b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_test.py
    @@ -20,16 +20,20 @@
     
     try:
       from apache_beam.transforms.enrichment_handlers.bigtable import BigTableEnrichmentHandler
    +  from apache_beam.transforms.enrichment_handlers.bigtable import BigtableEnrichmentHandler
       from apache_beam.transforms.enrichment_handlers.bigtable_it_test import _row_key_fn
     except ImportError:
       raise unittest.SkipTest('Bigtable test dependencies are not installed.')
     
     
    -class TestBigTableEnrichmentHandler(unittest.TestCase):
    +class TestBigtableEnrichmentHandler(unittest.TestCase):
    +  def test_bigtable_enrichment_alias(self):
    +    self.assertIs(BigTableEnrichmentHandler, BigtableEnrichmentHandler)
    +
       @parameterized.expand([('product_id', _row_key_fn), ('', None)])
       def test_bigtable_enrichment_invalid_args(self, row_key, row_key_fn):
         with self.assertRaises(ValueError):
    -      _ = BigTableEnrichmentHandler(
    +      _ = BigtableEnrichmentHandler(
               project_id='apache-beam-testing',
               instance_id='beam-test',
               table_id='bigtable-enrichment-test',
    diff --git a/sdks/python/apache_beam/transforms/enrichment_handlers/vertex_ai_feature_store.py b/sdks/python/apache_beam/transforms/enrichment_handlers/vertex_ai_feature_store.py
    index b6de3aa1c826..c364378ea8a5 100644
    --- a/sdks/python/apache_beam/transforms/enrichment_handlers/vertex_ai_feature_store.py
    +++ b/sdks/python/apache_beam/transforms/enrichment_handlers/vertex_ai_feature_store.py
    @@ -86,7 +86,7 @@ def __init__(
             for the feature values.
           exception_level: a `enum.Enum` value from
             `apache_beam.transforms.enrichment_handlers.utils.ExceptionLevel`
    -        to set the level when an empty row is returned from the BigTable query.
    +        to set the level when an empty row is returned from the Bigtable query.
             Defaults to `ExceptionLevel.WARN`.
           kwargs: Optional keyword arguments to configure the
             `aiplatform.gapic.FeatureOnlineStoreServiceClient`.
    @@ -229,7 +229,7 @@ def __init__(
             for the feature values.
           exception_level: a `enum.Enum` value from
             `apache_beam.transforms.enrichment_handlers.utils.ExceptionLevel`
    -        to set the level when an empty row is returned from the BigTable query.
    +        to set the level when an empty row is returned from the Bigtable query.
             Defaults to `ExceptionLevel.WARN`.
           kwargs: Optional keyword arguments to configure the
             `aiplatform.gapic.FeaturestoreOnlineServingServiceClient`.
    diff --git a/sdks/python/setup.py b/sdks/python/setup.py
    index 5ea8257a4b4b..9fa09073d362 100644
    --- a/sdks/python/setup.py
    +++ b/sdks/python/setup.py
    @@ -532,7 +532,7 @@ def get_portability_package_data():
                   'google-cloud-bigquery>=2.0.0,<4',
                   'google-cloud-bigquery-storage>=2.6.3,<3',
                   'google-cloud-core>=2.0.0,<3',
    -              # 2.44.0 changed DirectRow mutation storage; native WriteToBigTable
    +              # 2.44.0 changed DirectRow mutation storage; native WriteToBigtable
                   # requires this version on both driver and workers.
                   'google-cloud-bigtable>=2.44.0,<3',
                   'google-cloud-build>=3.35.0,<4',
    diff --git a/website/www/site/content/en/documentation/io/io-standards.md b/website/www/site/content/en/documentation/io/io-standards.md
    index 1f1ee505b0b4..52960819575c 100644
    --- a/website/www/site/content/en/documentation/io/io-standards.md
    +++ b/website/www/site/content/en/documentation/io/io-standards.md
    @@ -1276,7 +1276,7 @@ When possible, unit tests are favored over integration tests due to faster execu
           
           
              

    SpannerIOReadTest.testReadMetrics -

    bigtableio_test.TestWriteBigTable.test_write_metrics +

    bigtableio_test.TestWriteBigtable.test_write_metrics diff --git a/website/www/site/content/en/documentation/transforms/python/elementwise/enrichment-bigtable.md b/website/www/site/content/en/documentation/transforms/python/elementwise/enrichment-bigtable.md index ee259355e303..f1aea5439308 100644 --- a/website/www/site/content/en/documentation/transforms/python/elementwise/enrichment-bigtable.md +++ b/website/www/site/content/en/documentation/transforms/python/elementwise/enrichment-bigtable.md @@ -23,14 +23,14 @@ limitations under the License. - {{< button-pydoc path="apache_beam.transforms.enrichment_handlers.bigtable" class="BigTableEnrichmentHandler" >}} + {{< button-pydoc path="apache_beam.transforms.enrichment_handlers.bigtable" class="BigtableEnrichmentHandler" >}} In Apache Beam 2.54.0 and later versions, the enrichment transform includes a built-in enrichment handler for [Bigtable](https://cloud.google.com/bigtable/docs/overview). -The following example demonstrates how to create a pipeline that use the enrichment transform with the [`BigTableEnrichmentHandler`](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.bigtable.html#apache_beam.transforms.enrichment_handlers.bigtable.BigTableEnrichmentHandler) handler. +The following example demonstrates how to create a pipeline that use the enrichment transform with the [`BigtableEnrichmentHandler`](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.bigtable.html#apache_beam.transforms.enrichment_handlers.bigtable.BigtableEnrichmentHandler) handler. The data stored in the Bigtable cluster uses the following format: @@ -59,4 +59,4 @@ Output: Not applicable. -{{< button-pydoc path="apache_beam.transforms.enrichment_handlers.bigtable" class="BigTableEnrichmentHandler" >}} \ No newline at end of file +{{< button-pydoc path="apache_beam.transforms.enrichment_handlers.bigtable" class="BigtableEnrichmentHandler" >}} \ No newline at end of file From d7d00e2d5ca8b220420b67f76052f9f9bf8d8574 Mon Sep 17 00:00:00 2001 From: Derrick Williams Date: Mon, 21 Sep 2026 20:33:50 +0000 Subject: [PATCH 3/6] remove the uncessary deprecated code interface --- .../transforms/io/TokenizationBigtableIO.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigtableIO.java b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigtableIO.java index d1a6759d7acc..6d3ab75e2960 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigtableIO.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigtableIO.java @@ -157,12 +157,4 @@ public interface BigtableOptions extends PipelineOptions { void setBigTableColumnFamilyName(String bigTableColumnFamilyName); } - - /** - * Backward-compatible alias for {@link BigtableOptions}. - * - * @deprecated Use {@link BigtableOptions} instead. - */ - @Deprecated - public interface BigTableOptions extends BigtableOptions {} } From 6026e2f3658a9a8878612abdc8ca3091b8d0405b Mon Sep 17 00:00:00 2001 From: Derrick Williams Date: Wed, 23 Sep 2026 14:39:07 +0000 Subject: [PATCH 4/6] revert changes to public apis --- .../beam_StressTests_Java_BigTableIO.yml | 2 +- it/build.gradle | 4 -- it/google-cloud-platform/build.gradle | 15 +---- .../beam/it/gcp/bigtable/BigtableIOST.java | 4 +- .../examples/cookbook/bigtableio_it_test.py | 4 +- .../transforms/elementwise/enrichment.py | 4 +- sdks/python/apache_beam/io/gcp/bigtableio.py | 19 +++--- .../apache_beam/io/gcp/bigtableio_it_test.py | 2 +- .../apache_beam/io/gcp/bigtableio_test.py | 16 ++--- sdks/python/apache_beam/io/requestresponse.py | 2 +- .../apache_beam/transforms/enrichment.py | 2 +- .../enrichment_handlers/bigtable.py | 7 +-- .../enrichment_handlers/bigtable_it_test.py | 58 +++++++++---------- .../enrichment_handlers/bigtable_test.py | 8 +-- sdks/python/setup.py | 2 +- .../en/documentation/io/io-standards.md | 2 +- .../python/elementwise/enrichment-bigtable.md | 6 +- 17 files changed, 65 insertions(+), 92 deletions(-) diff --git a/.github/workflows/beam_StressTests_Java_BigTableIO.yml b/.github/workflows/beam_StressTests_Java_BigTableIO.yml index bc552da200b1..d10d547e20a9 100644 --- a/.github/workflows/beam_StressTests_Java_BigTableIO.yml +++ b/.github/workflows/beam_StressTests_Java_BigTableIO.yml @@ -76,4 +76,4 @@ jobs: - name: run Bigtable StressTest Large uses: ./.github/actions/gradle-command-self-hosted-action with: - gradle-command: :it:google-cloud-platform:BigtableStressTestLarge --info -DinfluxHost="http://10.128.0.96:8086" -DinfluxDatabase="beam_test_metrics" -DinfluxMeasurement="java_stress_test_bigtable" + gradle-command: :it:google-cloud-platform:BigTableStressTestLarge --info -DinfluxHost="http://10.128.0.96:8086" -DinfluxDatabase="beam_test_metrics" -DinfluxMeasurement="java_stress_test_bigtable" diff --git a/it/build.gradle b/it/build.gradle index ba12f31d9cfc..ad6ba19f383d 100644 --- a/it/build.gradle +++ b/it/build.gradle @@ -28,10 +28,6 @@ tasks.register('GCSPerformanceTest') { dependsOn(":it:google-cloud-platform:GCSPerformanceTest") } -tasks.register('BigtablePerformanceTest') { - dependsOn(":it:google-cloud-platform:BigtablePerformanceTest") -} - tasks.register('BigTablePerformanceTest') { dependsOn(":it:google-cloud-platform:BigTablePerformanceTest") } diff --git a/it/google-cloud-platform/build.gradle b/it/google-cloud-platform/build.gradle index 2ba9fe066503..300e500cdd36 100644 --- a/it/google-cloud-platform/build.gradle +++ b/it/google-cloud-platform/build.gradle @@ -84,13 +84,10 @@ tasks.register( + System.properties ) tasks.register( - "BigtablePerformanceTest", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOLT', + "BigTablePerformanceTest", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOLT', ['configuration':'large', 'project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] + System.properties ) -tasks.register("BigTablePerformanceTest") { - dependsOn("BigtablePerformanceTest") -} tasks.register( "BigQueryPerformanceTest", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigQueryIOLT', ['configuration':'medium', 'project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] @@ -127,21 +124,15 @@ tasks.register( + System.properties ) tasks.register( - "BigtableStressTestMedium", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOST', + "BigTableStressTestMedium", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOST', ['configuration':'medium','project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] + System.properties ) -tasks.register("BigTableStressTestMedium") { - dependsOn("BigtableStressTestMedium") -} tasks.register( - "BigtableStressTestLarge", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOST', + "BigTableStressTestLarge", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOST', ['configuration':'large','project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] + System.properties ) -tasks.register("BigTableStressTestLarge") { - dependsOn("BigtableStressTestLarge") -} tasks.register( "SpannerStressTestMedium", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'SpannerIOST', ['configuration':'medium','project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] diff --git a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java index 227dac8eb0d9..41ddde284f17 100644 --- a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java +++ b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java @@ -67,8 +67,8 @@ * *

    Usage:
    * - To run medium-scale stress tests: {@code gradle - * :it:google-cloud-platform:BigtableStressTestMedium} - To run large-scale stress tests: {@code - * gradle :it:google-cloud-platform:BigtableStressTestLarge} + * :it:google-cloud-platform:BigTableStressTestMedium} - To run large-scale stress tests: {@code + * gradle :it:google-cloud-platform:BigTableStressTestLarge} */ public final class BigtableIOST extends IOStressTestBase { diff --git a/sdks/python/apache_beam/examples/cookbook/bigtableio_it_test.py b/sdks/python/apache_beam/examples/cookbook/bigtableio_it_test.py index 195bc06326f9..84087dee5607 100644 --- a/sdks/python/apache_beam/examples/cookbook/bigtableio_it_test.py +++ b/sdks/python/apache_beam/examples/cookbook/bigtableio_it_test.py @@ -30,7 +30,7 @@ import pytz import apache_beam as beam -from apache_beam.io.gcp.bigtableio import WriteToBigtable +from apache_beam.io.gcp.bigtableio import WriteToBigTable from apache_beam.metrics.metric import MetricsFilter from apache_beam.options.pipeline_options import PipelineOptions from apache_beam.runners.runner import PipelineState @@ -94,7 +94,7 @@ def expand(self, pvalue): return ( pvalue | beam.Create(self._generate()) - | WriteToBigtable( + | WriteToBigTable( beam_options['project_id'], beam_options['instance_id'], beam_options['table_id'])) diff --git a/sdks/python/apache_beam/examples/snippets/transforms/elementwise/enrichment.py b/sdks/python/apache_beam/examples/snippets/transforms/elementwise/enrichment.py index 7e94847c8325..d35258be3938 100644 --- a/sdks/python/apache_beam/examples/snippets/transforms/elementwise/enrichment.py +++ b/sdks/python/apache_beam/examples/snippets/transforms/elementwise/enrichment.py @@ -24,7 +24,7 @@ def enrichment_with_bigtable(): # [START enrichment_with_bigtable] import apache_beam as beam from apache_beam.transforms.enrichment import Enrichment - from apache_beam.transforms.enrichment_handlers.bigtable import BigtableEnrichmentHandler + from apache_beam.transforms.enrichment_handlers.bigtable import BigTableEnrichmentHandler project_id = 'apache-beam-testing' instance_id = 'beam-test' @@ -37,7 +37,7 @@ def enrichment_with_bigtable(): beam.Row(sale_id=5, customer_id=5, product_id=4, quantity=2) ] - bigtable_handler = BigtableEnrichmentHandler( + bigtable_handler = BigTableEnrichmentHandler( project_id=project_id, instance_id=instance_id, table_id=table_id, diff --git a/sdks/python/apache_beam/io/gcp/bigtableio.py b/sdks/python/apache_beam/io/gcp/bigtableio.py index 00396308993f..b8d212428060 100644 --- a/sdks/python/apache_beam/io/gcp/bigtableio.py +++ b/sdks/python/apache_beam/io/gcp/bigtableio.py @@ -26,12 +26,12 @@ (common case) is expected to be massive and will be split into manageable chunks and processed in parallel. In the example below we created a list of rows then passed to the GeneratedDirectRows -DoFn to set the Cells and then we call the _BigtableWriteFn to insert +DoFn to set the Cells and then we call the _BigTableWriteFn to insert those generated rows in the table. main_table = (p | beam.Create(self._generate()) - | WriteToBigtable(project_id, + | WriteToBigTable(project_id, instance_id, table_id)) """ @@ -68,10 +68,10 @@ _LOGGER.warning( 'ImportError: from google.cloud.bigtable import Client', exc_info=True) -__all__ = ['WriteToBigtable', 'ReadFromBigtable'] +__all__ = ['WriteToBigTable', 'ReadFromBigtable'] -class _BigtableWriteFn(beam.DoFn): +class _BigTableWriteFn(beam.DoFn): """ Creates the connector can call and add_row to the batcher using each row in beam pipe line Args: @@ -192,7 +192,7 @@ def display_data(self): } -class WriteToBigtable(beam.PTransform): +class WriteToBigTable(beam.PTransform): """A transform that writes rows to a Bigtable table. Takes an input PCollection of `DirectRow` objects containing un-committed @@ -215,7 +215,7 @@ def __init__( flush_count=FLUSH_COUNT, max_row_bytes=MAX_ROW_BYTES, ): - """Initialize a WriteToBigtable transform. + """Initialize an WriteToBigTable transform. :param table_id: The ID of the table to write to. @@ -272,7 +272,7 @@ def expand(self, input): return ( input | beam.ParDo( - _BigtableWriteFn( + _BigTableWriteFn( self._project_id, self._instance_id, self._table_id, @@ -329,11 +329,6 @@ def process(self, direct_row): yield beam.Row(**args) -# Backward compatibility aliases -WriteToBigTable = WriteToBigtable -_BigTableWriteFn = _BigtableWriteFn - - class ReadFromBigtable(PTransform): """Reads rows from Bigtable. diff --git a/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py b/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py index b36167fac36e..9f14e8408200 100644 --- a/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py +++ b/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py @@ -225,7 +225,7 @@ def run_pipeline(self, rows): _ = ( p | beam.Create(rows) - | bigtableio.WriteToBigtable( + | bigtableio.WriteToBigTable( project_id=self.project, instance_id=self.instance.instance_id, table_id=self.table.table_id, diff --git a/sdks/python/apache_beam/io/gcp/bigtableio_test.py b/sdks/python/apache_beam/io/gcp/bigtableio_test.py index ec427940872f..4aba9a4062fd 100644 --- a/sdks/python/apache_beam/io/gcp/bigtableio_test.py +++ b/sdks/python/apache_beam/io/gcp/bigtableio_test.py @@ -117,7 +117,7 @@ def test_beam_row_to_bigtable_row(self): @unittest.skipIf(client is None, 'Bigtable dependencies are not installed') class TestBigtableDirectRowToBeamRow(unittest.TestCase): - doFn = bigtableio.WriteToBigtable._DirectRowMutationsToBeamRow() + doFn = bigtableio.WriteToBigTable._DirectRowMutationsToBeamRow() @staticmethod def _get_mutation_pbs(direct_row): @@ -270,7 +270,7 @@ def test_delete_row(self): @unittest.skipIf(client is None, 'Bigtable dependencies are not installed') -class TestWriteBigtable(unittest.TestCase): +class TestWriteBigTable(unittest.TestCase): TABLE_PREFIX = "python-test" _PROJECT_ID = TABLE_PREFIX + "-" + str(uuid.uuid4())[:8] _INSTANCE_ID = TABLE_PREFIX + "-" + str(uuid.uuid4())[:8] @@ -289,7 +289,7 @@ def test_write(self): runner = 'FnApiRunner' with patch.object(MutationsBatcher, 'mutate'), \ patch.object(MutationsBatcher, 'close'), TestPipeline(runner) as p: - _ = p | beam.Create(direct_rows) | bigtableio.WriteToBigtable( + _ = p | beam.Create(direct_rows) | bigtableio.WriteToBigTable( self._PROJECT_ID, self._INSTANCE_ID, self._TABLE_ID) self.assertSetEqual( Lineage.query(p.result.metrics(), Lineage.SINK), @@ -299,7 +299,7 @@ def test_write(self): def test_write_metrics(self): MetricsEnvironment.process_wide_container().reset() - write_fn = bigtableio._BigtableWriteFn( + write_fn = bigtableio._BigTableWriteFn( self._PROJECT_ID, self._INSTANCE_ID, self._TABLE_ID, @@ -341,7 +341,7 @@ def test_write_metrics(self): 2) def test_write_batch_error_surfaces_from_async_flush(self): - write_fn = bigtableio._BigtableWriteFn( + write_fn = bigtableio._BigTableWriteFn( self._PROJECT_ID, self._INSTANCE_ID, self._TABLE_ID, @@ -360,7 +360,7 @@ def test_write_batch_error_surfaces_from_async_flush(self): write_fn.finish_bundle() def test_write_batch_error_surfaces_from_buffered_rows(self): - write_fn = bigtableio._BigtableWriteFn( + write_fn = bigtableio._BigTableWriteFn( self._PROJECT_ID, self._INSTANCE_ID, self._TABLE_ID, @@ -378,7 +378,7 @@ def test_write_batch_error_surfaces_from_buffered_rows(self): mock_mutate.call_count, 0, 'buffered row was never flushed') def test_write_close_error_is_surfaced(self): - write_fn = bigtableio._BigtableWriteFn( + write_fn = bigtableio._BigTableWriteFn( self._PROJECT_ID, self._INSTANCE_ID, self._TABLE_ID, @@ -444,7 +444,7 @@ def test_custom_flush_config(self): MutationsBatcher, '__init__', return_value=None) as mock_init, \ patch.object(MutationsBatcher, 'mutate'), \ patch.object(MutationsBatcher, 'close'), TestPipeline() as p: - _ = p | beam.Create(direct_rows) | bigtableio.WriteToBigtable( + _ = p | beam.Create(direct_rows) | bigtableio.WriteToBigTable( self._PROJECT_ID, self._INSTANCE_ID, self._TABLE_ID, diff --git a/sdks/python/apache_beam/io/requestresponse.py b/sdks/python/apache_beam/io/requestresponse.py index 0d6fc7a24fbf..ef570f4d8556 100644 --- a/sdks/python/apache_beam/io/requestresponse.py +++ b/sdks/python/apache_beam/io/requestresponse.py @@ -143,7 +143,7 @@ def get_cache_key(self, request: RequestT) -> str: This is how the response will be looked up in the cache as well. By default, entire request is cached as the key for the cache. Implement this method to override the key for the cache. - For example, in `BigtableEnrichmentHandler`, the row key for the element + For example, in `BigTableEnrichmentHandler`, the row key for the element is returned here. """ return "" diff --git a/sdks/python/apache_beam/transforms/enrichment.py b/sdks/python/apache_beam/transforms/enrichment.py index 92b2a9e73673..0c8e3a2d48df 100644 --- a/sdks/python/apache_beam/transforms/enrichment.py +++ b/sdks/python/apache_beam/transforms/enrichment.py @@ -94,7 +94,7 @@ def get_cache_key(self, request: InputT) -> str: Implement this method to provide the key for the cache. By default, the entire request is stored as the cache key. - For example, in `BigtableEnrichmentHandler`, the row key for the element + For example, in `BigTableEnrichmentHandler`, the row key for the element is returned here. """ return "request: %s" % request diff --git a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py index aef0523b3b86..b1a7bde212a0 100644 --- a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py +++ b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py @@ -30,7 +30,6 @@ from apache_beam.transforms.enrichment_handlers.utils import ExceptionLevel __all__ = [ - 'BigtableEnrichmentHandler', 'BigTableEnrichmentHandler', ] @@ -39,7 +38,7 @@ _LOGGER = logging.getLogger(__name__) -class BigtableEnrichmentHandler(EnrichmentSourceHandler[beam.Row, beam.Row]): +class BigTableEnrichmentHandler(EnrichmentSourceHandler[beam.Row, beam.Row]): """A handler for :class:`apache_beam.transforms.enrichment.Enrichment` transform to interact with GCP Bigtable. @@ -167,7 +166,3 @@ def get_cache_key(self, request: beam.Row) -> str: if self._row_key_fn: return "row_key: %s" % str(self._row_key_fn(request)) return "%s: %s" % (self._row_key, request._asdict()[self._row_key]) - - -# Backward compatibility alias -BigTableEnrichmentHandler = BigtableEnrichmentHandler diff --git a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_it_test.py b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_it_test.py index d292ae071372..e8e66fdcc48d 100644 --- a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_it_test.py +++ b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_it_test.py @@ -36,7 +36,7 @@ from testcontainers.redis import RedisContainer from apache_beam.transforms.enrichment import Enrichment - from apache_beam.transforms.enrichment_handlers.bigtable import BigtableEnrichmentHandler + from apache_beam.transforms.enrichment_handlers.bigtable import BigTableEnrichmentHandler from apache_beam.transforms.enrichment_handlers.bigtable import ExceptionLevel except ImportError: raise unittest.SkipTest('Bigtable test dependencies are not installed.') @@ -152,7 +152,7 @@ def create_rows(table): @pytest.mark.uses_testcontainer -class TestBigtableEnrichment(unittest.TestCase): +class TestBigTableEnrichment(unittest.TestCase): def setUp(self): self.project_id = 'apache-beam-testing' self.instance_id = 'beam-test' @@ -199,7 +199,7 @@ def test_enrichment_with_bigtable(self): expected_enriched_fields = { 'product': ['product_id', 'product_name', 'product_stock'], } - bigtable = BigtableEnrichmentHandler( + bigtable = BigTableEnrichmentHandler( project_id=self.project_id, instance_id=self.instance_id, table_id=self.table_id, @@ -208,7 +208,7 @@ def test_enrichment_with_bigtable(self): _ = ( test_pipeline | "Create" >> beam.Create(self.req) - | "Enrich W/ Bigtable" >> Enrichment(bigtable) + | "Enrich W/ BigTable" >> Enrichment(bigtable) | "Validate Response" >> beam.ParDo( ValidateResponse( len(expected_fields), @@ -224,7 +224,7 @@ def test_enrichment_with_bigtable_row_filter(self): } start_column = 'product_name'.encode() column_filter = ColumnRangeFilter(self.column_family_id, start_column) - bigtable = BigtableEnrichmentHandler( + bigtable = BigTableEnrichmentHandler( project_id=self.project_id, instance_id=self.instance_id, table_id=self.table_id, @@ -234,7 +234,7 @@ def test_enrichment_with_bigtable_row_filter(self): _ = ( test_pipeline | "Create" >> beam.Create(self.req) - | "Enrich W/ Bigtable" >> Enrichment(bigtable) + | "Enrich W/ BigTable" >> Enrichment(bigtable) | "Validate Response" >> beam.ParDo( ValidateResponse( len(expected_fields), @@ -246,7 +246,7 @@ def test_enrichment_with_bigtable_no_enrichment(self): # won't be added. Hence, the response is same as the request. expected_fields = ['sale_id', 'customer_id', 'product_id', 'quantity'] expected_enriched_fields = {} - bigtable = BigtableEnrichmentHandler( + bigtable = BigTableEnrichmentHandler( project_id=self.project_id, instance_id=self.instance_id, table_id=self.table_id, @@ -256,7 +256,7 @@ def test_enrichment_with_bigtable_no_enrichment(self): _ = ( test_pipeline | "Create" >> beam.Create(req) - | "Enrich W/ Bigtable" >> Enrichment(bigtable) + | "Enrich W/ BigTable" >> Enrichment(bigtable) | "Validate Response" >> beam.ParDo( ValidateResponse( len(expected_fields), @@ -269,7 +269,7 @@ def test_enrichment_with_bigtable_bad_row_filter(self): # column names then all columns in that column_family are returned. start_column = 'car_name'.encode() column_filter = ColumnRangeFilter('car_name', start_column) - bigtable = BigtableEnrichmentHandler( + bigtable = BigTableEnrichmentHandler( project_id=self.project_id, instance_id=self.instance_id, table_id=self.table_id, @@ -280,14 +280,14 @@ def test_enrichment_with_bigtable_bad_row_filter(self): _ = ( test_pipeline | "Create" >> beam.Create(self.req) - | "Enrich W/ Bigtable" >> Enrichment(bigtable)) + | "Enrich W/ BigTable" >> Enrichment(bigtable)) res = test_pipeline.run() res.wait_until_finish() def test_enrichment_with_bigtable_raises_key_error(self): """raises a `KeyError` when the row_key doesn't exist in the input PCollection.""" - bigtable = BigtableEnrichmentHandler( + bigtable = BigTableEnrichmentHandler( project_id=self.project_id, instance_id=self.instance_id, table_id=self.table_id, @@ -297,14 +297,14 @@ def test_enrichment_with_bigtable_raises_key_error(self): _ = ( test_pipeline | "Create" >> beam.Create(self.req) - | "Enrich W/ Bigtable" >> Enrichment(bigtable)) + | "Enrich W/ BigTable" >> Enrichment(bigtable)) res = test_pipeline.run() res.wait_until_finish() def test_enrichment_with_bigtable_raises_not_found(self): - """raises a `NotFound` exception when the GCP Bigtable Cluster + """raises a `NotFound` exception when the GCP BigTable Cluster doesn't exist.""" - bigtable = BigtableEnrichmentHandler( + bigtable = BigTableEnrichmentHandler( project_id=self.project_id, instance_id=self.instance_id, table_id='invalid_table', @@ -314,14 +314,14 @@ def test_enrichment_with_bigtable_raises_not_found(self): _ = ( test_pipeline | "Create" >> beam.Create(self.req) - | "Enrich W/ Bigtable" >> Enrichment(bigtable)) + | "Enrich W/ BigTable" >> Enrichment(bigtable)) res = test_pipeline.run() res.wait_until_finish() def test_enrichment_with_bigtable_exception_level(self): - """raises a `ValueError` exception when the GCP Bigtable query returns + """raises a `ValueError` exception when the GCP BigTable query returns an empty row.""" - bigtable = BigtableEnrichmentHandler( + bigtable = BigTableEnrichmentHandler( project_id=self.project_id, instance_id=self.instance_id, table_id=self.table_id, @@ -333,7 +333,7 @@ def test_enrichment_with_bigtable_exception_level(self): _ = ( test_pipeline | "Create" >> beam.Create(req) - | "Enrich W/ Bigtable" >> Enrichment(bigtable)) + | "Enrich W/ BigTable" >> Enrichment(bigtable)) res = test_pipeline.run() res.wait_until_finish() @@ -346,7 +346,7 @@ def test_enrichment_with_bigtable_with_timestamp(self): expected_enriched_fields = { 'product': ['product_id', 'product_name', 'product_stock'], } - bigtable = BigtableEnrichmentHandler( + bigtable = BigTableEnrichmentHandler( project_id=self.project_id, instance_id=self.instance_id, table_id=self.table_id, @@ -356,7 +356,7 @@ def test_enrichment_with_bigtable_with_timestamp(self): _ = ( test_pipeline | "Create" >> beam.Create(self.req) - | "Enrich W/ Bigtable" >> Enrichment(bigtable) + | "Enrich W/ BigTable" >> Enrichment(bigtable) | "Validate Response" >> beam.ParDo( ValidateResponse( len(expected_fields), @@ -372,7 +372,7 @@ def test_bigtable_enrichment_with_redis(self): zero cache records. Therefore, it makes call to the Bigtable source and ultimately writes to the cache with a TTL of 300 seconds. - For the second pipeline, we mock the `BigtableEnrichmentHandler`'s + For the second pipeline, we mock the `BigTableEnrichmentHandler`'s `__call__` method to always return a `None` response. However, this change won't impact the second pipeline because the Enrichment transform first checks the cache to fulfill requests. Since all requests are cached, it @@ -386,7 +386,7 @@ def test_bigtable_enrichment_with_redis(self): } start_column = 'product_name'.encode() column_filter = ColumnRangeFilter(self.column_family_id, start_column) - bigtable = BigtableEnrichmentHandler( + bigtable = BigTableEnrichmentHandler( project_id=self.project_id, instance_id=self.instance_id, table_id=self.table_id, @@ -396,7 +396,7 @@ def test_bigtable_enrichment_with_redis(self): _ = ( test_pipeline | "Create1" >> beam.Create(self.req) - | "Enrich W/ Bigtable1" >> Enrichment(bigtable).with_redis_cache( + | "Enrich W/ BigTable1" >> Enrichment(bigtable).with_redis_cache( self.host, self.port, 300) | "Validate Response" >> beam.ParDo( ValidateResponse( @@ -412,8 +412,8 @@ def test_bigtable_enrichment_with_redis(self): if not response: raise ValueError("No cache entry found for %s" % key) - actual = BigtableEnrichmentHandler.__call__ - BigtableEnrichmentHandler.__call__ = MagicMock( + actual = BigTableEnrichmentHandler.__call__ + BigTableEnrichmentHandler.__call__ = MagicMock( return_value=( beam.Row(sale_id=1, customer_id=1, product_id=1, quantity=1), beam.Row())) @@ -422,14 +422,14 @@ def test_bigtable_enrichment_with_redis(self): _ = ( test_pipeline | "Create2" >> beam.Create(self.req) - | "Enrich W/ Bigtable2" >> Enrichment(bigtable).with_redis_cache( + | "Enrich W/ BigTable2" >> Enrichment(bigtable).with_redis_cache( self.host, self.port) | "Validate Response" >> beam.ParDo( ValidateResponse( len(expected_fields), expected_fields, expected_enriched_fields))) - BigtableEnrichmentHandler.__call__ = actual + BigTableEnrichmentHandler.__call__ = actual def test_bigtable_enrichment_with_lambda(self): expected_fields = [ @@ -438,7 +438,7 @@ def test_bigtable_enrichment_with_lambda(self): expected_enriched_fields = { 'product': ['product_id', 'product_name', 'product_stock'], } - bigtable = BigtableEnrichmentHandler( + bigtable = BigTableEnrichmentHandler( project_id=self.project_id, instance_id=self.instance_id, table_id=self.table_id, @@ -447,7 +447,7 @@ def test_bigtable_enrichment_with_lambda(self): _ = ( test_pipeline | "Create" >> beam.Create(self.req) - | "Enrich W/ Bigtable" >> Enrichment(bigtable) + | "Enrich W/ BigTable" >> Enrichment(bigtable) | "Validate Response" >> beam.ParDo( ValidateResponse( len(expected_fields), diff --git a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_test.py b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_test.py index 8fb5e830c039..1c5cb4064e0e 100644 --- a/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_test.py +++ b/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable_test.py @@ -20,20 +20,16 @@ try: from apache_beam.transforms.enrichment_handlers.bigtable import BigTableEnrichmentHandler - from apache_beam.transforms.enrichment_handlers.bigtable import BigtableEnrichmentHandler from apache_beam.transforms.enrichment_handlers.bigtable_it_test import _row_key_fn except ImportError: raise unittest.SkipTest('Bigtable test dependencies are not installed.') -class TestBigtableEnrichmentHandler(unittest.TestCase): - def test_bigtable_enrichment_alias(self): - self.assertIs(BigTableEnrichmentHandler, BigtableEnrichmentHandler) - +class TestBigTableEnrichmentHandler(unittest.TestCase): @parameterized.expand([('product_id', _row_key_fn), ('', None)]) def test_bigtable_enrichment_invalid_args(self, row_key, row_key_fn): with self.assertRaises(ValueError): - _ = BigtableEnrichmentHandler( + _ = BigTableEnrichmentHandler( project_id='apache-beam-testing', instance_id='beam-test', table_id='bigtable-enrichment-test', diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 9fa09073d362..5ea8257a4b4b 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -532,7 +532,7 @@ def get_portability_package_data(): 'google-cloud-bigquery>=2.0.0,<4', 'google-cloud-bigquery-storage>=2.6.3,<3', 'google-cloud-core>=2.0.0,<3', - # 2.44.0 changed DirectRow mutation storage; native WriteToBigtable + # 2.44.0 changed DirectRow mutation storage; native WriteToBigTable # requires this version on both driver and workers. 'google-cloud-bigtable>=2.44.0,<3', 'google-cloud-build>=3.35.0,<4', diff --git a/website/www/site/content/en/documentation/io/io-standards.md b/website/www/site/content/en/documentation/io/io-standards.md index 52960819575c..1f1ee505b0b4 100644 --- a/website/www/site/content/en/documentation/io/io-standards.md +++ b/website/www/site/content/en/documentation/io/io-standards.md @@ -1276,7 +1276,7 @@ When possible, unit tests are favored over integration tests due to faster execu

    SpannerIOReadTest.testReadMetrics -

    bigtableio_test.TestWriteBigtable.test_write_metrics +

    bigtableio_test.TestWriteBigTable.test_write_metrics diff --git a/website/www/site/content/en/documentation/transforms/python/elementwise/enrichment-bigtable.md b/website/www/site/content/en/documentation/transforms/python/elementwise/enrichment-bigtable.md index f1aea5439308..ee259355e303 100644 --- a/website/www/site/content/en/documentation/transforms/python/elementwise/enrichment-bigtable.md +++ b/website/www/site/content/en/documentation/transforms/python/elementwise/enrichment-bigtable.md @@ -23,14 +23,14 @@ limitations under the License. - {{< button-pydoc path="apache_beam.transforms.enrichment_handlers.bigtable" class="BigtableEnrichmentHandler" >}} + {{< button-pydoc path="apache_beam.transforms.enrichment_handlers.bigtable" class="BigTableEnrichmentHandler" >}} In Apache Beam 2.54.0 and later versions, the enrichment transform includes a built-in enrichment handler for [Bigtable](https://cloud.google.com/bigtable/docs/overview). -The following example demonstrates how to create a pipeline that use the enrichment transform with the [`BigtableEnrichmentHandler`](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.bigtable.html#apache_beam.transforms.enrichment_handlers.bigtable.BigtableEnrichmentHandler) handler. +The following example demonstrates how to create a pipeline that use the enrichment transform with the [`BigTableEnrichmentHandler`](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.bigtable.html#apache_beam.transforms.enrichment_handlers.bigtable.BigTableEnrichmentHandler) handler. The data stored in the Bigtable cluster uses the following format: @@ -59,4 +59,4 @@ Output: Not applicable. -{{< button-pydoc path="apache_beam.transforms.enrichment_handlers.bigtable" class="BigtableEnrichmentHandler" >}} \ No newline at end of file +{{< button-pydoc path="apache_beam.transforms.enrichment_handlers.bigtable" class="BigTableEnrichmentHandler" >}} \ No newline at end of file From db5756d1eafbf92f57f32875b132bfe14da4997d Mon Sep 17 00:00:00 2001 From: Derrick Williams Date: Wed, 23 Sep 2026 14:52:27 +0000 Subject: [PATCH 5/6] more reverts of public classes --- .../datatokenization/DataTokenization.java | 4 ++-- .../options/DataTokenizationOptions.java | 4 ++-- ...bleIO.java => TokenizationBigTableIO.java} | 18 ++++++++--------- it/google-cloud-platform/build.gradle | 6 +++--- .../{BigtableIOLT.java => BigTableIOLT.java} | 20 +++++++++---------- .../{BigtableIOST.java => BigTableIOST.java} | 16 +++++++-------- 6 files changed, 34 insertions(+), 34 deletions(-) rename examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/{TokenizationBigtableIO.java => TokenizationBigTableIO.java} (92%) rename it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/{BigtableIOLT.java => BigTableIOLT.java} (95%) rename it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/{BigtableIOST.java => BigTableIOST.java} (97%) diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/DataTokenization.java b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/DataTokenization.java index f988495998c8..9079a42410db 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/DataTokenization.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/DataTokenization.java @@ -28,7 +28,7 @@ import org.apache.beam.examples.complete.datatokenization.transforms.JsonToBeamRow; import org.apache.beam.examples.complete.datatokenization.transforms.SerializableFunctions; import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationBigQueryIO; -import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationBigtableIO; +import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationBigTableIO; import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationFileSystemIO; import org.apache.beam.examples.complete.datatokenization.utils.ErrorConverters; import org.apache.beam.examples.complete.datatokenization.utils.FailsafeElement; @@ -331,7 +331,7 @@ public static PipelineResult run(DataTokenizationOptions options) { .setErrorRecordsTableSchema(DEADLETTER_SCHEMA) .build()); } else if (options.getBigTableInstanceId() != null) { - new TokenizationBigtableIO(options) + new TokenizationBigTableIO(options) .write(tokenizedRows.get(TOKENIZATION_OUT), schema.getBeamSchema()); } else { throw new IllegalStateException( diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/options/DataTokenizationOptions.java b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/options/DataTokenizationOptions.java index 1d52ff780222..c68a5378e487 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/options/DataTokenizationOptions.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/options/DataTokenizationOptions.java @@ -17,7 +17,7 @@ */ package org.apache.beam.examples.complete.datatokenization.options; -import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationBigtableIO; +import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationBigTableIO; import org.apache.beam.examples.complete.datatokenization.transforms.io.TokenizationFileSystemIO.FileSystemPipelineOptions; import org.apache.beam.sdk.options.Default; import org.apache.beam.sdk.options.Description; @@ -28,7 +28,7 @@ * executor at the command-line. */ public interface DataTokenizationOptions - extends PipelineOptions, FileSystemPipelineOptions, TokenizationBigtableIO.BigtableOptions { + extends PipelineOptions, FileSystemPipelineOptions, TokenizationBigTableIO.BigTableOptions { @Description("Path to data schema (JSON format) compatible with BigQuery.") String getDataSchemaPath(); diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigtableIO.java b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigTableIO.java similarity index 92% rename from examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigtableIO.java rename to examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigTableIO.java index 6d3ab75e2960..1db3506d188f 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigtableIO.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/datatokenization/transforms/io/TokenizationBigTableIO.java @@ -40,23 +40,23 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** The {@link TokenizationBigtableIO} class for writing data from template to Bigtable. */ -public class TokenizationBigtableIO { +/** The {@link TokenizationBigTableIO} class for writing data from template to Bigtable. */ +public class TokenizationBigTableIO { /** Logger for class. */ - private static final Logger LOG = LoggerFactory.getLogger(TokenizationBigtableIO.class); + private static final Logger LOG = LoggerFactory.getLogger(TokenizationBigTableIO.class); private final DataTokenizationOptions options; - public TokenizationBigtableIO(DataTokenizationOptions options) { + public TokenizationBigTableIO(DataTokenizationOptions options) { this.options = options; } public PDone write(PCollection input, Schema schema) { return input - .apply("ConvertToBigtableFormat", ParDo.of(new TransformToBigtableFormat(schema))) + .apply("ConvertToBigTableFormat", ParDo.of(new TransformToBigTableFormat(schema))) .apply( - "WriteToBigtable", + "WriteToBigTable", BigtableIO.write() .withProjectId(options.getBigTableProjectId()) .withInstanceId(options.getBigTableInstanceId()) @@ -65,11 +65,11 @@ public PDone write(PCollection input, Schema schema) { .apply("LogRowCount", new LogSuccessfulRows()); } - static class TransformToBigtableFormat extends DoFn>> { + static class TransformToBigTableFormat extends DoFn>> { private final Schema schema; - TransformToBigtableFormat(Schema schema) { + TransformToBigTableFormat(Schema schema) { this.schema = schema; } @@ -130,7 +130,7 @@ public void processElement(@Element BigtableWriteResult in) { * Necessary {@link PipelineOptions} options for Pipelines that perform write operations to * Bigtable. */ - public interface BigtableOptions extends PipelineOptions { + public interface BigTableOptions extends PipelineOptions { @Description("Id of the project where the Cloud Bigtable instance to write into is located.") String getBigTableProjectId(); diff --git a/it/google-cloud-platform/build.gradle b/it/google-cloud-platform/build.gradle index 300e500cdd36..164a75c06ba0 100644 --- a/it/google-cloud-platform/build.gradle +++ b/it/google-cloud-platform/build.gradle @@ -84,7 +84,7 @@ tasks.register( + System.properties ) tasks.register( - "BigTablePerformanceTest", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOLT', + "BigTablePerformanceTest", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigTableIOLT', ['configuration':'large', 'project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] + System.properties ) @@ -124,12 +124,12 @@ tasks.register( + System.properties ) tasks.register( - "BigTableStressTestMedium", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOST', + "BigTableStressTestMedium", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigTableIOST', ['configuration':'medium','project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] + System.properties ) tasks.register( - "BigTableStressTestLarge", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigtableIOST', + "BigTableStressTestLarge", IoPerformanceTestUtilities.IoPerformanceTest, project, 'google-cloud-platform', 'BigTableIOST', ['configuration':'large','project':'apache-beam-testing', 'artifactBucket':'io-performance-temp'] + System.properties ) diff --git a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOLT.java b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOLT.java similarity index 95% rename from it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOLT.java rename to it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOLT.java index f2ecb7061b36..b56199db0bf7 100644 --- a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOLT.java +++ b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOLT.java @@ -56,14 +56,14 @@ * BigtableIO performance tests. * *

    Example trigger command for all tests: "mvn test -pl it/google-cloud-platform -am - * -Dtest=BigtableIOLT \ -Dproject=[gcpProject] -DartifactBucket=[temp bucket] + * -Dtest=BigTableIOLT \ -Dproject=[gcpProject] -DartifactBucket=[temp bucket] * -DfailIfNoTests=false". * *

    Example trigger command for specific test: "mvn test -pl it/google-cloud-platform -am \ - * -Dtest="BigtableIOLT#testBigtableWriteAndRead" -Dconfiguration=local -Dproject=[gcpProject] \ + * -Dtest="BigTableIOLT#testBigtableWriteAndRead" -Dconfiguration=local -Dproject=[gcpProject] \ * -DartifactBucket=[temp bucket] -DfailIfNoTests=false". */ -public class BigtableIOLT extends IOLoadTestBase { +public class BigTableIOLT extends IOLoadTestBase { private static final String COLUMN_FAMILY_NAME = "cf"; private static final long TABLE_MAX_AGE_MINUTES = 100L; @@ -149,7 +149,7 @@ public void testBigtableWriteAndRead() throws IOException { MetricsConfiguration metricsConfig = MetricsConfiguration.builder() .setInputPCollection("Map records.out0") - .setInputPCollectionV2("Map records/ParMultiDo(MapToBigtableFormat).out0") + .setInputPCollectionV2("Map records/ParMultiDo(MapToBigTableFormat).out0") .setOutputPCollection("Counting element.out0") .setOutputPCollectionV2("Counting element/ParMultiDo(Counting).out0") .build(); @@ -171,8 +171,8 @@ private PipelineLauncher.LaunchInfo testWrite() throws IOException { writePipeline .apply(GenerateSequence.from(0).to(configuration.getNumRows())) - .apply("Map records", ParDo.of(new MapToBigtableFormat(configuration.getValueSizeBytes()))) - .apply("Write to Bigtable", writeIO); + .apply("Map records", ParDo.of(new MapToBigTableFormat(configuration.getValueSizeBytes()))) + .apply("Write to BigTable", writeIO); PipelineLauncher.LaunchConfig options = PipelineLauncher.LaunchConfig.builder("write-bigtable") @@ -196,7 +196,7 @@ private PipelineLauncher.LaunchInfo testRead() throws IOException { .withTableId(tableId); readPipeline - .apply("Read from Bigtable", readIO) + .apply("Read from BigTable", readIO) .apply("Counting element", ParDo.of(new CountingFn<>(READ_ELEMENT_METRIC_NAME))); PipelineLauncher.LaunchConfig options = @@ -224,7 +224,7 @@ abstract static class Configuration { abstract int getValueSizeBytes(); static Configuration of(long numRows, int pipelineTimeout, String runner, int valueSizeBytes) { - return new AutoValue_BigtableIOLT_Configuration.Builder() + return new AutoValue_BigTableIOLT_Configuration.Builder() .setNumRows(numRows) .setPipelineTimeout(pipelineTimeout) .setRunner(runner) @@ -249,12 +249,12 @@ abstract static class Builder { } /** Maps long number to the Bigtable format record. */ - private static class MapToBigtableFormat extends DoFn>> + private static class MapToBigTableFormat extends DoFn>> implements Serializable { private final int valueSizeBytes; - public MapToBigtableFormat(int valueSizeBytes) { + public MapToBigTableFormat(int valueSizeBytes) { this.valueSizeBytes = valueSizeBytes; } diff --git a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOST.java similarity index 97% rename from it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java rename to it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOST.java index 41ddde284f17..b723e7aecbe6 100644 --- a/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigtableIOST.java +++ b/it/google-cloud-platform/src/test/java/org/apache/beam/it/gcp/bigtable/BigTableIOST.java @@ -70,7 +70,7 @@ * :it:google-cloud-platform:BigTableStressTestMedium} - To run large-scale stress tests: {@code * gradle :it:google-cloud-platform:BigTableStressTestLarge} */ -public final class BigtableIOST extends IOStressTestBase { +public final class BigTableIOST extends IOStressTestBase { private static final String WRITE_ELEMENT_METRIC_NAME = "write_count"; private static final String READ_ELEMENT_METRIC_NAME = "read_count"; @@ -252,10 +252,10 @@ private PipelineLauncher.LaunchInfo generateDataAndWrite() throws IOException { } source .apply( - "Map records to Bigtable format", - ParDo.of(new MapToBigtableFormat((int) configuration.valueSizeBytes))) + "Map records to BigTable format", + ParDo.of(new MapToBigTableFormat((int) configuration.valueSizeBytes))) .apply( - "Write to Bigtable", + "Write to BigTable", BigtableIO.write() .withProjectId(project) .withInstanceId(resourceManager.getInstanceId()) @@ -288,7 +288,7 @@ private PipelineLauncher.LaunchInfo readData() throws IOException { .withTableId(tableId); readPipeline - .apply("Read from Bigtable", readIO) + .apply("Read from BigTable", readIO) .apply("Counting element", ParDo.of(new CountingFn<>(READ_ELEMENT_METRIC_NAME))); PipelineLauncher.LaunchConfig options = @@ -338,7 +338,7 @@ static class Configuration extends SyntheticSourceOptions { @JsonProperty public boolean exportMetricsToInfluxDB = true; /** InfluxDB measurement to publish results to. * */ - @JsonProperty public String influxMeasurement = BigtableIOST.class.getName(); + @JsonProperty public String influxMeasurement = BigTableIOST.class.getName(); /** InfluxDB host to publish metrics. * */ @JsonProperty public String influxHost; @@ -348,12 +348,12 @@ static class Configuration extends SyntheticSourceOptions { } /** Maps Instant to the Bigtable format record. */ - private static class MapToBigtableFormat + private static class MapToBigTableFormat extends DoFn, KV>> implements Serializable { private final int valueSizeBytes; - public MapToBigtableFormat(int valueSizeBytes) { + public MapToBigTableFormat(int valueSizeBytes) { this.valueSizeBytes = valueSizeBytes; } From d39a4c1ad877292e6ba24abaff3460a1e58af181 Mon Sep 17 00:00:00 2001 From: Derrick Williams Date: Wed, 23 Sep 2026 16:20:36 +0000 Subject: [PATCH 6/6] revert suppressions.xml to fix checkstyle error --- .../src/main/resources/beam/checkstyle/suppressions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/java/build-tools/src/main/resources/beam/checkstyle/suppressions.xml b/sdks/java/build-tools/src/main/resources/beam/checkstyle/suppressions.xml index 96ec13ab4822..833fd30cf218 100644 --- a/sdks/java/build-tools/src/main/resources/beam/checkstyle/suppressions.xml +++ b/sdks/java/build-tools/src/main/resources/beam/checkstyle/suppressions.xml @@ -71,7 +71,7 @@ - +