GeezerVison is showing github.com — Build out some integration with Cloud Bigtable · Issue #872 · googleapis/google-cloud-python
Build out some integration with Cloud Bigtable #872DescriptionWe want to make users of Happybase "just work", so...some ideas:
Option 1: A wrapped import module
from gcloud.bigtable import happybase
Option 2: Some sort of monkey patching?
from gcloud import bigtable
import happybase
happybase = bigtable.monkey_patch(happybase) Activityjgeewax commented on May 12, 2015 ContributorAuthor More actions jgeewax commented on May 12, 2015 ContributorAuthor More actions /cc @dhermes @tseaver : Max might have some spare cycles to work on this, figured you guys should chat. dhermes commented on May 14, 2015 tseaver commented on May 28, 2015 ISTM that monkey-patching the happybase third-party module would be a poor choice. I think we need to think of this as "write a happybase API emulation layer" instead (which may or may not itself even use the real happybase code). dhermes commented on May 28, 2015 Can you elaborate? Why is it a bad idea? (I have yet to look at the happybase code/docs.) tseaver commented on May 28, 2015 I think our goal is that they should be able to port scripts easily (ideally, just changing import happytable to from gcloud.bigtable import happytable and adjusting the connection parameters). I don't see interfering with the actual happytable module's internals as a useful way to approach that goal. For instance, users of gcloud.bigtable might need to interact with a real happybase/Thrift backend (e.g., to move or compare data between it and the bigtable dataset). jgeewax commented on May 28, 2015 ContributorAuthor More actions I agree that there may be times where someone would want to talk to Cloud Bigtable and HBase at the same time, so monkey-patching happybase sounds like we'd screw over those multi-tenant situations.
Maybe there's a way to from gcloud import bigtable and then happybase_compatible_client = bigtable.get_happybase_client() which uses the real happybase code, but swaps out a connection of sorts at the lower level... tseaver commented on May 28, 2015 The gcloud.bigtable docs say:
Cloud Bigtable works with Hadoop 2.4 and higher and is interface compatible with Apache HBase 1.0.
If that means that it exports the same REST API as HBase / Thrift, then maybe we don't have to do much to enable happybase, beyond ensuring that we set the connection up with gcloud-relevant credentials. jgeewax commented on May 28, 2015 ContributorAuthor More actions This is the interesting piece. It is not wire-protocol compatible. That is -- it doesn't speak Thrift (AFAIK). Instead, they made the Java code compatible, and swapped out the thing that does serialization and sending of requests underneath.
I think @maxluebbe can comment more to confirm. dhermes commented on May 29, 2015 Yeah that one is important. I was under the impression from @jgeewax previous comments that the web APIs were the same / close cousins. brianolson commented on Jun 2, 2015 maxluebbe commented on Jun 2, 2015 Sorry have been OOO. Some clarifications.
- Additional work item is modernizing Happybase to 1.0 HBase API.
- Cloud Bigtable does not support Thrift/Rest interfaces. Part of the work that needs to be done here is decoupling the thrift parts of happybase from the interface provided to the user, so that we can drop in gRPC in place of Thrift.
jgeewax commented on Jun 2, 2015 ContributorAuthor More actions gRPC or Protobuf over HTTP 1.0?
gRPC is not possible right now given the installation process (we need to keep our install to pip install gcloud and can't ask people to do a bunch of Makefile madness to use our library). lesv commented on Jul 23, 2015 @dhermes @jgeewax The Cluster Admin API is definitely not supposed to be enabled yet. The cluster proto was open sourced for some testing reasons, but wasn't supposed to be made available externally yet. One reason is that there are some naming issues that have come up, and the proto may have to be changed because of this. That conversation won't take place until next week and we probably won't see any public results for at least a week after that. dhermes commented on Jul 23, 2015 @lesv Thanks. I have the entire Cluster Admin API implemented, including
- an automated generator for the
*_pb2.py modules
- a system test suite that covers every API method (except for
UndeleteCluster) with real API calls
- a unit test suite with 100% code coverage
Though it's not supposed to be enabled yet, any changes will be quickly picked up by the 3 suites mentioned above.
Thanks for the heads up though.
PS ISTM that supporting cloud alpha bigtable clusters * would be impossible without enabling the API. dhermes commented on Aug 3, 2015 I have everything implemented except for the stream requests (ReadRows and SampleRowKeys), which I'm not sure how to handle with gRPC Python.
Golang handles it by using a cancel-able stream. nathanielmanistaatgoogle commented on Aug 3, 2015 @dhermes: what's unclear? gRPC Python supports cancellation. (Ping me; I have some time open this afternoon if you'd like to videochat.) dhermes commented on Aug 3, 2015 Nothing unclear (that I know of), I just don't know how to do it. Let's chat. jgeewax commented on Nov 3, 2015 ContributorAuthor More actions @dhermes : Looks like we're "done enough" with the Bigtable stuff. I'm going to close this out and open a new issue focused on "what exactly do we need to do to make gcloud_bigtable become gcloud.bigtable"
Sound reasonable? (Re-open if not) added 4 commits that reference this issue on Nov 24, 2025This issue will close once commit 5afb22e is merged into the 'main' branch.5afb22e This issue will close once commit a0560a4 is merged into the 'main' branch.a0560a4 This issue will close once commit 916d9cd is merged into the 'main' branch.916d9cd This issue will close once commit 65c3442 is merged into the 'main' branch.65c3442
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|