-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) 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(); ```
- Loading branch information
1 parent
ab4c790
commit cc22f2f
Showing
12 changed files
with
930 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 0 additions & 111 deletions
111
...nt/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/BigtableAsyncRegistry.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.