Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.18.1"
".": "2.18.3"
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [2.18.3](https://github.com/googleapis/java-bigtable-hbase/compare/v2.18.2...v2.18.3) (2026-04-30)


### Bug Fixes

* do not split near empty ranges ([#4604](https://github.com/googleapis/java-bigtable-hbase/issues/4604)) ([c37ca95](https://github.com/googleapis/java-bigtable-hbase/commit/c37ca951f4cd1164b47c2e66f04ac6423651f592))

## [2.18.2](https://github.com/googleapis/java-bigtable-hbase/compare/v2.18.1...v2.18.2) (2026-04-29)


### Bug Fixes

* expose max attempt ([#4593](https://github.com/googleapis/java-bigtable-hbase/issues/4593)) ([6c37093](https://github.com/googleapis/java-bigtable-hbase/commit/6c370939695b0692be5b173536998f197a81c144))
* raise maxInboundMessageSize ([#4601](https://github.com/googleapis/java-bigtable-hbase/issues/4601)) ([e165006](https://github.com/googleapis/java-bigtable-hbase/commit/e16500656c6651b34bc3773b63929b47a1cf8743))
* remove batch endpoint ([#4592](https://github.com/googleapis/java-bigtable-hbase/issues/4592)) ([1316f4e](https://github.com/googleapis/java-bigtable-hbase/commit/1316f4e54de98a4f0fd1f6d226f59551b6a62337))

## [2.18.1](https://github.com/googleapis/java-bigtable-hbase/compare/v2.18.0...v2.18.1) (2026-04-13)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
<parent>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-client-core-parent</artifactId>
<version>2.18.2-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<version>2.18.4-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
</parent>

<artifactId>bigtable-hbase-integration-tests-common</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions bigtable-client-core-parent/bigtable-hbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
<parent>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-client-core-parent</artifactId>
<version>2.18.2-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<version>2.18.4-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
</parent>

<artifactId>bigtable-hbase</artifactId>
Expand Down Expand Up @@ -85,7 +85,7 @@ limitations under the License.
<dependency>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-internal-test-helper</artifactId>
<version>2.18.2-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<version>2.18.4-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -149,7 +149,7 @@ limitations under the License.
<plugin>
<groupId>com.google.cloud.bigtable.test</groupId>
<artifactId>bigtable-build-helper</artifactId>
<version>2.18.2-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<version>2.18.4-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->

<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class BigtableHBaseVersion {
private static final AtomicBoolean wasInitialized = new AtomicBoolean(false);

// {x-version-update-start:bigtable-client-parent:current}
public static final String VERSION = "2.18.2-SNAPSHOT";
public static final String VERSION = "2.18.4-SNAPSHOT";
// {x-version-update-end}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,20 @@ private void configureConnection(
final InstantiatingGrpcChannelProvider.Builder channelProvider =
((InstantiatingGrpcChannelProvider) stubSettings.getTransportChannelProvider()).toBuilder();

// Raise the gRPC inbound message size to 500MB. This is ok because maxInboundMessageSize
// doesn't pre-allocate the memory. It's only used to validate the message size from the
// gRPC header. When processing the data, the memory is always dynamically allocated.
// Bigtable server also enforces a 256MB limit.
ApiFunction<ManagedChannelBuilder, ManagedChannelBuilder> channelConfigurator =
channelProvider.getChannelConfigurator();
channelProvider.setChannelConfigurator(
cb -> {
if (channelConfigurator != null) {
cb = channelConfigurator.apply(cb);
}
return cb.maxInboundMessageSize(1024 * 1024 * 500);
});

if (configuration.getBoolean(BIGTABLE_USE_PLAINTEXT_NEGOTIATION, false)) {
// Make sure to avoid clobbering the old Configurator
@SuppressWarnings("rawtypes")
Expand Down
2 changes: 1 addition & 1 deletion bigtable-client-core-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
<parent>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-client-parent</artifactId>
<version>2.18.2-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<version>2.18.4-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
</parent>

<artifactId>bigtable-client-core-parent</artifactId>
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# HBase Snapshot Import Helper Script Usage

This document describes the environment variables used by the `run-snapshot-import.sh` script to automate HBase snapshot imports into Cloud Bigtable using Dataflow.

## Environment Variables

The script relies on the following environment variables. You should set them before executing the script.

| Variable | Description | Example / Suggested Value |
| :--- | :--- | :--- |
| `PROJECT_ID` | The Google Cloud Project ID where the Bigtable instance and Dataflow jobs reside. | `your-project-id` |
| `INSTANCE_ID` | The Bigtable Instance ID to import data into. | `your-instance-id` |
| `BUCKET` | The GCS bucket name used for Dataflow staging, temp files, and default snapshot source path. | `your-gcs-bucket` |
| `REGION` | The GCP region to run the Dataflow jobs in. | `us-central1` |
| `TABLE_NAME` | The target Bigtable table name. | `your-table-name` |
| `SNAPSHOT_NAME` | The name of the HBase snapshot to import. | `your-snapshot-name` |
| `SNAPSHOT_SOURCE_DIR` | The GCS path where the HBase snapshot export is located. | `gs://your-gcs-bucket/snapshots` |
| `SERVICE_ACCOUNT` | The service account email to run the Dataflow jobs. | `your-service-account@developer.gserviceaccount.com` |
| `NUM_SHARDS` | The number of shards to split the import into for parallel processing. | `20` |
| `MAX_INFLIGHT_RPCS` | Maximum number of inflight RPCs for Bigtable client. | `100` |
| `BULK_MUTATION_CLOSE_TIMEOUT_MINUTES` | Timeout in minutes for closing bulk mutations. | `30` |
| `NETWORK` | VPC Network name for Dataflow workers. | `your-network` |
| `SUBNETWORK` | VPC Subnetwork name for Dataflow workers. | `regions/us-central1/subnetworks/your-subnetwork` |

## Usage

### Run a specific shard range
```bash
./run-snapshot-import.sh <start_shard> <end_shard>
```
Example: `./run-snapshot-import.sh 0 5`

### Run all shards (Auto-parallel mode)
```bash
./run-snapshot-import.sh --all
```
This mode will first run the restore step, and then launch background processes for all shards in parallel groups of 4 by default.

## Advanced Usage

### Manual Parallel Execution

To run shards in parallel groups (e.g., assuming 20 shards total), you can run multiple instances of this script.

> [!IMPORTANT]
> Because concurrent shards cannot delete or overwrite the restored snapshot directory simultaneously, **no shard** performs the restore step during a sharded run. You MUST run the restore step explicitly first!

Example for manual parallel execution:
```bash
# 1. Run the blocking restore step first!
./run-snapshot-import.sh --restore-only

# 2. Once the restore is complete, launch shards in parallel:
./run-snapshot-import.sh 0 3 &
./run-snapshot-import.sh 4 7 &
./run-snapshot-import.sh 8 11 &
./run-snapshot-import.sh 12 15 &
./run-snapshot-import.sh 16 19 &
```

## Troubleshooting

### JDK Compatibility

If you are running on a newer, unsupported JDK version (e.g. JDK 25+) and hit ByteBuddy errors, you can simply set the `JVM_OPTS` variable to `"-Dnet.bytebuddy.experimental=true"` in the Configurations section of the `run-snapshot-import.sh` script.
63 changes: 52 additions & 11 deletions bigtable-dataflow-parent/bigtable-beam-import/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
<parent>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-dataflow-parent</artifactId>
<version>2.18.2-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<version>2.18.4-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -39,6 +39,33 @@ limitations under the License.
<type>pom</type>
<scope>import</scope>
</dependency>

<!-- Version alignment -->
<!-- Mark all annotations as provided. They don't affect the runtime of the pipeline so
there is no need to try to version align them -->
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>3.31.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.18.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-annotations</artifactId>
<version>1.22</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -83,8 +110,9 @@ limitations under the License.
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>bigtable-hbase-beam</artifactId>
<version>2.18.2-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<version>2.18.4-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<exclusions>
<!-- Exclude hbase-shaded-client to prevent reintroducing the dnsjava SPI / LiteralByteString conflict (NoClassDefFoundError) -->
<exclusion>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-shaded-client</artifactId>
Expand All @@ -104,6 +132,7 @@ limitations under the License.
</dependency>


<!-- Use hbase-shaded-mapreduce (instead of hbase-shaded-client) to defeat the dnsjava SPI / LiteralByteString conflict (NoClassDefFoundError on JDK 21+) -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-shaded-mapreduce</artifactId>
Expand All @@ -118,6 +147,10 @@ limitations under the License.
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs-client</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-shaded-client</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -134,7 +167,11 @@ limitations under the License.
<artifactId>beam-runners-direct-java</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-shaded-testing-util</artifactId>
Expand All @@ -148,15 +185,10 @@ limitations under the License.
</exclusions>
</dependency>

<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-internal-test-helper</artifactId>
<version>2.18.2-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<version>2.18.4-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -186,7 +218,7 @@ limitations under the License.
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<artifactId>mockito-inline</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -221,6 +253,14 @@ limitations under the License.


<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>

<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
Expand Down Expand Up @@ -287,12 +327,13 @@ limitations under the License.
<filter>
<artifact>*:*</artifact>
<excludes>
<!-- Exclude InetAddressResolverProvider to prevent the dnsjava SPI / LiteralByteString conflict (NoClassDefFoundError on JDK 21+) -->
<exclude>META-INF/services/java.net.spi.InetAddressResolverProvider</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/**/pom.properties</exclude>
<exclude>META-INF/**/pom.xml</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/LICENSE</exclude>
<exclude>META-INF/NOTICE.txt</exclude>
<exclude>META-INF/NOTICE</exclude>
Expand Down
Loading