Repository: googleapis/java-bigtable-hbase
Pull request #3049 (2021-06-30 17:20:41)

chore(bigtable-1.x): release 1.22.1-SNAPSHOT
:robot: I have created a release \*beep\* \*boop\*
---
### Updating meta-information for bleeding-edge SNAPSHOT release.
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).


Patch:
diff --git a/bigtable-client-core-parent/bigtable-client-core/pom.xml b/bigtable-client-core-parent/bigtable-client-core/pom.xml
index 6c071182a..3c51e3246 100644
--- a/bigtable-client-core-parent/bigtable-client-core/pom.xml
+++ b/bigtable-client-core-parent/bigtable-client-core/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-client-core-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-client-core-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-core-parent:current} -->
   </parent>
 
   <artifactId>bigtable-client-core</artifactId>
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/BigtableOptions.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/BigtableOptions.java
index 98bdc9391..659f85e53 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/BigtableOptions.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/BigtableOptions.java
@@ -339,7 +339,7 @@ public class BigtableOptions implements Serializable, Cloneable {
 
         if (options.retryOptions.getMaxElapsedBackoffMillis()
             == RetryOptions.DEFAULT_MAX_ELAPSED_BACKOFF_MILLIS) {
-          retryOptionsBuilder.setMaxElapsedBackoffMillis((int) TimeUnit.MINUTES.toMillis(5));
+          retryOptionsBuilder.setMaxElapsedBackoffMillis((int) TimeUnit.MINUTES.toMillis(20));
         }
         options.retryOptions = retryOptionsBuilder.build();
       }
diff --git a/bigtable-client-core-parent/bigtable-hbase/pom.xml b/bigtable-client-core-parent/bigtable-hbase/pom.xml
index c75430c7d..06bf9faad 100644
--- a/bigtable-client-core-parent/bigtable-hbase/pom.xml
+++ b/bigtable-client-core-parent/bigtable-hbase/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-client-core-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-client-core-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-core-parent:current} -->
   </parent>
 
   <artifactId>bigtable-hbase</artifactId>
diff --git a/bigtable-client-core-parent/pom.xml b/bigtable-client-core-parent/pom.xml
index 72b8a2675..10c673090 100644
--- a/bigtable-client-core-parent/pom.xml
+++ b/bigtable-client-core-parent/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-client-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
   </parent>
 
   <artifactId>bigtable-client-core-parent</artifactId>
diff --git a/bigtable-dataflow-parent/bigtable-beam-import/pom.xml b/bigtable-dataflow-parent/bigtable-beam-import/pom.xml
index c84fa7ac6..256b9b613 100644
--- a/bigtable-dataflow-parent/bigtable-beam-import/pom.xml
+++ b/bigtable-dataflow-parent/bigtable-beam-import/pom.xml
@@ -18,7 +18,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-dataflow-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-dataflow-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-dataflow-parent:current} -->
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml b/bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml
index 5d793bc0a..3e6bfd3fa 100644
--- a/bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml
+++ b/bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml
@@ -16,7 +16,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-dataflow-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-dataflow-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-dataflow-parent:current} -->
   </parent>
 
   <artifactId>bigtable-hbase-beam</artifactId>
diff --git a/bigtable-dataflow-parent/pom.xml b/bigtable-dataflow-parent/pom.xml
index b79e45331..6f258a842 100644
--- a/bigtable-dataflow-parent/pom.xml
+++ b/bigtable-dataflow-parent/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-client-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-dataflow-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-dataflow-parent:current} -->
   </parent>
 
   <artifactId>bigtable-dataflow-parent</artifactId>
diff --git a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-benchmarks/pom.xml b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-benchmarks/pom.xml
index bea09cf0d..1ce0a297a 100644
--- a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-benchmarks/pom.xml
+++ b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-benchmarks/pom.xml
@@ -3,7 +3,7 @@
   <parent>
     <artifactId>bigtable-hbase-1.x-parent</artifactId>
     <groupId>com.google.cloud.bigtable</groupId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-hadoop/pom.xml b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-hadoop/pom.xml
index 856bf568f..5a7357435 100644
--- a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-hadoop/pom.xml
+++ b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-hadoop/pom.xml
@@ -18,7 +18,7 @@ limitations under the License.
   <parent>
     <artifactId>bigtable-hbase-1.x-parent</artifactId>
     <groupId>com.google.cloud.bigtable</groupId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-mapreduce/pom.xml b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-mapreduce/pom.xml
index 2808b48ce..dd28c7b54 100644
--- a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-mapreduce/pom.xml
+++ b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-mapreduce/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-hbase-1.x-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
   </parent>
 
   <artifactId>bigtable-hbase-1.x-mapreduce</artifactId>
diff --git a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-shaded/pom.xml b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-shaded/pom.xml
index 113c08a75..435a75c56 100644
--- a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-shaded/pom.xml
+++ b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-shaded/pom.xml
@@ -18,7 +18,7 @@ limitations under the License.
   <parent>
     <artifactId>bigtable-hbase-1.x-parent</artifactId>
     <groupId>com.google.cloud.bigtable</groupId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-tools/pom.xml b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-tools/pom.xml
index 1c64f98bc..6b11b4097 100644
--- a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-tools/pom.xml
+++ b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-tools/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <artifactId>bigtable-hbase-1.x-parent</artifactId>
     <groupId>com.google.cloud.bigtable</groupId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x/pom.xml b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x/pom.xml
index 79e6e2e1d..64bb6fdce 100644
--- a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x/pom.xml
+++ b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-hbase-1.x-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
   </parent>
 
   <artifactId>bigtable-hbase-1.x</artifactId>
diff --git a/bigtable-hbase-1.x-parent/pom.xml b/bigtable-hbase-1.x-parent/pom.xml
index 3bcb98a8b..c347764aa 100644
--- a/bigtable-hbase-1.x-parent/pom.xml
+++ b/bigtable-hbase-1.x-parent/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-client-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
   </parent>
 
   <artifactId>bigtable-hbase-1.x-parent</artifactId>
diff --git a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-hadoop/pom.xml b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-hadoop/pom.xml
index fe69b5e9c..a55e6db39 100644
--- a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-hadoop/pom.xml
+++ b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-hadoop/pom.xml
@@ -18,7 +18,7 @@ limitations under the License.
   <parent>
     <artifactId>bigtable-hbase-2.x-parent</artifactId>
     <groupId>com.google.cloud.bigtable</groupId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-2x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-2x-parent:current} -->
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-shaded/pom.xml b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-shaded/pom.xml
index d4ce31fc8..e7d430a34 100644
--- a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-shaded/pom.xml
+++ b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-shaded/pom.xml
@@ -18,7 +18,7 @@ limitations under the License.
   <parent>
     <artifactId>bigtable-hbase-2.x-parent</artifactId>
     <groupId>com.google.cloud.bigtable</groupId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-2x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-2x-parent:current} -->
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/pom.xml b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/pom.xml
index c002b1f53..8a68888e6 100644
--- a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/pom.xml
+++ b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-hbase-2.x-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-2x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-2x-parent:current} -->
   </parent>
 
   <properties>
diff --git a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncTableRegionLocator.java b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncTableRegionLocator.java
index f69eefa90..70fd76e2d 100644
--- a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncTableRegionLocator.java
+++ b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncTableRegionLocator.java
@@ -28,6 +28,7 @@ import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.AsyncTableRegionLocator;
 import org.apache.hadoop.hbase.client.RegionInfo;
 import org.apache.hadoop.hbase.client.RegionInfoBuilder;
+import org.apache.hadoop.hbase.util.Bytes;
 
 /**
  * Bigtable implementation of {@link AsyncTableRegionLocator}
@@ -37,7 +38,6 @@ import org.apache.hadoop.hbase.client.RegionInfoBuilder;
 @InternalApi("For internal usage only")
 public class BigtableAsyncTableRegionLocator extends AbstractBigtableRegionLocator
     implements AsyncTableRegionLocator {
-  HRegionLocation hRegionLocation = null;
 
   public BigtableAsyncTableRegionLocator(
       TableName tableName, BigtableOptions options, IBigtableDataClient client) {
@@ -52,16 +52,33 @@ public class BigtableAsyncTableRegionLocator extends AbstractBigtableRegionLocat
   @Override
   public CompletableFuture<HRegionLocation> getRegionLocation(byte[] row, boolean reload) {
     return FutureUtils.toCompletableFuture(getRegionsAsync(reload))
-        .thenApplyAsync(
-            result -> {
-              for (HRegionLocation region : result) {
-                if (region.getRegion().containsRow(row)) {
-                  hRegionLocation = region;
-                  break;
-                }
-              }
-              return hRegionLocation;
-            });
+        .thenApplyAsync(result -> findRegion(result, row));
+  }
+
+  private HRegionLocation findRegion(List<HRegionLocation> regions, byte[] row) {
+    int low = 0;
+    int high = regions.size() - 1;
+
+    while (low <= high) {
+      int mid = (low + high) >>> 1;
+      HRegionLocation regionLocation = regions.get(mid);
+      // TODO 2.x deprecated getRegionInfo() and returns a RegionInfo class instead of HRegionInfo.
+      // We could move this method to AbstractBigtableRegionLocator after making sure there's no
+      // compatibility issues.
+      RegionInfo regionInfo = regionLocation.getRegion();
+
+      // This isn't the last region (endKey != "") and row key is greater than the current bound
+      if (regionInfo.getEndKey().length > 0 && Bytes.compareTo(row, regionInfo.getEndKey()) >= 0) {
+        low = mid + 1;
+      } else if (Bytes.compareTo(row, regionInfo.getStartKey()) < 0) {
+        // no need to check empty key because it will compare naturally
+        high = mid - 1;
+      } else {
+        return regionLocation;
+      }
+    }
+    // Should never happen because the regions are contiguous
+    return null;
   }
 
   @Override
diff --git a/bigtable-hbase-2.x-parent/pom.xml b/bigtable-hbase-2.x-parent/pom.xml
index 5efa70575..c95031195 100644
--- a/bigtable-hbase-2.x-parent/pom.xml
+++ b/bigtable-hbase-2.x-parent/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-client-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
   </parent>
 
   <artifactId>bigtable-hbase-2.x-parent</artifactId>
diff --git a/pom.xml b/pom.xml
index f9cbabe35..0ceda09dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@ limitations under the License.
 
   <groupId>com.google.cloud.bigtable</groupId>
   <artifactId>bigtable-client-parent</artifactId>
-  <version>1.22.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
+  <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
   <packaging>pom</packaging>
   <name>${project.groupId}:${project.artifactId}</name>
   <url>https://cloud.google.com/bigtable/</url>
diff --git a/versions.txt b/versions.txt
index 2f1f2aa25..6a76c943c 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,9 +1,9 @@
 # Format:
 # module:released-version:current-version
 
-bigtable-client-parent:1.22.0:1.22.0
-bigtable-client-core-parent:1.22.0:1.22.0
-bigtable-hbase-1x-parent:1.22.0:1.22.0
-bigtable-hbase-2x-parent:1.22.0:1.22.0
-bigtable-dataflow-parent:1.22.0:1.22.0
-bigtable-test:1.22.0:1.22.0
+bigtable-client-parent:1.22.0:1.22.1-SNAPSHOT
+bigtable-client-core-parent:1.22.0:1.22.1-SNAPSHOT
+bigtable-hbase-1x-parent:1.22.0:1.22.1-SNAPSHOT
+bigtable-hbase-2x-parent:1.22.0:1.22.1-SNAPSHOT
+bigtable-dataflow-parent:1.22.0:1.22.1-SNAPSHOT
+bigtable-test:1.22.0:1.22.1-SNAPSHOT


Test patch:
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/config/TestBigtableOptions.java b/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/config/TestBigtableOptions.java
index 3fa5bd558..3ab1f9b3a 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/config/TestBigtableOptions.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/config/TestBigtableOptions.java
@@ -119,7 +119,7 @@ public class TestBigtableOptions {
     Assert.assertTrue(options.useCachedChannel());
     Assert.assertEquals(BigtableOptions.BIGTABLE_BATCH_DATA_HOST_DEFAULT, options.getDataHost());
     Assert.assertEquals(5000, options.getRetryOptions().getInitialBackoffMillis());
-    Assert.assertEquals(300_000, options.getRetryOptions().getMaxElapsedBackoffMillis());
+    Assert.assertEquals(1_200_000, options.getRetryOptions().getMaxElapsedBackoffMillis());
   }
 
   @Test
@@ -129,7 +129,7 @@ public class TestBigtableOptions {
     Assert.assertTrue(options.useCachedChannel());
     Assert.assertEquals(host, options.getDataHost());
     Assert.assertEquals(5000, options.getRetryOptions().getInitialBackoffMillis());
-    Assert.assertEquals(300_000, options.getRetryOptions().getMaxElapsedBackoffMillis());
+    Assert.assertEquals(1_200_000, options.getRetryOptions().getMaxElapsedBackoffMillis());
   }
 
   /**
diff --git a/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/pom.xml b/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/pom.xml
index 99b8c7b5a..b036f2775 100644
--- a/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/pom.xml
+++ b/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/pom.xml
@@ -19,7 +19,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-client-core-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-client-core-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-core-parent:current} -->
   </parent>
 
   <artifactId>bigtable-hbase-integration-tests-common</artifactId>
diff --git a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-integration-tests/pom.xml b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-integration-tests/pom.xml
index 78b85afc3..4ea3dcaf6 100644
--- a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-integration-tests/pom.xml
+++ b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-integration-tests/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-hbase-1.x-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-1x-parent:current} -->
   </parent>
 
   <artifactId>bigtable-hbase-1.x-integration-tests</artifactId>
diff --git a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-integration-tests/pom.xml b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-integration-tests/pom.xml
index 46dbf229e..70ef668a5 100644
--- a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-integration-tests/pom.xml
+++ b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-integration-tests/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>com.google.cloud.bigtable</groupId>
     <artifactId>bigtable-hbase-2.x-parent</artifactId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-hbase-2x-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-hbase-2x-parent:current} -->
   </parent>
 
   <artifactId>bigtable-hbase-2.x-integration-tests</artifactId>
diff --git a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/test/java/com/google/cloud/bigtable/hbase2_x/TestBigtableAsyncTableRegionLocator.java b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/test/java/com/google/cloud/bigtable/hbase2_x/TestBigtableAsyncTableRegionLocator.java
new file mode 100644
index 000000000..4b7c3fb17
--- /dev/null
+++ b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/test/java/com/google/cloud/bigtable/hbase2_x/TestBigtableAsyncTableRegionLocator.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.bigtable.hbase2_x;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.when;
+
+import com.google.api.core.ApiFutures;
+import com.google.cloud.bigtable.core.IBigtableDataClient;
+import com.google.cloud.bigtable.data.v2.models.KeyOffset;
+import com.google.cloud.bigtable.hbase.BigtableOptionsFactory;
+import com.google.common.collect.ImmutableList;
+import com.google.protobuf.ByteString;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HRegionLocation;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+
+@RunWith(JUnit4.class)
+public class TestBigtableAsyncTableRegionLocator {
+
+  @Rule public final MockitoRule mockitoRule = MockitoJUnit.rule();
+
+  private static final TableName TABLE_NAME = TableName.valueOf("fake-table-name");
+
+  @Mock private IBigtableDataClient mockDataClient;
+
+  private BigtableAsyncTableRegionLocator regionLocator;
+
+  @Before
+  public void setUp() throws IOException {
+    Configuration configuration = new Configuration(false);
+    configuration.set(BigtableOptionsFactory.PROJECT_ID_KEY, "fake-project-id");
+    configuration.set(BigtableOptionsFactory.INSTANCE_ID_KEY, "fake-instance-id");
+    configuration.set(BigtableOptionsFactory.BIGTABLE_HOST_KEY, "localhost");
+    configuration.set(BigtableOptionsFactory.BIGTABLE_ADMIN_HOST_KEY, "localhost");
+    configuration.set(BigtableOptionsFactory.BIGTABLE_NULL_CREDENTIAL_ENABLE_KEY, "true");
+    configuration.set(BigtableOptionsFactory.BIGTABLE_DATA_CHANNEL_COUNT_KEY, "1");
+    regionLocator =
+        new BigtableAsyncTableRegionLocator(
+            TABLE_NAME, BigtableOptionsFactory.fromConfiguration(configuration), mockDataClient);
+  }
+
+  @Test
+  public void testGetRegionLocation() throws ExecutionException, InterruptedException {
+    List<KeyOffset> keyOffsets =
+        ImmutableList.of(
+            KeyOffset.create(ByteString.copyFromUtf8("a"), 100L),
+            KeyOffset.create(ByteString.copyFromUtf8("b"), 100L),
+            KeyOffset.create(ByteString.copyFromUtf8("y"), 100L),
+            KeyOffset.create(ByteString.copyFromUtf8("z"), 100L));
+    when(mockDataClient.sampleRowKeysAsync(TABLE_NAME.getNameAsString()))
+        .thenReturn(ApiFutures.immediateFuture(keyOffsets));
+
+    HRegionLocation regionLocationFuture =
+        regionLocator.getRegionLocation(Bytes.toBytes("rowKey"), 1, false).get();
+    assertEquals("b", Bytes.toString(regionLocationFuture.getRegion().getStartKey()));
+    assertEquals("y", Bytes.toString(regionLocationFuture.getRegion().getEndKey()));
+
+    assertEquals(TABLE_NAME, regionLocator.getName());
+
+    regionLocationFuture = regionLocator.getRegionLocation(Bytes.toBytes("1")).get();
+    assertEquals("", Bytes.toString(regionLocationFuture.getRegion().getStartKey()));
+    assertEquals("a", Bytes.toString(regionLocationFuture.getRegion().getEndKey()));
+
+    regionLocationFuture = regionLocator.getRegionLocation(Bytes.toBytes("a")).get();
+    assertEquals("a", Bytes.toString(regionLocationFuture.getRegion().getStartKey()));
+    assertEquals("b", Bytes.toString(regionLocationFuture.getRegion().getEndKey()));
+
+    regionLocationFuture = regionLocator.getRegionLocation(Bytes.toBytes("z")).get();
+    assertEquals("z", Bytes.toString(regionLocationFuture.getRegion().getStartKey()));
+    assertEquals("", Bytes.toString(regionLocationFuture.getRegion().getEndKey()));
+
+    regionLocationFuture = regionLocator.getRegionLocation(Bytes.toBytes("zzz")).get();
+    assertEquals("z", Bytes.toString(regionLocationFuture.getRegion().getStartKey()));
+    assertEquals("", Bytes.toString(regionLocationFuture.getRegion().getEndKey()));
+  }
+}
diff --git a/bigtable-test/bigtable-emulator-maven-plugin/pom.xml b/bigtable-test/bigtable-emulator-maven-plugin/pom.xml
index 0da0ffa0b..4da4715a2 100644
--- a/bigtable-test/bigtable-emulator-maven-plugin/pom.xml
+++ b/bigtable-test/bigtable-emulator-maven-plugin/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <artifactId>bigtable-test</artifactId>
     <groupId>com.google.cloud.bigtable</groupId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-test:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-test:current} -->
   </parent>
 
 
diff --git a/bigtable-test/pom.xml b/bigtable-test/pom.xml
index 14168d051..0eab2f863 100644
--- a/bigtable-test/pom.xml
+++ b/bigtable-test/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <artifactId>bigtable-client-parent</artifactId>
     <groupId>com.google.cloud.bigtable</groupId>
-    <version>1.22.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
+    <version>1.22.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
   </parent>
 
   <artifactId>bigtable-test</artifactId>