googleapis / googleapis/google-cloud-python

Use shim for legacy client read_rows

Offen
#15,293 1 Kommentar 0 Reaktionen 1 zugewiesene Person Beansprucht von @gkevinzheng Auf GitHub ansehen
api: bigtable priority: p3 type: feature request
Vorherrschende Sprache
Python
Sterne
5.4k
Forks
1.8k
Ø Merge
3 T. 4 Std.
Gemergte PRs (30 T.)
122

Beschreibung

From go/bigtable_legacy_deprecation:

> Old API
> - The [Table](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L103) class exposed a [read_row](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L536) and [read_rows](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L577) method
read_row simply [calls read_rows](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L570) under the hood, with a single row_key argument
> - Read_rows [creates and returns PartialRowsData instance](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L647), which can be iterated to return [PartialRowData](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/row.py#L1027) (no s) instances for each row in the query
> - The row merging logic is all contained within PartialRowsData, using internal [_RowMerger](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/row_merger.py#L58) and [_ReadRowsRequestManager](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/row_data.py#L274) instances
>
> Replacement
> - We can replace the[ PartialRowsData class](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L647) with a new subclass, that instead delegates row merging logic to the [_ReadRowsOperation](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/data/_sync_autogen/_read_rows.py#L40) class provided by the new data client

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.