Repository: GoogleCloudPlatform/cloud-bigtable-client
Pull request #2058 (2019-01-24 12:48:28)

[part-1] Updated HBaseRequestAdapter to return GCJ's models
## What changes this PR contains
We have updated HBaseRequestAdapter to return GCJ's models then in next part we can the utilize dataClientWrapper for these methods (once #2056 is also merged).

Updated below method in HBaseRequestAdapter in this PR:
 - [x] Query adapt(Get)
 - [x] Query adapt(Scan)
 - [x] ReadModifyWriteRow adapt(Append append) 
 - [x] ReadModifyWriteRow adapt(Increment increment)


igorbernstein2: Please add a short note what the next parts are
rahulKQL: **Part-2** : Implement bigtableDataClientWrapper for above mentioned operation in:
- AbstractBigtableTable.java
- BatchExecutor.java
- BigtableBufferedMutatorHelper.java
- BigtableAsyncTable.java

Patch:
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/RetryOptions.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/RetryOptions.java
index 2d8515f25..fb102beb7 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/RetryOptions.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/RetryOptions.java
@@ -23,7 +23,6 @@ import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
-import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableSet;
 
@@ -337,7 +336,16 @@ public class RetryOptions implements Serializable, Cloneable {
   public boolean isRetryable(Status.Code code) {
     return statusToRetryOn.contains(code);
   }
-  
+
+  /**
+   * Returns {@link Set} of {@link Status.Code} that allow RPC retries.
+   *
+   * @return a {@link Set}.
+   */
+  public Set<Status.Code> getRetryableStatusCodes() {
+    return ImmutableSet.copyOf(statusToRetryOn);
+  }
+
   /** {@inheritDoc} */
   @Override
   public boolean equals(Object obj) {
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 476cc4be3..f964b2a34 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
@@ -23,7 +23,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 /**
- * Interface to support batching multiple RowMutation request in to singe grpc request.
+ * Interface to support batching multiple RowMutation request into a single grpc request.
  */
 public interface IBulkMutation {
   long MAX_RPC_WAIT_TIME_NANOS = TimeUnit.MINUTES.toNanos(12);
@@ -36,7 +36,7 @@ public interface IBulkMutation {
   void sendUnsent();
 
   /**
-   * @return false if there are any outstanding {@link MutateRowRequest} that still need to be sent.
+   * @return false if there is any outstanding {@link MutateRowRequest} that still needs to be sent.
    */
   boolean isFlushed();
 
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableTableName.java b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableTableName.java
index faa865a3b..a2bcbc522 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableTableName.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableTableName.java
@@ -71,10 +71,6 @@ public class BigtableTableName {
     return tableId;
   }
 
-  public InstanceName toGcbInstanceName() {
-    return InstanceName.of(projectId, instanceId);
-  }
-
   /** {@inheritDoc} */
   @Override
   public String toString() {
diff --git a/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/AbstractBigtableTable.java b/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/AbstractBigtableTable.java
index 97d326c57..9bbcef7b7 100644
--- a/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/AbstractBigtableTable.java
+++ b/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/AbstractBigtableTable.java
@@ -17,7 +17,6 @@ package com.google.cloud.bigtable.hbase;
 
 import com.google.cloud.bigtable.data.v2.internal.RequestContext;
 import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation;
-import com.google.cloud.bigtable.data.v2.models.InstanceName;
 import com.google.cloud.bigtable.data.v2.models.RowMutation;
 import com.google.cloud.bigtable.grpc.BigtableDataClientWrapper;
 import io.opencensus.common.Scope;
@@ -140,9 +139,8 @@ public abstract class AbstractBigtableTable implements Table {
     this.clientWrapper = session.getClientWrapper();
     this.hbaseAdapter = hbaseAdapter;
     this.tableName = hbaseAdapter.getTableName();
-    this.requestContext = RequestContext.create(
-        InstanceName.of(options.getProjectId(), options.getInstanceId()),
-        options.getAppProfileId());
+    this.requestContext = RequestContext
+        .create(options.getProjectId(), options.getInstanceId(), options.getAppProfileId());
   }
 
   /** {@inheritDoc} */
@@ -274,7 +272,7 @@ public abstract class AbstractBigtableTable implements Table {
 
   private FlatRow getResults(Get get, String method) throws IOException {
     try (Timer.Context ignored = metrics.getTimer.time()) {
-      List<FlatRow> list = client.readFlatRowsList(hbaseAdapter.adapt(get));
+      List<FlatRow> list = client.readFlatRowsList(hbaseAdapter.adapt(get).toProto(requestContext));
       switch(list.size()) {
       case 0:
         return null;
@@ -301,7 +299,7 @@ public abstract class AbstractBigtableTable implements Table {
     Span span = TRACER.spanBuilder("BigtableTable.scan").startSpan();
     try (Scope scope = TRACER.withSpan(span)) {
       com.google.cloud.bigtable.grpc.scanner.ResultScanner<FlatRow> scanner =
-          client.readFlatRows(hbaseAdapter.adapt(scan));
+          client.readFlatRows(hbaseAdapter.adapt(scan).toProto(requestContext));
       if (hasWhileMatchFilter(scan.getFilter())) {
         return Adapters.BIGTABLE_WHILE_MATCH_RESULT_RESULT_SCAN_ADAPTER.adapt(scanner, span);
       }
@@ -506,7 +504,7 @@ public abstract class AbstractBigtableTable implements Table {
     LOG.trace("append(Append)");
     Span span = TRACER.spanBuilder("BigtableTable.append").startSpan();
     try (Scope scope = TRACER.withSpan(span)) {
-      ReadModifyWriteRowRequest request = hbaseAdapter.adapt(append);
+      ReadModifyWriteRowRequest request = hbaseAdapter.adapt(append).toProto(requestContext);
       ReadModifyWriteRowResponse response = client.readModifyWriteRow(request);
       // The bigtable API will always return the mutated results. In order to maintain
       // compatibility, simply return null when results were not requested.
@@ -529,7 +527,7 @@ public abstract class AbstractBigtableTable implements Table {
     LOG.trace("increment(Increment)");
     Span span = TRACER.spanBuilder("BigtableTable.increment").startSpan();
     try (Scope scope = TRACER.withSpan(span)) {
-      ReadModifyWriteRowRequest request = hbaseAdapter.adapt(increment);
+      ReadModifyWriteRowRequest request = hbaseAdapter.adapt(increment).toProto(requestContext);
       return Adapters.ROW_ADAPTER.adaptResponse(client.readModifyWriteRow(request).getRow());
     } catch (Throwable t) {
       span.setStatus(Status.UNKNOWN);
diff --git a/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BatchExecutor.java b/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BatchExecutor.java
index b9c791d47..83f5ba0f9 100644
--- a/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BatchExecutor.java
+++ b/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BatchExecutor.java
@@ -15,6 +15,7 @@
  */
 package com.google.cloud.bigtable.hbase;
 
+import com.google.cloud.bigtable.data.v2.internal.RequestContext;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -157,6 +158,8 @@ public class BatchExecutor {
   protected final BigtableOptions options;
   protected final HBaseRequestAdapter requestAdapter;
   protected final Timer batchTimer = BigtableClientMetrics.timer(MetricLevel.Info, "batch.latency");
+  // Once the IBigtableDataClient interface is implemented this will be removed
+  private final RequestContext requestContext;
 
   /**
    * Constructor for BatchExecutor.
@@ -170,6 +173,8 @@ public class BatchExecutor {
     this.asyncExecutor = session.createAsyncExecutor();
     this.options = session.getOptions();
     this.requestAdapter = requestAdapter;
+    this.requestContext = RequestContext
+        .create(options.getProjectId(), options.getInstanceId(), options.getAppProfileId());
   }
 
   /**
@@ -201,15 +206,17 @@ public class BatchExecutor {
   private ListenableFuture<?> issueAsyncRequest(BulkOperation bulkOperation, Row row) {
     try {
       if (row instanceof Get) {
-        return bulkOperation.bulkRead.add(requestAdapter.adapt((Get) row));
+        return bulkOperation.bulkRead.add(requestAdapter.adapt((Get) row).toProto(requestContext));
       } else if (row instanceof Put) {
         return bulkOperation.bulkMutation.add(requestAdapter.adaptEntry((Put) row));
       } else if (row instanceof Delete) {
         return bulkOperation.bulkMutation.add(requestAdapter.adaptEntry((Delete) row));
       } else if (row instanceof Append) {
-        return asyncExecutor.readModifyWriteRowAsync(requestAdapter.adapt((Append) row));
+        return asyncExecutor.readModifyWriteRowAsync(
+            requestAdapter.adapt((Append) row).toProto(requestContext));
       } else if (row instanceof Increment) {
-        return asyncExecutor.readModifyWriteRowAsync(requestAdapter.adapt((Increment) row));
+        return asyncExecutor.readModifyWriteRowAsync(
+            requestAdapter.adapt((Increment) row).toProto(requestContext));
       } else if (row instanceof RowMutations) {
         return bulkOperation.bulkMutation.add(requestAdapter.adaptEntry((RowMutations) row));
       }
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 289f4fe88..0ff14a2c9 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
@@ -15,6 +15,7 @@
  */
 package com.google.cloud.bigtable.hbase;
 
+import com.google.cloud.bigtable.data.v2.internal.RequestContext;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -68,6 +69,8 @@ public class BigtableBufferedMutatorHelper {
   private BulkMutation bulkMutation = null;
 
   private BigtableOptions options;
+  // Once the IBigtableDataClient interface is implemented this will be removed
+  protected final RequestContext requestContext;
 
   /**
    * <p>
@@ -91,6 +94,8 @@ public class BigtableBufferedMutatorHelper {
     this.asyncExecutor = session.createAsyncExecutor();
     BigtableTableName tableName = this.adapter.getBigtableTableName();
     this.bulkMutation = session.createBulkMutation(tableName);
+    this.requestContext = RequestContext
+        .create(options.getProjectId(), options.getInstanceId(), options.getAppProfileId());
   }
 
   public void close() throws IOException {
@@ -186,9 +191,12 @@ public class BigtableBufferedMutatorHelper {
       } else if (mutation instanceof Delete) {
         future = bulkMutation.add(adapter.adaptEntry((Delete) mutation));
       } else if (mutation instanceof Increment) {
-        future = asyncExecutor.readModifyWriteRowAsync(adapter.adapt((Increment) mutation));
+        future =
+            asyncExecutor.readModifyWriteRowAsync(
+                adapter.adapt((Increment) mutation).toProto(requestContext));
       } else if (mutation instanceof Append) {
-        future = asyncExecutor.readModifyWriteRowAsync(adapter.adapt((Append) mutation));
+        future = asyncExecutor.readModifyWriteRowAsync(
+            adapter.adapt((Append) mutation).toProto(requestContext));
       } else {
         future = Futures.immediateFailedFuture(new IllegalArgumentException(
             "Encountered unknown mutation type: " + mutation.getClass()));
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 65e8f50d6..bbea74ca6 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
@@ -17,7 +17,6 @@ package com.google.cloud.bigtable.hbase.adapters;
 
 import com.google.api.core.InternalApi;
 import com.google.cloud.bigtable.data.v2.internal.RequestContext;
-import com.google.cloud.bigtable.data.v2.models.InstanceName;
 import com.google.cloud.bigtable.data.v2.models.Mutation;
 import com.google.cloud.bigtable.data.v2.models.MutationApi;
 import com.google.cloud.bigtable.data.v2.models.Query;
@@ -37,8 +36,6 @@ import org.apache.hadoop.hbase.client.Scan;
 
 import com.google.bigtable.v2.MutateRowRequest;
 import com.google.bigtable.v2.MutateRowsRequest;
-import com.google.bigtable.v2.ReadModifyWriteRowRequest;
-import com.google.bigtable.v2.ReadRowsRequest;
 import com.google.cloud.bigtable.config.BigtableOptions;
 import com.google.cloud.bigtable.grpc.BigtableTableName;
 import com.google.cloud.bigtable.hbase.adapters.read.DefaultReadHooks;
@@ -103,10 +100,8 @@ public class HBaseRequestAdapter {
     this(tableName,
         options.getInstanceName().toTableName(tableName.getQualifierAsString()),
         mutationAdapters,
-        RequestContext.create(
-            InstanceName.of(options.getProjectId(), options.getInstanceId()),
-            options.getAppProfileId()
-        ));
+        RequestContext
+            .create(options.getProjectId(), options.getInstanceId(), options.getAppProfileId()));
   }
 
 
@@ -171,54 +166,54 @@ public class HBaseRequestAdapter {
    * <p>adapt.</p>
    *
    * @param get a {@link Get} object.
-   * @return a {@link ReadRowsRequest} object.
+   * @return a {@link Query} object.
    */
-  public ReadRowsRequest adapt(Get get) {
+  public Query adapt(Get get) {
     ReadHooks readHooks = new DefaultReadHooks();
     Query query = Query.create(bigtableTableName.getTableId());
     Adapters.GET_ADAPTER.adapt(get, readHooks, query);
     readHooks.applyPreSendHook(query);
-    return query.toProto(requestContext);
+    return query;
   }
 
   /**
    * <p>adapt.</p>
    *
    * @param scan a {@link Scan} object.
-   * @return a {@link ReadRowsRequest} object.
+   * @return a {@link Query} object.
    */
-  public ReadRowsRequest adapt(Scan scan) {
+  public Query adapt(Scan scan) {
     ReadHooks readHooks = new DefaultReadHooks();
     Query query = Query.create(bigtableTableName.getTableId());
     Adapters.SCAN_ADAPTER.adapt(scan, readHooks, query);
     readHooks.applyPreSendHook(query);
-    return query.toProto(requestContext);
+    return query;
   }
 
   /**
    * <p>adapt.</p>
    *
-   * @param append a {@link org.apache.hadoop.hbase.client.Append} object.
-   * @return a {@link com.google.bigtable.v2.ReadModifyWriteRowRequest} object.
+   * @param append a {@link Append} object.
+   * @return a {@link ReadModifyWriteRow} object.
    */
-  public ReadModifyWriteRowRequest adapt(Append append) {
+  public ReadModifyWriteRow adapt(Append append) {
     ReadModifyWriteRow readModifyWriteRow = ReadModifyWriteRow
         .create(bigtableTableName.getTableId(), ByteString.copyFrom(append.getRow()));
     Adapters.APPEND_ADAPTER.adapt(append, readModifyWriteRow);
-    return readModifyWriteRow.toProto(requestContext);
+    return readModifyWriteRow;
   }
 
   /**
    * <p>adapt.</p>
    *
-   * @param increment a {@link org.apache.hadoop.hbase.client.Increment} object.
-   * @return a {@link com.google.bigtable.v2.ReadModifyWriteRowRequest} object.
+   * @param increment a {@link Increment} object.
+   * @return a {@link ReadModifyWriteRow} object.
    */
-  public ReadModifyWriteRowRequest adapt(Increment increment) {
+  public ReadModifyWriteRow adapt(Increment increment) {
     ReadModifyWriteRow readModifyWriteRow = ReadModifyWriteRow
         .create(bigtableTableName.getTableId(), ByteString.copyFrom(increment.getRow()));
     Adapters.INCREMENT_ADAPTER.adapt(increment, readModifyWriteRow);
-    return readModifyWriteRow.toProto(requestContext);
+    return readModifyWriteRow;
   }
 
   /**
diff --git a/bigtable-dataflow-parent/bigtable-hbase-beam/javadoc/beam-docs/package-list b/bigtable-dataflow-parent/bigtable-hbase-beam/javadoc/beam-docs/package-list
index 24dccfa6a..b6c1f2613 100755
--- a/bigtable-dataflow-parent/bigtable-hbase-beam/javadoc/beam-docs/package-list
+++ b/bigtable-dataflow-parent/bigtable-hbase-beam/javadoc/beam-docs/package-list
@@ -1,12 +1,136 @@
-com.google.cloud.beam.sdk
-com.google.cloud.beam.sdk.annotations
-com.google.cloud.beam.sdk.coders
-com.google.cloud.beam.sdk.io
-com.google.cloud.beam.sdk.io.range
-com.google.cloud.beam.sdk.options
-com.google.cloud.beam.sdk.runners
-com.google.cloud.beam.sdk.testing
-com.google.cloud.beam.sdk.transforms
-com.google.cloud.beam.sdk.transforms.join
-com.google.cloud.beam.sdk.transforms.windowing
-com.google.cloud.beam.sdk.values
+org.apache.beam.runners.apex
+org.apache.beam.runners.dataflow
+org.apache.beam.runners.dataflow.options
+org.apache.beam.runners.dataflow.util
+org.apache.beam.runners.direct
+org.apache.beam.runners.direct.portable
+org.apache.beam.runners.direct.portable.artifact
+org.apache.beam.runners.direct.portable.job
+org.apache.beam.runners.flink
+org.apache.beam.runners.flink.metrics
+org.apache.beam.runners.fnexecution
+org.apache.beam.runners.fnexecution.artifact
+org.apache.beam.runners.fnexecution.control
+org.apache.beam.runners.fnexecution.data
+org.apache.beam.runners.fnexecution.environment
+org.apache.beam.runners.fnexecution.environment.testing
+org.apache.beam.runners.fnexecution.jobsubmission
+org.apache.beam.runners.fnexecution.logging
+org.apache.beam.runners.fnexecution.provisioning
+org.apache.beam.runners.fnexecution.splittabledofn
+org.apache.beam.runners.fnexecution.state
+org.apache.beam.runners.fnexecution.wire
+org.apache.beam.runners.gearpump
+org.apache.beam.runners.gearpump.translators
+org.apache.beam.runners.gearpump.translators.functions
+org.apache.beam.runners.gearpump.translators.io
+org.apache.beam.runners.gearpump.translators.utils
+org.apache.beam.runners.local
+org.apache.beam.runners.reference
+org.apache.beam.runners.reference.testing
+org.apache.beam.runners.spark
+org.apache.beam.runners.spark.aggregators
+org.apache.beam.runners.spark.coders
+org.apache.beam.runners.spark.io
+org.apache.beam.runners.spark.metrics
+org.apache.beam.runners.spark.metrics.sink
+org.apache.beam.runners.spark.stateful
+org.apache.beam.runners.spark.util
+org.apache.beam.sdk
+org.apache.beam.sdk.annotations
+org.apache.beam.sdk.coders
+org.apache.beam.sdk.extensions.gcp.auth
+org.apache.beam.sdk.extensions.gcp.options
+org.apache.beam.sdk.extensions.gcp.storage
+org.apache.beam.sdk.extensions.jackson
+org.apache.beam.sdk.extensions.joinlibrary
+org.apache.beam.sdk.extensions.protobuf
+org.apache.beam.sdk.extensions.sketching
+org.apache.beam.sdk.extensions.sorter
+org.apache.beam.sdk.extensions.sql
+org.apache.beam.sdk.extensions.sql.example.model
+org.apache.beam.sdk.extensions.sql.impl
+org.apache.beam.sdk.extensions.sql.impl.interpreter
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.arithmetic
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.array
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.collection
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.comparison
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.date
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.logical
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.map
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.math
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.reinterpret
+org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.row
+org.apache.beam.sdk.extensions.sql.impl.parser
+org.apache.beam.sdk.extensions.sql.impl.planner
+org.apache.beam.sdk.extensions.sql.impl.rel
+org.apache.beam.sdk.extensions.sql.impl.rule
+org.apache.beam.sdk.extensions.sql.impl.schema
+org.apache.beam.sdk.extensions.sql.impl.transform
+org.apache.beam.sdk.extensions.sql.impl.transform.agg
+org.apache.beam.sdk.extensions.sql.impl.udf
+org.apache.beam.sdk.extensions.sql.impl.utils
+org.apache.beam.sdk.extensions.sql.meta
+org.apache.beam.sdk.extensions.sql.meta.provider
+org.apache.beam.sdk.extensions.sql.meta.provider.bigquery
+org.apache.beam.sdk.extensions.sql.meta.provider.kafka
+org.apache.beam.sdk.extensions.sql.meta.provider.pubsub
+org.apache.beam.sdk.extensions.sql.meta.provider.test
+org.apache.beam.sdk.extensions.sql.meta.provider.text
+org.apache.beam.sdk.extensions.sql.meta.store
+org.apache.beam.sdk.fn
+org.apache.beam.sdk.fn.channel
+org.apache.beam.sdk.fn.data
+org.apache.beam.sdk.fn.function
+org.apache.beam.sdk.fn.splittabledofn
+org.apache.beam.sdk.fn.stream
+org.apache.beam.sdk.fn.test
+org.apache.beam.sdk.fn.windowing
+org.apache.beam.sdk.io
+org.apache.beam.sdk.io.amqp
+org.apache.beam.sdk.io.aws.options
+org.apache.beam.sdk.io.aws.s3
+org.apache.beam.sdk.io.aws.sns
+org.apache.beam.sdk.io.aws.sqs
+org.apache.beam.sdk.io.cassandra
+org.apache.beam.sdk.io.elasticsearch
+org.apache.beam.sdk.io.fs
+org.apache.beam.sdk.io.gcp.bigquery
+org.apache.beam.sdk.io.gcp.bigtable
+org.apache.beam.sdk.io.gcp.common
+org.apache.beam.sdk.io.gcp.datastore
+org.apache.beam.sdk.io.gcp.pubsub
+org.apache.beam.sdk.io.gcp.spanner
+org.apache.beam.sdk.io.gcp.testing
+org.apache.beam.sdk.io.hadoop
+org.apache.beam.sdk.io.hadoop.inputformat
+org.apache.beam.sdk.io.hbase
+org.apache.beam.sdk.io.hcatalog
+org.apache.beam.sdk.io.hdfs
+org.apache.beam.sdk.io.jdbc
+org.apache.beam.sdk.io.jms
+org.apache.beam.sdk.io.kafka
+org.apache.beam.sdk.io.kafka.serialization
+org.apache.beam.sdk.io.kinesis
+org.apache.beam.sdk.io.mongodb
+org.apache.beam.sdk.io.mqtt
+org.apache.beam.sdk.io.parquet
+org.apache.beam.sdk.io.range
+org.apache.beam.sdk.io.redis
+org.apache.beam.sdk.io.solr
+org.apache.beam.sdk.io.tika
+org.apache.beam.sdk.io.xml
+org.apache.beam.sdk.metrics
+org.apache.beam.sdk.options
+org.apache.beam.sdk.schemas
+org.apache.beam.sdk.schemas.transforms
+org.apache.beam.sdk.schemas.utils
+org.apache.beam.sdk.state
+org.apache.beam.sdk.testing
+org.apache.beam.sdk.transforms
+org.apache.beam.sdk.transforms.display
+org.apache.beam.sdk.transforms.join
+org.apache.beam.sdk.transforms.splittabledofn
+org.apache.beam.sdk.transforms.windowing
+org.apache.beam.sdk.values
diff --git a/bigtable-dataflow-parent/bigtable-hbase-beam/javadoc/hbase-docs/package-list b/bigtable-dataflow-parent/bigtable-hbase-beam/javadoc/hbase-docs/package-list
index e3ecb30df..31755a686 100755
--- a/bigtable-dataflow-parent/bigtable-hbase-beam/javadoc/hbase-docs/package-list
+++ b/bigtable-dataflow-parent/bigtable-hbase-beam/javadoc/hbase-docs/package-list
@@ -1,47 +1,112 @@
 org.apache.hadoop.hbase
-org.apache.hadoop.hbase.classification
-org.apache.hadoop.hbase.classification.tools
+org.apache.hadoop.hbase.backup
+org.apache.hadoop.hbase.backup.example
 org.apache.hadoop.hbase.client
 org.apache.hadoop.hbase.client.backoff
+org.apache.hadoop.hbase.client.coprocessor
 org.apache.hadoop.hbase.client.example
+org.apache.hadoop.hbase.client.locking
+org.apache.hadoop.hbase.client.metrics
 org.apache.hadoop.hbase.client.replication
+org.apache.hadoop.hbase.client.security
+org.apache.hadoop.hbase.codec
 org.apache.hadoop.hbase.conf
+org.apache.hadoop.hbase.constraint
 org.apache.hadoop.hbase.coordination
 org.apache.hadoop.hbase.coprocessor
+org.apache.hadoop.hbase.coprocessor.example
 org.apache.hadoop.hbase.errorhandling
+org.apache.hadoop.hbase.errorprone
 org.apache.hadoop.hbase.exceptions
+org.apache.hadoop.hbase.executor
+org.apache.hadoop.hbase.favored
 org.apache.hadoop.hbase.filter
+org.apache.hadoop.hbase.fs
 org.apache.hadoop.hbase.http
 org.apache.hadoop.hbase.http.conf
 org.apache.hadoop.hbase.http.jmx
+org.apache.hadoop.hbase.http.lib
 org.apache.hadoop.hbase.http.log
 org.apache.hadoop.hbase.io
+org.apache.hadoop.hbase.io.asyncfs
 org.apache.hadoop.hbase.io.compress
 org.apache.hadoop.hbase.io.crypto
 org.apache.hadoop.hbase.io.crypto.aes
 org.apache.hadoop.hbase.io.encoding
 org.apache.hadoop.hbase.io.hadoopbackport
 org.apache.hadoop.hbase.io.hfile
+org.apache.hadoop.hbase.io.hfile.bucket
 org.apache.hadoop.hbase.io.util
 org.apache.hadoop.hbase.ipc
+org.apache.hadoop.hbase.log
 org.apache.hadoop.hbase.mapred
 org.apache.hadoop.hbase.mapreduce
+org.apache.hadoop.hbase.mapreduce.replication
 org.apache.hadoop.hbase.master
+org.apache.hadoop.hbase.master.assignment
+org.apache.hadoop.hbase.master.balancer
+org.apache.hadoop.hbase.master.cleaner
+org.apache.hadoop.hbase.master.locking
+org.apache.hadoop.hbase.master.normalizer
+org.apache.hadoop.hbase.master.procedure
+org.apache.hadoop.hbase.master.replication
+org.apache.hadoop.hbase.master.snapshot
+org.apache.hadoop.hbase.metrics
+org.apache.hadoop.hbase.metrics.impl
 org.apache.hadoop.hbase.mob
 org.apache.hadoop.hbase.mob.compactions
-org.apache.hadoop.hbase.mob.mapreduce
+org.apache.hadoop.hbase.monitoring
 org.apache.hadoop.hbase.namespace
+org.apache.hadoop.hbase.net
 org.apache.hadoop.hbase.nio
+org.apache.hadoop.hbase.procedure
+org.apache.hadoop.hbase.procedure.flush
+org.apache.hadoop.hbase.procedure2
+org.apache.hadoop.hbase.procedure2.store
+org.apache.hadoop.hbase.procedure2.store.wal
+org.apache.hadoop.hbase.procedure2.util
 org.apache.hadoop.hbase.quotas
+org.apache.hadoop.hbase.quotas.policies
 org.apache.hadoop.hbase.regionserver
+org.apache.hadoop.hbase.regionserver.compactions
+org.apache.hadoop.hbase.regionserver.handler
+org.apache.hadoop.hbase.regionserver.querymatcher
+org.apache.hadoop.hbase.regionserver.snapshot
+org.apache.hadoop.hbase.regionserver.throttle
 org.apache.hadoop.hbase.regionserver.wal
 org.apache.hadoop.hbase.replication
+org.apache.hadoop.hbase.replication.master
+org.apache.hadoop.hbase.replication.regionserver
 org.apache.hadoop.hbase.rest
 org.apache.hadoop.hbase.rest.client
+org.apache.hadoop.hbase.rest.filter
+org.apache.hadoop.hbase.rest.model
+org.apache.hadoop.hbase.rest.provider
+org.apache.hadoop.hbase.rest.provider.consumer
+org.apache.hadoop.hbase.rest.provider.producer
+org.apache.hadoop.hbase.rsgroup
 org.apache.hadoop.hbase.security
+org.apache.hadoop.hbase.security.access
+org.apache.hadoop.hbase.security.token
+org.apache.hadoop.hbase.security.visibility
+org.apache.hadoop.hbase.security.visibility.expression
 org.apache.hadoop.hbase.snapshot
+org.apache.hadoop.hbase.thrift
+org.apache.hadoop.hbase.thrift2
+org.apache.hadoop.hbase.tmpl.master
+org.apache.hadoop.hbase.tmpl.regionserver
+org.apache.hadoop.hbase.tool
+org.apache.hadoop.hbase.tool.coprocessor
+org.apache.hadoop.hbase.trace
 org.apache.hadoop.hbase.types
 org.apache.hadoop.hbase.util
+org.apache.hadoop.hbase.util.compaction
 org.apache.hadoop.hbase.util.hbck
 org.apache.hadoop.hbase.wal
 org.apache.hadoop.hbase.zookeeper
+org.apache.hadoop.metrics2
+org.apache.hadoop.metrics2.impl
+org.apache.hadoop.metrics2.lib
+org.apache.hadoop.metrics2.util
+org.apache.hbase.archetypes.exemplars.client
+org.apache.hbase.archetypes.exemplars.shaded_client
diff --git a/bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml b/bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml
index c8055e6b2..59a65f0f2 100755
--- a/bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml
+++ b/bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml
@@ -140,7 +140,7 @@ limitations under the License.
 
                             <offlineLinks>
                                 <offlineLink>
-                                    <url>https://beam.apache.org/documentation/sdks/javadoc/2.1.0/</url>
+                                    <url>https://beam.apache.org/releases/javadoc/2.9.0/</url>
                                     <location>${basedir}/javadoc/beam-docs</location>
                                 </offlineLink>
                                 <offlineLink>
diff --git a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncTable.java b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncTable.java
index fded70457..779961433 100644
--- a/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncTable.java
+++ b/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncTable.java
@@ -17,8 +17,8 @@ package com.google.cloud.bigtable.hbase2_x;
 
 import static java.util.stream.Collectors.toList;
 
+import com.google.cloud.bigtable.config.BigtableOptions;
 import com.google.cloud.bigtable.data.v2.internal.RequestContext;
-import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation;
 import com.google.cloud.bigtable.grpc.BigtableTableName;
 import io.opencensus.common.Scope;
 import io.opencensus.trace.Status;
@@ -49,7 +49,6 @@ import org.apache.hadoop.hbase.client.ServiceCaller;
 import org.apache.hadoop.hbase.client.metrics.ScanMetrics;
 
 import com.google.bigtable.v2.CheckAndMutateRowRequest;
-import com.google.bigtable.v2.MutateRowRequest;
 import com.google.bigtable.v2.ReadModifyWriteRowRequest;
 import com.google.bigtable.v2.ReadModifyWriteRowResponse;
 import com.google.bigtable.v2.ReadRowsRequest;
@@ -99,8 +98,9 @@ public class BigtableAsyncTable implements AsyncTable<ScanResultConsumer> {
     this.hbaseAdapter = hbaseAdapter;
     this.tableName = hbaseAdapter.getTableName();
     // Once the IBigtableDataClient interface is implemented this will be removed
-    this.requestContext =
-        RequestContext.create(hbaseAdapter.getBigtableTableName().toGcbInstanceName(), "");
+    BigtableOptions options = asyncConnection.getOptions();
+    this.requestContext = RequestContext
+        .create(options.getProjectId(), options.getInstanceId(), options.getAppProfileId());
   }
 
   protected synchronized BatchExecutor getBatchExecutor() {
@@ -115,7 +115,7 @@ public class BigtableAsyncTable implements AsyncTable<ScanResultConsumer> {
    */
   @Override
   public CompletableFuture<Result> append(Append append) {
-    ReadModifyWriteRowRequest request = hbaseAdapter.adapt(append);
+    ReadModifyWriteRowRequest request = hbaseAdapter.adapt(append).toProto(requestContext);
     Function<? super ReadModifyWriteRowResponse, ? extends Result> adaptRowFunction = response ->
         append.isReturnResults()
             ? Adapters.ROW_ADAPTER.adaptResponse(response.getRow())
@@ -154,7 +154,8 @@ public class BigtableAsyncTable implements AsyncTable<ScanResultConsumer> {
       this.builder = new CheckAndMutateUtil.RequestBuilder(hbaseAdapter, row, family);
       BigtableTableName bigtableTableName = hbaseAdapter.getBigtableTableName();
       // Once the IBigtableDataClient interface is implemented this will be removed
-      this.requestContext = RequestContext.create(bigtableTableName.toGcbInstanceName(), "");
+      this.requestContext = RequestContext
+          .create(bigtableTableName.getProjectId(), bigtableTableName.getInstanceId(), "");
     }
 
     /**
@@ -271,7 +272,7 @@ public class BigtableAsyncTable implements AsyncTable<ScanResultConsumer> {
    */
   @Override
   public CompletableFuture<Result> get(Get get) {
-    ReadRowsRequest request = hbaseAdapter.adapt(get);
+    ReadRowsRequest request = hbaseAdapter.adapt(get).toProto(requestContext);
     return client.readFlatRowsAsync(request).thenApply(BigtableAsyncTable::toResult);
   }
 
@@ -362,7 +363,7 @@ public class BigtableAsyncTable implements AsyncTable<ScanResultConsumer> {
    */
   @Override
   public CompletableFuture<Result> increment(Increment increment) {
-    return client.readModifyWriteRowAsync(hbaseAdapter.adapt(increment))
+    return client.readModifyWriteRowAsync(hbaseAdapter.adapt(increment).toProto(requestContext))
         .thenApply(response -> Adapters.ROW_ADAPTER.adaptResponse(response.getRow()));
   }
 
@@ -402,7 +403,7 @@ public class BigtableAsyncTable implements AsyncTable<ScanResultConsumer> {
       throw new UnsupportedOperationException(
           "scanAll with while match filter is not allowed");
     }
-    return client.readFlatRowsAsync(hbaseAdapter.adapt(scan))
+    return client.readFlatRowsAsync(hbaseAdapter.adapt(scan).toProto(requestContext))
          .thenApply(list -> map(list, Adapters.FLAT_ROW_ADAPTER::adaptResponse));
   }
 
@@ -413,7 +414,7 @@ public class BigtableAsyncTable implements AsyncTable<ScanResultConsumer> {
     final Span span = TRACER.spanBuilder("BigtableTable.scan").startSpan();
     try (Scope scope = TRACER.withSpan(span)) {
       com.google.cloud.bigtable.grpc.scanner.ResultScanner<FlatRow> scanner =
-          client.getClient().readFlatRows(hbaseAdapter.adapt(scan));
+          client.getClient().readFlatRows(hbaseAdapter.adapt(scan).toProto(requestContext));
       if (AbstractBigtableTable.hasWhileMatchFilter(scan.getFilter())) {
         return Adapters.BIGTABLE_WHILE_MATCH_RESULT_RESULT_SCAN_ADAPTER.adapt(scanner, span);
       }
@@ -452,7 +453,8 @@ public class BigtableAsyncTable implements AsyncTable<ScanResultConsumer> {
       throw new UnsupportedOperationException(
           "scan with consumer and while match filter is not allowed");
     }
-    client.getClient().readFlatRows(hbaseAdapter.adapt(scan), new StreamObserver<FlatRow>() {
+    ReadRowsRequest request = hbaseAdapter.adapt(scan).toProto(requestContext);
+    client.getClient().readFlatRows(request, new StreamObserver<FlatRow>() {
       @Override
       public void onNext(FlatRow value) {
         consumer.onNext(Adapters.FLAT_ROW_ADAPTER.adaptResponse(value));
diff --git a/javadoc/guava-docs/package-list b/javadoc/guava-docs/package-list
index f8551784f..9ad26f447 100644
--- a/javadoc/guava-docs/package-list
+++ b/javadoc/guava-docs/package-list
@@ -4,6 +4,7 @@ com.google.common.cache
 com.google.common.collect
 com.google.common.escape
 com.google.common.eventbus
+com.google.common.graph
 com.google.common.hash
 com.google.common.html
 com.google.common.io
diff --git a/javadoc/hbase-docs/package-list b/javadoc/hbase-docs/package-list
index 002fe5ffa..31755a686 100644
--- a/javadoc/hbase-docs/package-list
+++ b/javadoc/hbase-docs/package-list
@@ -1,35 +1,25 @@
 org.apache.hadoop.hbase
 org.apache.hadoop.hbase.backup
 org.apache.hadoop.hbase.backup.example
-org.apache.hadoop.hbase.classification
-org.apache.hadoop.hbase.classification.tools
 org.apache.hadoop.hbase.client
 org.apache.hadoop.hbase.client.backoff
 org.apache.hadoop.hbase.client.coprocessor
 org.apache.hadoop.hbase.client.example
+org.apache.hadoop.hbase.client.locking
 org.apache.hadoop.hbase.client.metrics
 org.apache.hadoop.hbase.client.replication
 org.apache.hadoop.hbase.client.security
 org.apache.hadoop.hbase.codec
-org.apache.hadoop.hbase.codec.prefixtree
-org.apache.hadoop.hbase.codec.prefixtree.decode
-org.apache.hadoop.hbase.codec.prefixtree.decode.column
-org.apache.hadoop.hbase.codec.prefixtree.decode.row
-org.apache.hadoop.hbase.codec.prefixtree.decode.timestamp
-org.apache.hadoop.hbase.codec.prefixtree.encode
-org.apache.hadoop.hbase.codec.prefixtree.encode.column
-org.apache.hadoop.hbase.codec.prefixtree.encode.other
-org.apache.hadoop.hbase.codec.prefixtree.encode.row
-org.apache.hadoop.hbase.codec.prefixtree.encode.tokenize
-org.apache.hadoop.hbase.codec.prefixtree.scanner
 org.apache.hadoop.hbase.conf
 org.apache.hadoop.hbase.constraint
 org.apache.hadoop.hbase.coordination
 org.apache.hadoop.hbase.coprocessor
 org.apache.hadoop.hbase.coprocessor.example
 org.apache.hadoop.hbase.errorhandling
+org.apache.hadoop.hbase.errorprone
 org.apache.hadoop.hbase.exceptions
 org.apache.hadoop.hbase.executor
+org.apache.hadoop.hbase.favored
 org.apache.hadoop.hbase.filter
 org.apache.hadoop.hbase.fs
 org.apache.hadoop.hbase.http
@@ -48,21 +38,26 @@ org.apache.hadoop.hbase.io.hfile
 org.apache.hadoop.hbase.io.hfile.bucket
 org.apache.hadoop.hbase.io.util
 org.apache.hadoop.hbase.ipc
-org.apache.hadoop.hbase.jetty
+org.apache.hadoop.hbase.log
 org.apache.hadoop.hbase.mapred
 org.apache.hadoop.hbase.mapreduce
 org.apache.hadoop.hbase.mapreduce.replication
 org.apache.hadoop.hbase.master
+org.apache.hadoop.hbase.master.assignment
 org.apache.hadoop.hbase.master.balancer
 org.apache.hadoop.hbase.master.cleaner
+org.apache.hadoop.hbase.master.locking
 org.apache.hadoop.hbase.master.normalizer
 org.apache.hadoop.hbase.master.procedure
+org.apache.hadoop.hbase.master.replication
 org.apache.hadoop.hbase.master.snapshot
 org.apache.hadoop.hbase.metrics
+org.apache.hadoop.hbase.metrics.impl
 org.apache.hadoop.hbase.mob
 org.apache.hadoop.hbase.mob.compactions
 org.apache.hadoop.hbase.monitoring
 org.apache.hadoop.hbase.namespace
+org.apache.hadoop.hbase.net
 org.apache.hadoop.hbase.nio
 org.apache.hadoop.hbase.procedure
 org.apache.hadoop.hbase.procedure.flush
@@ -71,6 +66,7 @@ org.apache.hadoop.hbase.procedure2.store
 org.apache.hadoop.hbase.procedure2.store.wal
 org.apache.hadoop.hbase.procedure2.util
 org.apache.hadoop.hbase.quotas
+org.apache.hadoop.hbase.quotas.policies
 org.apache.hadoop.hbase.regionserver
 org.apache.hadoop.hbase.regionserver.compactions
 org.apache.hadoop.hbase.regionserver.handler
@@ -94,24 +90,20 @@ org.apache.hadoop.hbase.security.access
 org.apache.hadoop.hbase.security.token
 org.apache.hadoop.hbase.security.visibility
 org.apache.hadoop.hbase.security.visibility.expression
-org.apache.hadoop.hbase.shaded.com.google.protobuf.compiler
 org.apache.hadoop.hbase.snapshot
 org.apache.hadoop.hbase.thrift
 org.apache.hadoop.hbase.thrift2
 org.apache.hadoop.hbase.tmpl.master
 org.apache.hadoop.hbase.tmpl.regionserver
 org.apache.hadoop.hbase.tool
+org.apache.hadoop.hbase.tool.coprocessor
 org.apache.hadoop.hbase.trace
 org.apache.hadoop.hbase.types
 org.apache.hadoop.hbase.util
-org.apache.hadoop.hbase.util.byterange
-org.apache.hadoop.hbase.util.byterange.impl
+org.apache.hadoop.hbase.util.compaction
 org.apache.hadoop.hbase.util.hbck
-org.apache.hadoop.hbase.util.test
-org.apache.hadoop.hbase.util.vint
 org.apache.hadoop.hbase.wal
 org.apache.hadoop.hbase.zookeeper
-org.apache.hadoop.hbase.zookeeper.lock
 org.apache.hadoop.metrics2
 org.apache.hadoop.metrics2.impl
 org.apache.hadoop.metrics2.lib
diff --git a/pom.xml b/pom.xml
index e25ec75cb..d8a602bf9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -181,7 +181,7 @@ limitations under the License.
 
                         <offlineLinks>
                             <offlineLink>
-                                <url>http://google.github.io/guava/releases/19.0/api/docs/</url>
+                                <url>https://google.github.io/guava/releases/20.0/api/docs/</url>
                                 <location>${basedir}/javadoc/guava-docs</location>
                             </offlineLink>
                             <offlineLink>
@@ -189,7 +189,7 @@ limitations under the License.
                                 <location>${basedir}/javadoc/hbase-docs</location>
                             </offlineLink>
                             <offlineLink>
-                                <url>http://atetric.com/atetric/javadoc/com.google.protobuf/protobuf-java/3.0.2/</url>
+                                <url>https://static.javadoc.io/com.google.protobuf/protobuf-java/3.6.1/</url>
                                 <location>${basedir}/javadoc/protobuf-docs</location>
                             </offlineLink>
                         </offlineLinks>
@@ -214,10 +214,11 @@ limitations under the License.
                             <configuration>
                                 <!--
                                 javadoc excluded packages:
+                                    com.google.cloud.bigtable.beam{.sequencefiles}  (Breaks with javadoc:aggregate, handled separately)
                                     com.google.cloud.bigtable.dataflow{import,}     (Breaks with javadoc:aggregate, handled separately)
                                     com.google.clooud.*                             (Ignore, a hack/workaround for separate maven issue)
                                 -->
-                                <excludePackageNames>com.google.cloud.bigtable.dataflow:com.google.cloud.bigtable.dataflowimport:com.google.clooud</excludePackageNames>
+                                <excludePackageNames>com.google.cloud.bigtable.beam:com.google.cloud.bigtable.beam.sequencefiles:com.google.cloud.bigtable.dataflow:com.google.cloud.bigtable.dataflowimport:com.google.clooud</excludePackageNames>
                             </configuration>
                         </execution>
                     </executions>


Test patch:
diff --git a/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/config/TestRetryOptions.java b/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/config/TestRetryOptions.java
index 70666fd85..b57cc0371 100644
--- a/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/config/TestRetryOptions.java
+++ b/bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/config/TestRetryOptions.java
@@ -15,6 +15,7 @@
  */
 package com.google.cloud.bigtable.config;
 
+import com.google.common.collect.ImmutableSet;
 import io.grpc.Status;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -49,5 +50,18 @@ public class TestRetryOptions {
     assertEquals(
         retryOnDeadlineExceeded, options.isRetryable(Status.DEADLINE_EXCEEDED.getCode()));
   }
-}
 
+  @Test
+  public void testGetRetryableStatusCodesWhenDefaultCodes() {
+    RetryOptions options = RetryOptions.getDefaultOptions();
+    assertEquals(RetryOptions.DEFAULT_ENABLE_GRPC_RETRIES_SET, options.getRetryableStatusCodes());
+  }
+
+  @Test
+  public void testGetRetryableStatusCodesWhenDisabledDeadLineExceed() {
+    RetryOptions options = RetryOptions.builder().setRetryOnDeadlineExceeded(false).build();
+    assertEquals(
+        ImmutableSet.of(Status.Code.UNAVAILABLE, Status.Code.ABORTED, Status.Code.UNAUTHENTICATED),
+        options.getRetryableStatusCodes());
+  }
+}