GeezerVison is showing github.com — Implement Bigtable v2 API · Issue #1850 · googleapis/google-cloud-python
Implement Bigtable v2 API #1850Description@dhermes if you can do a braindump here of what you've learned, and then assign to me, that would be great. Activitydhermes commented on Jun 10, 2016
- Only the data API is in
v2, the table and cluster admins are still v1
- The majority of the changes are in
ReadRowsResponse.
google/bigtable/v2/data.proto is essentially equivalent to google/bigtable/v1/bigtable_data.proto
google/bigtable/v2/bigtable.proto is essentially equivalent to google/bigtable/v1/bigtable_service.proto and google/bigtable/v1/bigtable_service_messages.proto combined
- Some of the inclusive / exclusive fields have changed, but that's somewhat easy to track
- There is a new method in the
v1 Table Admin API that we should implement
garye commented on Jun 21, 2016 Some additional information:
sduskis commented on Jun 21, 2016 I'd guess that MutateRows, bulk delete, and "bulk read" (a set of random row keys) are not in the current python implementation, since they were not there from day one and we added them along the way. They are useful, but not required functionality. sduskis commented on Jun 21, 2016 We have a java implementation which processes v2 ReadRowsResponse objects. Hopefully, it can help give some insight into how to use the new API. There's also a json file we use to drive automated tests; we can explain more about it offline. garye commented on Jun 21, 2016 If we implement happybase's Table.batch then MutateRows would be helpful to leverage, but I agree with Solomon that it's not required. sduskis commented on Jun 21, 2016 Yeah, the new MutateRows is pretty awesome. It has a significant performance improvement over MutateRow.
Anything related to v2 comes first due to time sensitivity. We have a few performance improvement (MutateRows, multiple grpc channels) and reliability (retries) improvements that aren't as time sensitive. garye commented on Jun 21, 2016 tseaver commented on Jun 23, 2016 ContributorAuthor More actions I've set up a feature branch for this project: I intend to merge PRs to that branch, and then merge that branch to master. tseaver commented on Jun 23, 2016 ContributorAuthor More actions Reviewing open gcloud-python issues related to Bigtable:
sduskis commented on Jun 23, 2016 RenameTable was removed in v2. While it existed in v1, it was never actually implemented. Good catch. lesv commented on Jun 23, 2016 The protos should be at #1895 garye commented on Jun 23, 2016 #1895 is bogus because it's targeted at master and breaks everything anyways, but at least look at the Makefile change. I fixed the makefile to find grpc_python_plugin wherever it is in your path but there's also a python script that runs and assumes a location, so I ended up copying grpc_python_plugin to the gcloud-python dir before running make generate. tseaver commented on Jun 23, 2016 ContributorAuthor More actions Setup:
Port modules to V2 protos:
-
table: drop never-actually-impemented Table.rename. Drop 'Table.rename'. #1908.
-
column_family. update V2 imports, adjust ColumnFamily operations, collapsing three V1 endpoints into a single V2 endpoint. Update bigtable.column_family to use V2 protos #1913
-
row_data: implement new ReadRowResponse semantics. Consult Go implementation, Java implementation, and JSON testcases. Add 'ReadRowsResponseV2' wrapper #1907
-
row_data: clarify handling of V2 ReadRowsResponse error cases. Clarify handling of V2 'ReadRowsResponse' error cases #1915
-
row_data: update V2 imports, fold new RRR logic into PartialRowsData. Convert non-instance-admin protos to Bigtable V2 #1919
-
row_filters: update V2 imports, adjust spelling for range boundaries: exclusive -> open, inclusive -> closed. Convert non-instance-admin protos to Bigtable V2 #1919
-
table: update V2 imports. Convert non-instance-admin protos to Bigtable V2 #1919
-
cluster -> new module, instance, updating paths from project/zone/cluster -> project/instance. Support V2 instance admin #1923
-
client: add instance-related stubs, methods. Support V2 instance admin #1923
-
client: remove cluster-related stubs, methods Support V2 instance admin #1923
- Sync from final version of V2 protos (see Regenerate Bigtable V2 protos #1918). Regenerate from final Bigtable v2 v2 protos #1925
-
client: update admin API endpoint configuration. Remaining V2 cleanups #1926
-
client: add list_instances method. Remaining V2 cleanups #1926
- Clean ups. Remaining V2 cleanups #1926
System testing
FInalize
Open issues:
garye commented on Jun 24, 2016 tseaver commented on Jun 24, 2016 ContributorAuthor More actions I missed that those chunks are rendered using text_format. The following works to parse one:
>>> from google.protobuf.text_format import Merge
>>> Merge(chunk_pb, chunk) garye commented on Jun 25, 2016 tseaver commented on Jun 27, 2016 ContributorAuthor More actions @garye Am I meant to neglect the google.bigtable.v2.instance.Instance.cluster and related messages? garye commented on Jun 27, 2016 @tseaver You mean for cluster administration? tseaver commented on Jun 27, 2016 ContributorAuthor More actions Yes -- am I supposed to be exposing the methods to manipulate clusters within an instance? sduskis commented on Jun 27, 2016 We don't do that in go or Java. I would think Happybase doesn't have a way to manage clusters in v1 or instances in v2, since HBase doesn't have any similar concepts. If there isn't currently a way to do cluster management, we should not add new functionality. tseaver commented on Jun 27, 2016 ContributorAuthor More actions @sduskis I was just asking because gcloud.python exposed cluster managment APIs for V1: if they aren't relevant for V2, cool (they are defined right next to the V2 instance management APIs, which is which is what made me ask). sduskis commented on Jun 27, 2016 Thanks for clarifying. I'd guess we need to expose operations that are similar to the way the GCP console operates. There is a ClusterService for some operations like resizing a cluster or changing the display name. I don't know enough about that. I'll ping the group to find out more about this.
The bottom line is that we need parity with the existing functionality in gcloud.python through the new APIs.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|