You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: use concrete classes for hbase.client.registry.impl (#4043) (#4188)
Previously we used runtime bytecode generation which prevented endusers from using hbase-site.xml to target bigtable in hbase 2 applications. This PR will create a concrete implementation for both AsyncRegistry for (hbase < 2.3) and ConnectionRegistry (for hbase >= 2.3).
To accomplish this, we use a local copy of the AsyncRegistry interface from HBase 2.2 that we use as a compile time target and then strip it from the resulting jar.
After this change end users should be able to use async apis in hbase 2 using hbase-site.xml. Examples:
```xml
<configuration>
<property>
<name>hbase.client.connection.impl</name>
<value>com.google.cloud.bigtable.hbase2_x.BigtableConnection</value>
</property>
<property>
<name>hbase.client.async.connection.impl</name>
<value>org.apache.hadoop.hbase.client.BigtableAsyncConnection</value>
</property>
<property>
<name>hbase.client.registry.impl</name>
<!-- When using hbase >= 2.3, use this -->
<value>org.apache.hadoop.hbase.client.BigtableConnectionRegistry</value>
<!-- When using hbase < 2.3, use this -->
<!-- <value>org.apache.hadoop.hbase.client.BigtableAsyncRegistry</value> -->
</property>
<property>
<name>google.bigtable.project.id</name>
<value>my-project</value>
</property>
<property>
<name>google.bigtable.instance.id</name>
<value>my-instance</value>
</property>
<property>
<name>google.bigtable.app_profile.id</name>
<value>my-app-profile</value>
</property>
</configuration>
```
```java
AsyncConnection asyncConnection = ConnectionFactory.createAsyncConnection().get();
```
Copy file name to clipboardExpand all lines: bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableConfiguration.java
Copy file name to clipboardExpand all lines: bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/BigtableAsyncRegistry.java
0 commit comments