Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use concrete classes for hbase.client.registry.impl #4043

Merged
merged 6 commits into from
Mar 31, 2023

Conversation

igorbernstein2
Copy link
Collaborator

Previously we used runtime bytecode generation which prevented endusers from using hbase-site.xml to target bigtable in hbase 2 applications

Change-Id: I28c28683419ac8f65bccfa770ab7f0e1cc1a4d2f

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

If you write sample code, please follow the samples format.

Previously we used runtime bytecode generation which prevented endusers from using hbase-site.xml to target bigtable in hbase 2 applications

Change-Id: I28c28683419ac8f65bccfa770ab7f0e1cc1a4d2f
@igorbernstein2 igorbernstein2 requested a review from a team as a code owner March 29, 2023 21:44
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigtable Issues related to the googleapis/java-bigtable-hbase API. labels Mar 29, 2023
Change-Id: Ia58e2cbcbafa57e08a7f710dd5a5b4d3a4e4bf68
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Mar 30, 2023
Change-Id: I452043b55373c1d41024893f5a9781853c9edae7
Change-Id: I03ab0a4283d430de45417807309498a976e32932
Change-Id: I9de88c819e110e521bdef638d40c63df36ac605b
@igorbernstein2 igorbernstein2 merged commit 585b0d9 into googleapis:feature-v3 Mar 31, 2023
@igorbernstein2 igorbernstein2 deleted the v3-asynreg branch March 31, 2023 22:04
igorbernstein2 added a commit to igorbernstein2/cloud-bigtable-client that referenced this pull request Oct 16, 2023
…#4043)

* feat: use concrete classes for hbase.client.registry.impl

Previously we used runtime bytecode generation which prevented endusers from using hbase-site.xml to target bigtable in hbase 2 applications

Change-Id: I28c28683419ac8f65bccfa770ab7f0e1cc1a4d2f

* address feedback

Change-Id: Ia58e2cbcbafa57e08a7f710dd5a5b4d3a4e4bf68

* add missing exclue

Change-Id: I452043b55373c1d41024893f5a9781853c9edae7

* wip

Change-Id: I03ab0a4283d430de45417807309498a976e32932

* fix bad rebase

Change-Id: I9de88c819e110e521bdef638d40c63df36ac605b
gcf-merge-on-green bot pushed a commit that referenced this pull request Oct 18, 2023
)

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();
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable-hbase API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants