Repository: googleapis/java-bigtable-hbase
Pull request #2221 (2019-08-19 21:38:32)

Update dependency org.apache.maven.plugins:maven-invoker-plugin to v3
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| org.apache.maven.plugins:maven-invoker-plugin | major | `1.10` -> `3.2.0` |

---

### Renovate configuration

:date: **Schedule**: At any time (no schedule defined).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with "`rebase!`".

:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- renovate-rebase -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#googleapis/java-bigtable-hbase).


Patch:
diff --git a/bigtable-client-core-parent/bigtable-client-core/pom.xml b/bigtable-client-core-parent/bigtable-client-core/pom.xml
index 172f7ab38..6c2c43653 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>bigtable-client-core</artifactId>
@@ -185,6 +185,14 @@ limitations under the License.
             <version>${dropwizard.metrics.version}</version>
         </dependency>
 
+        <!--  TODO: remove this dependency when upgraded through transitive dependency (http-client -> org.apache.httpcomponents:httpclient)
+        this is not used directly, but upgrading due to transitive vulnerabilities in older versions-->
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>1.13</version>
+        </dependency>
+
         <!-- Test -->
         <dependency>
             <groupId>junit</groupId>
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBigtableDataClient.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBigtableDataClient.java
index 7779674d7..533393f94 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBigtableDataClient.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBigtableDataClient.java
@@ -16,6 +16,7 @@
 package com.google.cloud.bigtable.core;
 
 import com.google.api.core.ApiFuture;
+import com.google.api.core.InternalApi;
 import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation;
 import com.google.cloud.bigtable.data.v2.models.KeyOffset;
 import com.google.cloud.bigtable.data.v2.models.Query;
@@ -31,6 +32,7 @@ import java.util.List;
  * Interface to wrap {@link com.google.cloud.bigtable.grpc.BigtableDataClient} with
  * Google-Cloud-java's models.
  */
+@InternalApi("For internal usage only")
 public interface IBigtableDataClient {
 
   /**
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBigtableTableAdminClient.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBigtableTableAdminClient.java
index 1d969425e..34e81f0c1 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBigtableTableAdminClient.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBigtableTableAdminClient.java
@@ -16,6 +16,7 @@
 package com.google.cloud.bigtable.core;
 
 import com.google.api.core.ApiFuture;
+import com.google.api.core.InternalApi;
 import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest;
 import com.google.bigtable.admin.v2.DeleteSnapshotRequest;
 import com.google.bigtable.admin.v2.GetSnapshotRequest;
@@ -33,6 +34,7 @@ import java.util.List;
  * Interface to wrap {@link com.google.cloud.bigtable.grpc.BigtableTableAdminClient} with
  * Google-Cloud-java's models.
  */
+@InternalApi("For internal usage only")
 public interface IBigtableTableAdminClient {
 
   /**
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBulkMutation.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBulkMutation.java
index 639ff056f..6b313ab34 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBulkMutation.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/core/IBulkMutation.java
@@ -16,12 +16,15 @@
 package com.google.cloud.bigtable.core;
 
 import com.google.api.core.ApiFuture;
+import com.google.api.core.InternalApi;
 import com.google.cloud.bigtable.data.v2.models.RowMutation;
+import java.io.IOException;
 
 /**
  * Interface to support batching multiple {@link RowMutation} request into a single grpc request.
  */
-public interface IBulkMutation {
+@InternalApi("For internal usage only")
+public interface IBulkMutation extends AutoCloseable {
 
   /**
    * Adds a {@link RowMutation} to the underlying IBulkMutation mechanism.
@@ -38,6 +41,7 @@ public interface IBulkMutation {
   /** Sends any outstanding {@link RowMutation} and wait until all requests are complete. */
   void flush() throws InterruptedException;
 
-  /** @return false if there is any outstanding {@link RowMutation} that still needs to be sent. */
-  boolean isFlushed();
+  /** Closes this bulk Mutation and prevents from mutating any more elements */
+  @Override
+  void close() throws IOException;
 }
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableDataGCJClient.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableDataGCJClient.java
index dabe14fb5..1c78589b9 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableDataGCJClient.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableDataGCJClient.java
@@ -16,6 +16,7 @@
 package com.google.cloud.bigtable.grpc;
 
 import com.google.api.core.ApiFuture;
+import com.google.api.core.InternalApi;
 import com.google.api.gax.rpc.ServerStream;
 import com.google.api.gax.rpc.StateCheckingResponseObserver;
 import com.google.api.gax.rpc.StreamController;
@@ -37,9 +38,10 @@ import io.grpc.stub.StreamObserver;
 import java.util.List;
 
 /**
- * This class implements existing {@link com.google.cloud.bigtable.core.IBigtableDataClient}
- * operations with Google-cloud-java's {@link com.google.cloud.bigtable.data.v2.BigtableDataClient}.
+ * This class implements existing {@link IBigtableDataClient} operations with Google-cloud-java's
+ * {@link com.google.cloud.bigtable.data.v2.BigtableDataClient}.
  */
+@InternalApi("For internal usage only")
 public class BigtableDataGCJClient implements IBigtableDataClient, AutoCloseable {
 
   private final BigtableDataClient delegate;
@@ -136,8 +138,6 @@ public class BigtableDataGCJClient implements IBigtableDataClient, AutoCloseable
   /**
    * To wrap stream of native CBT client's {@link StreamObserver} onto GCJ {@link
    * com.google.api.gax.rpc.ResponseObserver}.
-   *
-   * <p>Note:Inspired from {@link com.google.api.gax.rpc.ApiStreamObserverAdapter} of GCJ.
    */
   private static class StreamObserverAdapter<T> extends StateCheckingResponseObserver<T> {
     private final StreamObserver<T> delegate;
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableSession.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableSession.java
index a7c88af98..66193f2e7 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableSession.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableSession.java
@@ -18,6 +18,7 @@ package com.google.cloud.bigtable.grpc;
 
 import com.google.api.client.util.Clock;
 import com.google.api.client.util.Strings;
+import com.google.api.core.InternalApi;
 import com.google.api.gax.grpc.GaxGrpcProperties;
 import com.google.api.gax.rpc.ApiClientHeaderProvider;
 import com.google.bigtable.admin.v2.ListClustersResponse;
@@ -215,8 +216,8 @@ public class BigtableSession implements Closeable {
   /**
    * Constructor for BigtableSession.
    *
-   * @param opts a {@link com.google.cloud.bigtable.config.BigtableOptions} object.
-   * @throws java.io.IOException if any.
+   * @param opts a {@link BigtableOptions} object.
+   * @throws IOException if any.
    */
   public BigtableSession(BigtableOptions opts) throws IOException {
     this.options = opts;
@@ -389,7 +390,7 @@ public class BigtableSession implements Closeable {
   /**
    * Getter for the field <code>dataClient</code>.
    *
-   * @return a {@link com.google.cloud.bigtable.grpc.BigtableDataClient} object.
+   * @return a {@link BigtableDataClient} object.
    */
   public BigtableDataClient getDataClient() {
     return dataClient;
@@ -400,6 +401,7 @@ public class BigtableSession implements Closeable {
    *
    * @return a {@link IBigtableDataClient} object.
    */
+  @InternalApi("For internal usage only")
   public IBigtableDataClient getDataClientWrapper() {
     if (options.useGCJClient()) {
       return dataGCJClient;
@@ -411,8 +413,8 @@ public class BigtableSession implements Closeable {
   /**
    * createBulkMutation.
    *
-   * @param tableName a {@link com.google.cloud.bigtable.grpc.BigtableTableName} object.
-   * @return a {@link com.google.cloud.bigtable.grpc.async.BulkMutation} object.
+   * @param tableName a {@link BigtableTableName} object.
+   * @return a {@link BulkMutation} object.
    */
   public BulkMutation createBulkMutation(BigtableTableName tableName) {
     if (options.useGCJClient()) {
@@ -431,6 +433,7 @@ public class BigtableSession implements Closeable {
    * @param tableName a {@link BigtableTableName} object.
    * @return a {@link IBigtableDataClient} object.
    */
+  @InternalApi("For internal usage only")
   public IBulkMutation createBulkMutationWrapper(BigtableTableName tableName) {
     if (options.useGCJClient()) {
       return getDataClientWrapper().createBulkMutationBatcher();
@@ -442,8 +445,8 @@ public class BigtableSession implements Closeable {
   /**
    * createBulkRead.
    *
-   * @param tableName a {@link com.google.cloud.bigtable.grpc.BigtableTableName} object.
-   * @return a {@link com.google.cloud.bigtable.grpc.async.BulkRead} object.
+   * @param tableName a {@link BigtableTableName} object.
+   * @return a {@link BulkRead} object.
    */
   public BulkRead createBulkRead(BigtableTableName tableName) {
     return new BulkRead(
@@ -456,11 +459,9 @@ public class BigtableSession implements Closeable {
   /**
    * Getter for the field <code>tableAdminClient</code>.
    *
-   * @deprecated Please use {@link #getTableAdminClientWrapper()}.
-   * @return a {@link com.google.cloud.bigtable.grpc.BigtableTableAdminClient} object.
-   * @throws java.io.IOException if any.
+   * @return a {@link BigtableTableAdminClient} object.
+   * @throws IOException if any.
    */
-  @Deprecated
   public synchronized BigtableTableAdminClient getTableAdminClient() throws IOException {
     if (tableAdminClient == null) {
       ManagedChannel channel = createManagedPool(options.getAdminHost(), 1);
@@ -476,8 +477,9 @@ public class BigtableSession implements Closeable {
    * BigtableOptions}.
    *
    * @return a {@link BigtableTableAdminClientWrapper} object.
-   * @throws java.io.IOException if any.
+   * @throws IOException if any.
    */
+  @InternalApi("For internal usage only")
   public synchronized IBigtableTableAdminClient getTableAdminClientWrapper() throws IOException {
     if (options.useGCJClient()) {
       if (adminGCJClient == null) {
@@ -498,8 +500,8 @@ public class BigtableSession implements Closeable {
   /**
    * Getter for the field <code>instanceAdminClient</code>.
    *
-   * @return a {@link com.google.cloud.bigtable.grpc.BigtableInstanceClient} object.
-   * @throws java.io.IOException if any.
+   * @return a {@link BigtableInstanceClient} object.
+   * @throws IOException if any.
    */
   public synchronized BigtableInstanceClient getInstanceAdminClient() throws IOException {
     if (instanceAdminClient == null) {
@@ -510,11 +512,11 @@ public class BigtableSession implements Closeable {
   }
 
   /**
-   * Create a new {@link com.google.cloud.bigtable.grpc.io.ChannelPool}, with auth headers.
+   * Create a new {@link ChannelPool}, with auth headers.
    *
-   * @param hostString a {@link java.lang.String} object.
-   * @return a {@link com.google.cloud.bigtable.grpc.io.ChannelPool} object.
-   * @throws java.io.IOException if any.
+   * @param hostString a {@link String} object.
+   * @return a {@link ChannelPool} object.
+   * @throws IOException if any.
    */
   protected ManagedChannel createChannelPool(final String hostString, int count)
       throws IOException {
@@ -531,13 +533,13 @@ public class BigtableSession implements Closeable {
   }
 
   /**
-   * Create a new {@link com.google.cloud.bigtable.grpc.io.ChannelPool}, with auth headers. This
-   * method allows users to override the default implementation with their own.
+   * Create a new {@link ChannelPool}, with auth headers. This method allows users to override the
+   * default implementation with their own.
    *
    * @param channelFactory a {@link ChannelPool.ChannelFactory} object.
    * @param count The number of channels in the pool.
-   * @return a {@link com.google.cloud.bigtable.grpc.io.ChannelPool} object.
-   * @throws java.io.IOException if any.
+   * @return a {@link ChannelPool} object.
+   * @throws IOException if any.
    */
   protected ManagedChannel createChannelPool(
       final ChannelPool.ChannelFactory channelFactory, int count) throws IOException {
@@ -545,12 +547,12 @@ public class BigtableSession implements Closeable {
   }
 
   /**
-   * Create a new {@link com.google.cloud.bigtable.grpc.io.ChannelPool}, with auth headers, that
-   * will be cleaned up when the connection closes.
+   * Create a new {@link ChannelPool}, with auth headers, that will be cleaned up when the
+   * connection closes.
    *
-   * @param host a {@link java.lang.String} object.
-   * @return a {@link com.google.cloud.bigtable.grpc.io.ChannelPool} object.
-   * @throws java.io.IOException if any.
+   * @param host a {@link String} object.
+   * @return a {@link ChannelPool} object.
+   * @throws IOException if any.
    */
   protected ManagedChannel createManagedPool(String host, int channelCount) throws IOException {
     ManagedChannel channelPool = createChannelPool(host, channelCount);
@@ -574,7 +576,7 @@ public class BigtableSession implements Closeable {
   }
 
   /**
-   * Create a new {@link com.google.cloud.bigtable.grpc.io.ChannelPool}, with auth headers.
+   * Create a new {@link ChannelPool}, with auth headers.
    *
    * @param host a {@link String} object.
    * @param options a {@link BigtableOptions} object.
@@ -588,7 +590,7 @@ public class BigtableSession implements Closeable {
   }
 
   /**
-   * Create a new {@link com.google.cloud.bigtable.grpc.io.ChannelPool}, with auth headers.
+   * Create a new {@link ChannelPool}, with auth headers.
    *
    * @param host a {@link String} object specifying the host to connect to.
    * @param options a {@link BigtableOptions} object with the credentials, retry and other
@@ -722,7 +724,7 @@ public class BigtableSession implements Closeable {
   /**
    * Getter for the field <code>options</code>.
    *
-   * @return a {@link com.google.cloud.bigtable.config.BigtableOptions} object.
+   * @return a {@link BigtableOptions} object.
    */
   public BigtableOptions getOptions() {
     return this.options;
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableTableAdminGCJClient.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableTableAdminGCJClient.java
index 83389791e..3142bb8a9 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableTableAdminGCJClient.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableTableAdminGCJClient.java
@@ -20,6 +20,7 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
 import com.google.api.core.ApiFunction;
 import com.google.api.core.ApiFuture;
 import com.google.api.core.ApiFutures;
+import com.google.api.core.InternalApi;
 import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest;
 import com.google.bigtable.admin.v2.DeleteSnapshotRequest;
 import com.google.bigtable.admin.v2.GetSnapshotRequest;
@@ -42,6 +43,7 @@ import javax.annotation.Nonnull;
  * This class implements existing {@link IBigtableTableAdminClient} operations with
  * Google-cloud-java's {@link BigtableTableAdminClient} & {@link BaseBigtableTableAdminClient}.
  */
+@InternalApi("For internal usage only")
 public class BigtableTableAdminGCJClient implements IBigtableTableAdminClient, AutoCloseable {
 
   private final BigtableTableAdminClient delegate;
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutation.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutation.java
index ce76eec50..36fcd09a8 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutation.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutation.java
@@ -416,7 +416,6 @@ public class BulkMutation {
               entry.getMutationsCount(),
               MAX_NUMBER_OF_MUTATIONS));
     }
-    ;
 
     boolean didSend = false;
     if (currentBatch != null && currentBatch.wouldBeFull(entry)) {
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutationGCJClient.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutationGCJClient.java
index 72f3d6af2..2c83769a7 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutationGCJClient.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutationGCJClient.java
@@ -16,6 +16,7 @@
 package com.google.cloud.bigtable.grpc.async;
 
 import com.google.api.core.ApiFuture;
+import com.google.api.core.InternalApi;
 import com.google.cloud.bigtable.config.Logger;
 import com.google.cloud.bigtable.core.IBulkMutation;
 import com.google.cloud.bigtable.data.v2.models.BulkMutationBatcher;
@@ -23,14 +24,17 @@ import com.google.cloud.bigtable.data.v2.models.BulkMutationBatcher.BulkMutation
 import com.google.cloud.bigtable.data.v2.models.RowMutation;
 import com.google.cloud.bigtable.util.ApiFutureUtil;
 import com.google.common.base.Preconditions;
+import java.io.IOException;
+import java.util.concurrent.TimeoutException;
 
 /**
  * This class is meant to replicate existing {@link BulkMutation} while translating calls to
  * Google-Cloud-Java's {@link BulkMutationBatcher} api.
  */
+@InternalApi("For internal usage only")
 public class BulkMutationGCJClient implements IBulkMutation {
 
-  private static Logger LOG = new Logger(BulkMutation.class);
+  private static Logger LOG = new Logger(BulkMutationGCJClient.class);
 
   private final BulkMutationBatcher bulkMutateBatcher;
   private final OperationAccountant operationAccountant;
@@ -65,9 +69,12 @@ public class BulkMutationGCJClient implements IBulkMutation {
     }
   }
 
-  /** {@inheritDoc} */
   @Override
-  public boolean isFlushed() {
-    return !operationAccountant.hasInflightOperations();
+  public void close() throws IOException {
+    try {
+      bulkMutateBatcher.close();
+    } catch (InterruptedException | TimeoutException e) {
+      throw new IOException("Could not close the bulk mutation Batcher", e);
+    }
   }
 }
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutationWrapper.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutationWrapper.java
index 2dd6d3a42..97fbfe3d3 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutationWrapper.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkMutationWrapper.java
@@ -22,12 +22,15 @@ import com.google.cloud.bigtable.data.v2.internal.RequestContext;
 import com.google.cloud.bigtable.data.v2.models.RowMutation;
 import com.google.cloud.bigtable.util.ApiFutureUtil;
 import com.google.common.base.Function;
+import com.google.common.base.Preconditions;
+import java.io.IOException;
 
 /** This class wraps existing {@link BulkMutation} with Google-cloud-java's model. */
 public class BulkMutationWrapper implements IBulkMutation {
 
   private final BulkMutation delegate;
   private final RequestContext requestContext;
+  private boolean isClosed;
 
   public BulkMutationWrapper(BulkMutation bulkMutation, RequestContext requestContext) {
     this.delegate = bulkMutation;
@@ -37,6 +40,7 @@ public class BulkMutationWrapper implements IBulkMutation {
   /** {@inheritDoc} */
   @Override
   public ApiFuture<Void> add(RowMutation rowMutation) {
+    Preconditions.checkState(!isClosed, "can't mutate when the bulk mutation is closed.");
     return ApiFutureUtil.transformAndAdapt(
         delegate.add(rowMutation.toBulkProto(requestContext).getEntries(0)),
         new Function<MutateRowResponse, Void>() {
@@ -59,9 +63,8 @@ public class BulkMutationWrapper implements IBulkMutation {
     delegate.flush();
   }
 
-  /** {@inheritDoc} */
   @Override
-  public boolean isFlushed() {
-    return delegate.isFlushed();
+  public void close() throws IOException {
+    isClosed = true;
   }
 }
diff --git a/bigtable-client-core-parent/bigtable-hbase/pom.xml b/bigtable-client-core-parent/bigtable-hbase/pom.xml
index b5eb03a70..138b86313 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>bigtable-hbase</artifactId>
diff --git a/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableBufferedMutator.java b/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableBufferedMutator.java
index 233182697..6e33fc56f 100644
--- a/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableBufferedMutator.java
+++ b/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableBufferedMutator.java
@@ -148,15 +148,6 @@ public class BigtableBufferedMutator implements BufferedMutator {
     ApiFutures.addCallback(future, new ExceptionCallback(mutation), MoreExecutors.directExecutor());
   }
 
-  /**
-   * hasInflightRequests.
-   *
-   * @return a boolean.
-   */
-  public boolean hasInflightRequests() {
-    return helper.hasInflightRequests();
-  }
-
   /**
    * Create a {@link RetriesExhaustedWithDetailsException} if there were any async exceptions and
    * send it to the {@link org.apache.hadoop.hbase.client.BufferedMutator.ExceptionListener}.
diff --git a/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableBufferedMutatorHelper.java b/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableBufferedMutatorHelper.java
index c99e58a8d..ea2f51168 100644
--- a/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableBufferedMutatorHelper.java
+++ b/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableBufferedMutatorHelper.java
@@ -93,6 +93,7 @@ public class BigtableBufferedMutatorHelper {
     closedWriteLock.lock();
     try {
       flush();
+      bulkMutation.close();
       closed = true;
     } finally {
       closedWriteLock.unlock();
@@ -222,15 +223,4 @@ public class BigtableBufferedMutatorHelper {
     }
     return future;
   }
-
-  /**
-   * hasInflightRequests.
-   *
-   * @return a boolean.
-   */
-  public boolean hasInflightRequests() {
-    return bulkMutation != null
-        && !bulkMutation.isFlushed()
-        && operationAccountant.hasInflightOperations();
-  }
 }
diff --git a/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/HBaseRequestAdapter.java b/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/HBaseRequestAdapter.java
index c81446d7a..64f36b512 100644
--- a/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/HBaseRequestAdapter.java
+++ b/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/HBaseRequestAdapter.java
@@ -319,15 +319,6 @@ public class HBaseRequestAdapter {
     return tableName;
   }
 
-  /**
-   * getTableNameString.
-   *
-   * @return a {@link java.lang.String} object.
-   */
-  protected String getTableNameString() {
-    return getBigtableTableName().toString();
-  }
-
   private RowMutation newRowMutationModel(byte[] rowKey) {
     if (!mutationAdapters.putAdapter.isSetClientTimestamp()) {
       return RowMutation.create(
diff --git a/bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableConnection.java b/bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableConnection.java
index 2657986fd..64b4dbc02 100644
--- a/bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableConnection.java
+++ b/bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableConnection.java
@@ -29,15 +29,11 @@ import com.google.cloud.bigtable.hbase.adapters.SampledRowKeysAdapter;
 import com.google.common.base.MoreObjects;
 import java.io.Closeable;
 import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.CopyOnWriteArraySet;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.TableName;
@@ -52,29 +48,8 @@ import org.apache.hadoop.hbase.security.User;
  */
 public abstract class AbstractBigtableConnection
     implements Connection, CommonConnection, Closeable {
-  private static final AtomicLong SEQUENCE_GENERATOR = new AtomicLong();
-  private static final Map<Long, BigtableBufferedMutator> ACTIVE_BUFFERED_MUTATORS =
-      Collections.synchronizedMap(new HashMap<Long, BigtableBufferedMutator>());
 
   static {
-    Runnable shutDownRunnable =
-        new Runnable() {
-          @Override
-          public void run() {
-            for (BigtableBufferedMutator bbm : ACTIVE_BUFFERED_MUTATORS.values()) {
-              if (bbm.hasInflightRequests()) {
-                int size = ACTIVE_BUFFERED_MUTATORS.size();
-                new Logger(AbstractBigtableConnection.class)
-                    .warn(
-                        "Shutdown is commencing and you have open %d buffered mutators."
-                            + "You need to close() or flush() them so that is not lost",
-                        size);
-                break;
-              }
-            }
-          }
-        };
-    Runtime.getRuntime().addShutdownHook(new Thread(shutDownRunnable));
 
     // Force the loading of HConstants.class, which shares a bi-directional reference with KeyValue.
     // This bi-directional relationship causes problems when KeyValue and HConstants are class
@@ -171,23 +146,9 @@ public abstract class AbstractBigtableConnection
       throw new IllegalArgumentException("TableName cannot be null.");
     }
 
-    final long id = SEQUENCE_GENERATOR.incrementAndGet();
-
     HBaseRequestAdapter adapter = createAdapter(tableName);
     ExceptionListener listener = params.getListener();
-    BigtableBufferedMutator bigtableBufferedMutator =
-        new BigtableBufferedMutator(adapter, conf, session, listener) {
-          @Override
-          public void close() throws IOException {
-            try {
-              super.close();
-            } finally {
-              ACTIVE_BUFFERED_MUTATORS.remove(id);
-            }
-          }
-        };
-    ACTIVE_BUFFERED_MUTATORS.put(id, bigtableBufferedMutator);
-    return bigtableBufferedMutator;
+    return new BigtableBufferedMutator(adapter, conf, session, listener);
   }
 
   public HBaseRequestAdapter createAdapter(TableName tableName) {
diff --git a/bigtable-client-core-parent/pom.xml b/bigtable-client-core-parent/pom.xml
index 0147534e8..e8ef736fe 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </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 e5575feef..b90096186 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.12.1-SNAPSHOT</version>
+    <version>1.12.2-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
@@ -60,12 +60,25 @@ limitations under the License.
       <version>${beam.version}</version>
     </dependency>
 
+    <!-- TODO: check if commons-codec was transitively updated to 1.13 and okhttp was updated to 2.7.5 when upgrading-->
     <dependency>
       <groupId>org.apache.beam</groupId>
       <artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
       <version>${beam.version}</version>
     </dependency>
 
+    <!-- TODO: remove these dependencies when upgraded through transitive dependency (beam-runners-google-cloud-dataflow-java)
+        these are not used directly, but upgrading due to transitive vulnerabilities in older versions-->
+    <dependency>
+      <groupId>commons-codec</groupId>
+      <artifactId>commons-codec</artifactId>
+      <version>1.13</version>
+    </dependency>
+    <dependency>
+      <groupId>com.squareup.okhttp</groupId>
+      <artifactId>okhttp</artifactId>
+      <version>2.7.5</version>
+    </dependency>
 
     <!-- Test -->
     <dependency>
diff --git a/bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml b/bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml
index 38a822b4e..7ef2b2e61 100755
--- 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>bigtable-hbase-beam</artifactId>
@@ -27,6 +27,7 @@ limitations under the License.
     </description>
 
     <dependencies>
+        <!-- TODO: check if commons-compress is transitively updated to 1.18 when upgrading this so we can remove-->
         <dependency>
             <groupId>org.apache.beam</groupId>
             <artifactId>beam-sdks-java-core</artifactId>
@@ -59,6 +60,15 @@ limitations under the License.
             </exclusions>
 
         </dependency>
+
+        <!--  TODO: remove this dependency when upgraded through transitive dependency (beam-sdks-java-core)
+          this is not used directly, but upgrading due to transitive vulnerabilities in older versions-->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-compress</artifactId>
+            <version>1.19</version>
+        </dependency>
+
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
diff --git a/bigtable-dataflow-parent/pom.xml b/bigtable-dataflow-parent/pom.xml
index 8db0b8a6e..00f4c41d6 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>bigtable-dataflow-parent</artifactId>
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 141254032..0cc9992d6 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.12.1-SNAPSHOT</version>
+    <version>1.12.2-SNAPSHOT</version>
   </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 f831ccc34..7f9175f33 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>bigtable-hbase-1.x-mapreduce</artifactId>
@@ -33,7 +33,7 @@ limitations under the License.
     </description>
 
     <properties>
-        <hadoop.version>2.7.3</hadoop.version>
+        <hadoop.version>2.9.2</hadoop.version>
         <hadoop.scope>provided</hadoop.scope>
     </properties>
 
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 5583bb9d6..345b59d8d 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.12.1-SNAPSHOT</version>
+    <version>1.12.2-SNAPSHOT</version>
   </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 6fad447e9..bc1ef6df9 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.12.1-SNAPSHOT</version>
+    <version>1.12.2-SNAPSHOT</version>
   </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 07b645849..71512a45b 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </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 6f833b263..2a78a403d 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.12.1-SNAPSHOT</version>
+    <version>1.12.2-SNAPSHOT</version>
   </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 674a06d9b..4a0cad879 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.12.1-SNAPSHOT</version>
+    <version>1.12.2-SNAPSHOT</version>
   </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 f23ded2bc..db9edff4a 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.12.1-SNAPSHOT</version>
+    <version>1.12.2-SNAPSHOT</version>
   </parent>
 
   <properties>
diff --git a/bigtable-hbase-2.x-parent/pom.xml b/bigtable-hbase-2.x-parent/pom.xml
index 36e924e33..04ba21b45 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>bigtable-hbase-2.x-parent</artifactId>
diff --git a/pom.xml b/pom.xml
index f9612dc13..1c1482881 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.12.1-SNAPSHOT</version>
+    <version>1.12.2-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>${project.groupId}:${project.artifactId}</name>
     <url>https://cloud.google.com/bigtable/</url>
@@ -55,10 +55,11 @@ limitations under the License.
         <commons-logging.version>1.2</commons-logging.version>
         <auto-value.version>1.6.6</auto-value.version>
         <jsr305.version>3.0.2</jsr305.version>
-        <hamcrest.version>1.3</hamcrest.version>
+        <hamcrest.version>2.1</hamcrest.version>
 
         <!-- google-cloud-java related dependency versions -->
-        <google-cloud.version>0.103.0-alpha</google-cloud.version>
+        <!-- TODO: check if commons-codec was upgraded to 1.13 in org.apache.httpcomponents from http-client-->
+        <google-cloud.version>0.108.0-alpha</google-cloud.version>
         <opencensus.version>0.23.0</opencensus.version>
         <checkerframework.version>2.5.5</checkerframework.version>
 
@@ -70,9 +71,9 @@ limitations under the License.
 
         <!-- testing dependency versions -->
         <junit.version>4.12</junit.version>
-        <mockito.version>2.28.2</mockito.version>
-
-        <beam.version>2.14.0</beam.version>
+        <mockito.version>3.0.0</mockito.version>
+        <!-- TODO: check if commons-codec was transitively updated to 1.13 and okhttp was updated to 2.7.5 when upgrading-->
+        <beam.version>2.15.0</beam.version>
         <!-- referred from bigtable-beam-import and bigtable-emulator -->
         <guava.version>28.0-android</guava.version>
     </properties>


Test patch:
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/grpc/async/TestBulkMutationGCJClient.java b/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/grpc/async/TestBulkMutationGCJClient.java
index fb084fb1d..6f39c8b7e 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/grpc/async/TestBulkMutationGCJClient.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/grpc/async/TestBulkMutationGCJClient.java
@@ -26,6 +26,7 @@ import com.google.api.core.SettableApiFuture;
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.cloud.bigtable.data.v2.models.BulkMutationBatcher;
 import com.google.cloud.bigtable.data.v2.models.RowMutation;
+import java.io.IOException;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
@@ -109,12 +110,14 @@ public class TestBulkMutationGCJClient {
   }
 
   @Test
-  public void testIsFlushed() {
-    when(callable.futureCall(rowMutation)).thenReturn(future);
-    bulkMutationClient.add(rowMutation);
-    assertFalse("BulkMutation should have one pending element", bulkMutationClient.isFlushed());
-    future.set(null);
-    assertTrue("BulkMutation should not have any pending element", bulkMutationClient.isFlushed());
-    verify(callable).futureCall(rowMutation);
+  public void testIsClosed() throws IOException {
+    bulkMutationClient.close();
+    Exception actualEx = null;
+    try {
+      bulkMutationClient.add(rowMutation);
+    } catch (Exception e) {
+      actualEx = e;
+    }
+    assertTrue(actualEx instanceof IllegalStateException);
   }
 }
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/grpc/async/TestBulkMutationWrapper.java b/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/grpc/async/TestBulkMutationWrapper.java
index 6b7e9b3bc..82b9d96ba 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/grpc/async/TestBulkMutationWrapper.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/grpc/async/TestBulkMutationWrapper.java
@@ -15,6 +15,7 @@
  */
 package com.google.cloud.bigtable.grpc.async;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.verify;
@@ -26,6 +27,7 @@ import com.google.cloud.bigtable.core.IBulkMutation;
 import com.google.cloud.bigtable.data.v2.internal.RequestContext;
 import com.google.cloud.bigtable.data.v2.models.RowMutation;
 import com.google.common.util.concurrent.Futures;
+import java.io.IOException;
 import java.util.concurrent.Future;
 import org.junit.Before;
 import org.junit.Test;
@@ -61,13 +63,6 @@ public class TestBulkMutationWrapper {
     verify(mockDelegate).sendUnsent();
   }
 
-  @Test
-  public void testIsFlushed() {
-    when(mockDelegate.isFlushed()).thenReturn(true);
-    assertTrue(bulkWrapper.isFlushed());
-    verify(mockDelegate).isFlushed();
-  }
-
   @Test
   public void testAddMutate() {
     RowMutation rowMutation = RowMutation.create("tableId", "key");
@@ -82,4 +77,17 @@ public class TestBulkMutationWrapper {
     }
     verify(mockDelegate).add(requestProto);
   }
+
+  @Test
+  public void testIsClosed() throws IOException {
+    bulkWrapper.close();
+    Exception actualEx = null;
+    try {
+      bulkWrapper.add(RowMutation.create("tableId", "key"));
+    } catch (Exception e) {
+      actualEx = e;
+    }
+    assertTrue(actualEx instanceof IllegalStateException);
+    assertEquals("can't mutate when the bulk mutation is closed.", actualEx.getMessage());
+  }
 }
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 6a1443f25..ae98150ae 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>bigtable-hbase-integration-tests-common</artifactId>
diff --git a/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/src/test/java/com/google/cloud/bigtable/hbase/AbstractTestCreateTable.java b/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/src/test/java/com/google/cloud/bigtable/hbase/AbstractTestCreateTable.java
index fcc85200b..d8d4528c6 100644
--- a/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/src/test/java/com/google/cloud/bigtable/hbase/AbstractTestCreateTable.java
+++ b/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/src/test/java/com/google/cloud/bigtable/hbase/AbstractTestCreateTable.java
@@ -157,7 +157,7 @@ public abstract class AbstractTestCreateTable extends AbstractTest {
     }
   }
 
-  private static boolean isBadTableName(String tableName) {
+  protected boolean isBadTableName(String tableName) {
     byte[] tableChars = tableName.getBytes();
     for (byte codePoint : tableChars) {
       if (!Character.isAlphabetic(codePoint)) {
diff --git a/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/src/test/java/com/google/cloud/bigtable/hbase/AbstractTestFilters.java b/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/src/test/java/com/google/cloud/bigtable/hbase/AbstractTestFilters.java
index 26807429c..9e8546b40 100644
--- a/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/src/test/java/com/google/cloud/bigtable/hbase/AbstractTestFilters.java
+++ b/bigtable-client-core-parent/bigtable-hbase-integration-tests-common/src/test/java/com/google/cloud/bigtable/hbase/AbstractTestFilters.java
@@ -2182,8 +2182,10 @@ public abstract class AbstractTestFilters extends AbstractTest {
     assertRowKeysWithRegex(table, conditions, rowPrefix, rowKeys, expected);
 
     // If pass an empty string, we should not receive any rows.
+
+    // If there is no regex is provided at the end then HBase scans rows as ".*".
     expected = new int[] {};
-    conditions = new String[] {""};
+    conditions = new String[] {"$"};
     assertRowKeysWithRegex(table, conditions, rowPrefix, rowKeys, expected);
 
     // If unmatched string is passed
diff --git a/bigtable-client-core-parent/bigtable-hbase/src/test/java/com/google/cloud/bigtable/hbase/TestBigtableBufferedMutator.java b/bigtable-client-core-parent/bigtable-hbase/src/test/java/com/google/cloud/bigtable/hbase/TestBigtableBufferedMutator.java
index dd19e328b..0152c0a6e 100644
--- a/bigtable-client-core-parent/bigtable-hbase/src/test/java/com/google/cloud/bigtable/hbase/TestBigtableBufferedMutator.java
+++ b/bigtable-client-core-parent/bigtable-hbase/src/test/java/com/google/cloud/bigtable/hbase/TestBigtableBufferedMutator.java
@@ -18,6 +18,7 @@ package com.google.cloud.bigtable.hbase;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.same;
+import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -172,4 +173,18 @@ public class TestBigtableBufferedMutator {
     underTest.flush();
     verify(mockBulkMutation, times(1)).flush();
   }
+
+  @Test
+  public void testClose() throws IOException {
+    Configuration config = new Configuration(false);
+    doNothing().when(mockBulkMutation).close();
+    when(mockBulkMutation.add(any(RowMutation.class))).thenReturn(future);
+    BigtableBufferedMutator underTest = createMutator(config);
+    underTest.mutate(SIMPLE_PUT);
+
+    underTest.close();
+
+    verify(mockBulkMutation).add(any(RowMutation.class));
+    verify(mockBulkMutation).close();
+  }
 }
diff --git a/bigtable-dataflow-parent/bigtable-beam-import/src/test/java/com/google/cloud/bigtable/beam/it/CloudBigtableBeamITTest.java b/bigtable-dataflow-parent/bigtable-beam-import/src/test/java/com/google/cloud/bigtable/beam/it/CloudBigtableBeamITTest.java
index 2c7fa864e..215b389a5 100644
--- a/bigtable-dataflow-parent/bigtable-beam-import/src/test/java/com/google/cloud/bigtable/beam/it/CloudBigtableBeamITTest.java
+++ b/bigtable-dataflow-parent/bigtable-beam-import/src/test/java/com/google/cloud/bigtable/beam/it/CloudBigtableBeamITTest.java
@@ -71,22 +71,30 @@ import org.junit.runners.JUnit4;
  * This class contains integration test for Beam Dataflow.It creates dataflow pipelines that perform
  * the following task using pipeline chain process:
  *
+ * <ol>
+ *   <li>Creates records and performs a Bigtable Put on each record.
+ *   <li>Creates Scan and perform count for each Row of Bigtable.
+ * </ol>
+ *
+ * <p>Arguments to configure in this integration test. These are required for running the test case
+ * on Google Cloud Platform.
+ *
  * <pre>
- *   <ol>
- *     <li> Creates records and performs a Bigtable Put on each record.
- *     <li> Creates Scan and perform count for each Row of Bigtable.
- *   </ol>
+ *  -Dgoogle.bigtable.project.id=[bigtable project] \
+ *  -Dgoogle.bigtable.instance.id=[bigtable instance id] \
+ *  -DdataflowStagingLocation=gs://[google storage bucket] \
+ *  -DdataflowZoneId=[dataflow zone Id]
  * </pre>
  *
- * Arguments to configure in this integration test. The first four argument are required when
- * running the test case on Google Cloud Platform. -Dgoogle.bigtable.project.id=[bigtable project]
- * \\ -Dgoogle.bigtable.instance.id=[bigtable instance id] \\ -DstagingLocation=gs://[your google
- * storage bucket] \\ -DdataflowZoneId=[dataflow zone Id] \\
+ * <p>These options are optional, If not provided it will fallback to defaults.
  *
- * <p>This options are optional, If not provided it will fallback to defaults.
- * -Dgoogle.bigtable.endpoint.host=[ bigtable batch host] \\
- * -Dgoogle.bigtable.admin.endpoint.host=[bigtable admin host] \\ -DtableName=[tableName to be used]
- * \\ -Dtotal_row_count=[number of rows to write and read] \\ -Dprefix_count=[cell prefix count] \\
+ * <pre>
+ *  -Dgoogle.bigtable.endpoint.host=[bigtable batch host] \
+ *  -Dgoogle.bigtable.admin.endpoint.host=[bigtable admin host] \
+ *  -DtableName=[tableName to be used] \
+ *  -Dtotal_row_count=[number of rows to write and read] \
+ *  -Dprefix_count=[cell prefix count]
+ * </pre>
  */
 @RunWith(JUnit4.class)
 public class CloudBigtableBeamITTest {
@@ -113,9 +121,9 @@ public class CloudBigtableBeamITTest {
   private static final TableName TABLE_NAME = TableName.valueOf(TABLE_NAME_STR);
   private static final byte[] FAMILY = Bytes.toBytes("test-family");
   private static final byte[] QUALIFIER = Bytes.toBytes("test-qualifier");
-  private static final int CELL_SIZE = Integer.getInteger("cell_size", 1_00);
-  private static final long TOTAL_ROW_COUNT = Integer.getInteger("total_row_count", 10_000);
-  private static final int PREFIX_COUNT = Integer.getInteger("prefix_count", 1_00);
+  private static final int CELL_SIZE = Integer.getInteger("cell_size", 1_000);
+  private static final long TOTAL_ROW_COUNT = Integer.getInteger("total_row_count", 1_000_000);
+  private static final int PREFIX_COUNT = Integer.getInteger("prefix_count", 1_000);
 
   @BeforeClass
   public static void setUpConfiguration() {
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 96ca29f3a..6d8243c15 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>bigtable-hbase-1.x-integration-tests</artifactId>
diff --git a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-integration-tests/src/test/java/com/google/cloud/bigtable/hbase/TestSnapshots.java b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-integration-tests/src/test/java/com/google/cloud/bigtable/hbase/TestSnapshots.java
index fdef144a9..e62ff4520 100644
--- a/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-integration-tests/src/test/java/com/google/cloud/bigtable/hbase/TestSnapshots.java
+++ b/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-integration-tests/src/test/java/com/google/cloud/bigtable/hbase/TestSnapshots.java
@@ -90,10 +90,9 @@ public class TestSnapshots extends AbstractTestSnapshot {
   @Override
   protected int listTableSnapshotsSize(String tableNameRegex, String snapshotNameRegex)
       throws IOException {
-    //    try(Admin admin = getConnection().getAdmin()) {
-    //      return admin.listTableSnapshots(tableNameRegex, snapshotNameRegex).size();
-    //    }
-    return 0;
+    try (Admin admin = getConnection().getAdmin()) {
+      return admin.listTableSnapshots(tableNameRegex, snapshotNameRegex).size();
+    }
   }
 
   @Override
@@ -106,10 +105,9 @@ public class TestSnapshots extends AbstractTestSnapshot {
   @Override
   protected int listTableSnapshotsSize(Pattern tableNamePattern, Pattern snapshotNamePattern)
       throws IOException {
-    //    try(Admin admin = getConnection().getAdmin()) {
-    //      return admin.listTableSnapshots(tableNamePattern, snapshotNamePattern).size();
-    //    }
-    return 0;
+    try (Admin admin = getConnection().getAdmin()) {
+      return admin.listTableSnapshots(tableNamePattern, snapshotNamePattern).size();
+    }
   }
 
   @Override
@@ -121,9 +119,8 @@ public class TestSnapshots extends AbstractTestSnapshot {
 
   @Override
   protected int listTableSnapshotsSize(Pattern tableNamePattern) throws Exception {
-    //    try(Admin admin = getConnection().getAdmin()){
-    //      return admin.listTableSnapshots(tableNamePattern, Pattern.compile(".*")).size();
-    //    }
-    return 0;
+    try (Admin admin = getConnection().getAdmin()) {
+      return admin.listTableSnapshots(tableNamePattern, Pattern.compile(".*")).size();
+    }
   }
 }
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 e36728e9f..cecf670bf 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>bigtable-hbase-2.x-integration-tests</artifactId>
diff --git a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-integration-tests/src/test/java/com/google/cloud/bigtable/hbase/TestCreateTable.java b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-integration-tests/src/test/java/com/google/cloud/bigtable/hbase/TestCreateTable.java
index 2f13f438e..1e6fadce7 100644
--- a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-integration-tests/src/test/java/com/google/cloud/bigtable/hbase/TestCreateTable.java
+++ b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x-integration-tests/src/test/java/com/google/cloud/bigtable/hbase/TestCreateTable.java
@@ -35,6 +35,11 @@ public class TestCreateTable extends AbstractTestCreateTable {
     getConnection().getAdmin().createTable(createDescriptor(tableName));
   }
 
+  /** HBaseV2 supports all alphabetic/ASCII characters, So skipping this test case. */
+  protected boolean isBadTableName(String tableName) {
+    return false;
+  }
+
   @Override
   protected void createTable(TableName tableName, byte[] start, byte[] end, int splitCount)
       throws IOException {
diff --git a/bigtable-test/bigtable-emulator-maven-plugin/pom.xml b/bigtable-test/bigtable-emulator-maven-plugin/pom.xml
index 128f833f0..3de98f0f4 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
 
@@ -85,7 +85,7 @@ limitations under the License.
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-invoker-plugin</artifactId>
-                        <version>1.10</version>
+                        <version>3.2.0</version>
                         <configuration>
                             <debug>true</debug>
                             <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
diff --git a/bigtable-test/pom.xml b/bigtable-test/pom.xml
index a103205d2..21d76d947 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.12.1-SNAPSHOT</version>
+        <version>1.12.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>bigtable-test</artifactId>