From e5af3597f45fc4c094c59abca876374f5a866c1b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 10:30:37 -0400 Subject: [PATCH] fix: add feature flag for improved mutate rows throttling (#862) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Minor formatting chore: Update gapic-generator-python to v1.11.5 build: Update rules_python to 0.24.0 PiperOrigin-RevId: 563436317 Source-Link: https://github.com/googleapis/googleapis/commit/42fd37b18d706f6f51f52f209973b3b2c28f509a Source-Link: https://github.com/googleapis/googleapis-gen/commit/280264ca02fb9316b4237a96d0af1a2343a81a56 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjgwMjY0Y2EwMmZiOTMxNmI0MjM3YTk2ZDBhZjFhMjM0M2E4MWE1NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: add feature flag for improved mutate rows throttling PiperOrigin-RevId: 565090488 Source-Link: https://github.com/googleapis/googleapis/commit/e8a136feaca2547dd5566ef79841d28f76a80eb5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9a8dcca0fb2117628a1a6a6c3625a6aa32fc2f75 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWE4ZGNjYTBmYjIxMTc2MjhhMWE2YTZjMzYyNWE2YWEzMmZjMmY3NSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- .../bigtable_instance_admin/async_client.py | 12 +++---- .../bigtable_instance_admin/client.py | 12 +++---- .../transports/rest.py | 2 +- .../bigtable_table_admin/async_client.py | 16 ++++++---- .../services/bigtable_table_admin/client.py | 16 ++++++---- .../bigtable_table_admin/transports/grpc.py | 3 ++ .../transports/grpc_asyncio.py | 3 ++ .../bigtable_table_admin/transports/rest.py | 3 +- .../types/bigtable_table_admin.py | 1 + .../cloud/bigtable_admin_v2/types/instance.py | 4 +-- google/cloud/bigtable_admin_v2/types/table.py | 2 ++ .../services/bigtable/async_client.py | 25 +++++++-------- .../bigtable_v2/services/bigtable/client.py | 25 +++++++-------- .../services/bigtable/transports/grpc.py | 7 ++--- .../bigtable/transports/grpc_asyncio.py | 7 ++--- .../services/bigtable/transports/rest.py | 18 +++++------ google/cloud/bigtable_v2/types/bigtable.py | 12 +++---- google/cloud/bigtable_v2/types/data.py | 13 ++++---- .../cloud/bigtable_v2/types/feature_flags.py | 31 +++++++++++++------ .../cloud/bigtable_v2/types/request_stats.py | 1 + .../test_bigtable_instance_admin.py | 2 +- .../test_bigtable_table_admin.py | 2 +- 22 files changed, 116 insertions(+), 101 deletions(-) diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py index 31e68fe95..3f67620c0 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py @@ -1883,8 +1883,8 @@ async def get_iam_policy( The request object. Request message for ``GetIamPolicy`` method. resource (:class:`str`): REQUIRED: The resource for which the - policy is being requested. - See the operation documentation for the + policy is being requested. See the + operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field @@ -2001,8 +2001,8 @@ async def set_iam_policy( The request object. Request message for ``SetIamPolicy`` method. resource (:class:`str`): REQUIRED: The resource for which the - policy is being specified. - See the operation documentation for the + policy is being specified. See the + operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field @@ -2110,8 +2110,8 @@ async def test_iam_permissions( The request object. Request message for ``TestIamPermissions`` method. resource (:class:`str`): REQUIRED: The resource for which the - policy detail is being requested. - See the operation documentation for the + policy detail is being requested. See + the operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py index d38105a2a..52c61ea4f 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py @@ -2107,8 +2107,8 @@ def get_iam_policy( The request object. Request message for ``GetIamPolicy`` method. resource (str): REQUIRED: The resource for which the - policy is being requested. - See the operation documentation for the + policy is being requested. See the + operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field @@ -2212,8 +2212,8 @@ def set_iam_policy( The request object. Request message for ``SetIamPolicy`` method. resource (str): REQUIRED: The resource for which the - policy is being specified. - See the operation documentation for the + policy is being specified. See the + operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field @@ -2318,8 +2318,8 @@ def test_iam_permissions( The request object. Request message for ``TestIamPermissions`` method. resource (str): REQUIRED: The resource for which the - policy detail is being requested. - See the operation documentation for the + policy detail is being requested. See + the operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py index 25bb0a0b9..9d5502b7e 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py @@ -44,8 +44,8 @@ from google.cloud.bigtable_admin_v2.types import instance from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore +from google.longrunning import operations_pb2 # type: ignore from .base import ( BigtableInstanceAdminTransport, diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py index d1c1811a6..d5edeb91d 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py @@ -358,6 +358,7 @@ async def create_table_from_snapshot( r"""Creates a new table from the specified snapshot. The target table must not exist. The snapshot and the table must be in the same instance. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be @@ -1293,6 +1294,7 @@ async def snapshot_table( r"""Creates a new snapshot in the specified cluster from the specified source table. The cluster and the table must be in the same instance. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be @@ -1469,6 +1471,7 @@ async def get_snapshot( time. A snapshot can be used as a checkpoint for data restoration or a data source for a new table. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud @@ -1668,6 +1671,7 @@ async def delete_snapshot( metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Permanently deletes the specified snapshot. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be @@ -2435,8 +2439,8 @@ async def get_iam_policy( The request object. Request message for ``GetIamPolicy`` method. resource (:class:`str`): REQUIRED: The resource for which the - policy is being requested. - See the operation documentation for the + policy is being requested. See the + operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field @@ -2553,8 +2557,8 @@ async def set_iam_policy( The request object. Request message for ``SetIamPolicy`` method. resource (:class:`str`): REQUIRED: The resource for which the - policy is being specified. - See the operation documentation for the + policy is being specified. See the + operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field @@ -2662,8 +2666,8 @@ async def test_iam_permissions( The request object. Request message for ``TestIamPermissions`` method. resource (:class:`str`): REQUIRED: The resource for which the - policy detail is being requested. - See the operation documentation for the + policy detail is being requested. See + the operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py index 80231fce9..d0c04ed11 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py @@ -685,6 +685,7 @@ def create_table_from_snapshot( r"""Creates a new table from the specified snapshot. The target table must not exist. The snapshot and the table must be in the same instance. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be @@ -1587,6 +1588,7 @@ def snapshot_table( r"""Creates a new snapshot in the specified cluster from the specified source table. The cluster and the table must be in the same instance. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be @@ -1763,6 +1765,7 @@ def get_snapshot( time. A snapshot can be used as a checkpoint for data restoration or a data source for a new table. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud @@ -1942,6 +1945,7 @@ def delete_snapshot( metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Permanently deletes the specified snapshot. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be @@ -2690,8 +2694,8 @@ def get_iam_policy( The request object. Request message for ``GetIamPolicy`` method. resource (str): REQUIRED: The resource for which the - policy is being requested. - See the operation documentation for the + policy is being requested. See the + operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field @@ -2795,8 +2799,8 @@ def set_iam_policy( The request object. Request message for ``SetIamPolicy`` method. resource (str): REQUIRED: The resource for which the - policy is being specified. - See the operation documentation for the + policy is being specified. See the + operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field @@ -2901,8 +2905,8 @@ def test_iam_permissions( The request object. Request message for ``TestIamPermissions`` method. resource (str): REQUIRED: The resource for which the - policy detail is being requested. - See the operation documentation for the + policy detail is being requested. See + the operation documentation for the appropriate value for this field. This corresponds to the ``resource`` field diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py index 34a1596fc..d765869cd 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py @@ -294,6 +294,7 @@ def create_table_from_snapshot( Creates a new table from the specified snapshot. The target table must not exist. The snapshot and the table must be in the same instance. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be @@ -591,6 +592,7 @@ def snapshot_table( Creates a new snapshot in the specified cluster from the specified source table. The cluster and the table must be in the same instance. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be @@ -692,6 +694,7 @@ def delete_snapshot( r"""Return a callable for the delete snapshot method over gRPC. Permanently deletes the specified snapshot. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py index b19d4e7be..b60a7351c 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py @@ -302,6 +302,7 @@ def create_table_from_snapshot( Creates a new table from the specified snapshot. The target table must not exist. The snapshot and the table must be in the same instance. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be @@ -607,6 +608,7 @@ def snapshot_table( Creates a new snapshot in the specified cluster from the specified source table. The cluster and the table must be in the same instance. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be @@ -710,6 +712,7 @@ def delete_snapshot( r"""Return a callable for the delete snapshot method over gRPC. Permanently deletes the specified snapshot. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py index 4b3a846dc..41b893eb7 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py @@ -45,8 +45,8 @@ from google.cloud.bigtable_admin_v2.types import table as gba_table from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore +from google.longrunning import operations_pb2 # type: ignore from .base import ( BigtableTableAdminTransport, @@ -2172,6 +2172,7 @@ def __call__( time. A snapshot can be used as a checkpoint for data restoration or a data source for a new table. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud diff --git a/google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py b/google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py index 2b108351a..6a3b31a1e 100644 --- a/google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py +++ b/google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py @@ -918,6 +918,7 @@ class DeleteSnapshotRequest(proto.Message): class SnapshotTableMetadata(proto.Message): r"""The metadata for the Operation returned by SnapshotTable. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in diff --git a/google/cloud/bigtable_admin_v2/types/instance.py b/google/cloud/bigtable_admin_v2/types/instance.py index aa85eba19..6ae9159d0 100644 --- a/google/cloud/bigtable_admin_v2/types/instance.py +++ b/google/cloud/bigtable_admin_v2/types/instance.py @@ -117,8 +117,8 @@ class Type(proto.Enum): be set on the cluster. DEVELOPMENT (2): DEPRECATED: Prefer PRODUCTION for all use - cases, as it no longer enforces - a higher minimum node count than DEVELOPMENT. + cases, as it no longer enforces a higher minimum + node count than DEVELOPMENT. """ TYPE_UNSPECIFIED = 0 PRODUCTION = 1 diff --git a/google/cloud/bigtable_admin_v2/types/table.py b/google/cloud/bigtable_admin_v2/types/table.py index 6b885203d..57bd1b00f 100644 --- a/google/cloud/bigtable_admin_v2/types/table.py +++ b/google/cloud/bigtable_admin_v2/types/table.py @@ -311,6 +311,7 @@ class ColumnFamily(proto.Message): gc_rule (google.cloud.bigtable_admin_v2.types.GcRule): Garbage collection rule specified as a protobuf. Must serialize to at most 500 bytes. + NOTE: Garbage collection executes opportunistically in the background, and so it's possible for reads to return a cell even if it @@ -481,6 +482,7 @@ class Snapshot(proto.Message): r"""A snapshot of a table at a particular time. A snapshot can be used as a checkpoint for data restoration or a data source for a new table. + Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in diff --git a/google/cloud/bigtable_v2/services/bigtable/async_client.py b/google/cloud/bigtable_v2/services/bigtable/async_client.py index 441022ac7..07a782d0c 100644 --- a/google/cloud/bigtable_v2/services/bigtable/async_client.py +++ b/google/cloud/bigtable_v2/services/bigtable/async_client.py @@ -1030,8 +1030,8 @@ def generate_initial_change_stream_partitions( Args: request (Optional[Union[google.cloud.bigtable_v2.types.GenerateInitialChangeStreamPartitionsRequest, dict]]): The request object. NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Request message for + by Apache Beam BigtableIO. Request + message for Bigtable.GenerateInitialChangeStreamPartitions. table_name (:class:`str`): Required. The unique name of the table from which to get @@ -1061,8 +1061,8 @@ def generate_initial_change_stream_partitions( Returns: AsyncIterable[google.cloud.bigtable_v2.types.GenerateInitialChangeStreamPartitionsResponse]: NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Response message for + by Apache Beam BigtableIO. Response + message for Bigtable.GenerateInitialChangeStreamPartitions. """ @@ -1123,17 +1123,15 @@ def read_change_stream( metadata: Sequence[Tuple[str, str]] = (), ) -> Awaitable[AsyncIterable[bigtable.ReadChangeStreamResponse]]: r"""NOTE: This API is intended to be used by Apache Beam - BigtableIO. - Reads changes from a table's change stream. Changes will - reflect both user-initiated mutations and mutations that - are caused by garbage collection. + BigtableIO. Reads changes from a table's change stream. + Changes will reflect both user-initiated mutations and + mutations that are caused by garbage collection. Args: request (Optional[Union[google.cloud.bigtable_v2.types.ReadChangeStreamRequest, dict]]): The request object. NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Request message for - Bigtable.ReadChangeStream. + by Apache Beam BigtableIO. Request + message for Bigtable.ReadChangeStream. table_name (:class:`str`): Required. The unique name of the table from which to read a change stream. Values are of the form @@ -1162,9 +1160,8 @@ def read_change_stream( Returns: AsyncIterable[google.cloud.bigtable_v2.types.ReadChangeStreamResponse]: NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Response message for - Bigtable.ReadChangeStream. + by Apache Beam BigtableIO. Response + message for Bigtable.ReadChangeStream. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/bigtable_v2/services/bigtable/client.py b/google/cloud/bigtable_v2/services/bigtable/client.py index 595310c88..db393faa7 100644 --- a/google/cloud/bigtable_v2/services/bigtable/client.py +++ b/google/cloud/bigtable_v2/services/bigtable/client.py @@ -1330,8 +1330,8 @@ def generate_initial_change_stream_partitions( Args: request (Union[google.cloud.bigtable_v2.types.GenerateInitialChangeStreamPartitionsRequest, dict]): The request object. NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Request message for + by Apache Beam BigtableIO. Request + message for Bigtable.GenerateInitialChangeStreamPartitions. table_name (str): Required. The unique name of the table from which to get @@ -1361,8 +1361,8 @@ def generate_initial_change_stream_partitions( Returns: Iterable[google.cloud.bigtable_v2.types.GenerateInitialChangeStreamPartitionsResponse]: NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Response message for + by Apache Beam BigtableIO. Response + message for Bigtable.GenerateInitialChangeStreamPartitions. """ @@ -1427,17 +1427,15 @@ def read_change_stream( metadata: Sequence[Tuple[str, str]] = (), ) -> Iterable[bigtable.ReadChangeStreamResponse]: r"""NOTE: This API is intended to be used by Apache Beam - BigtableIO. - Reads changes from a table's change stream. Changes will - reflect both user-initiated mutations and mutations that - are caused by garbage collection. + BigtableIO. Reads changes from a table's change stream. + Changes will reflect both user-initiated mutations and + mutations that are caused by garbage collection. Args: request (Union[google.cloud.bigtable_v2.types.ReadChangeStreamRequest, dict]): The request object. NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Request message for - Bigtable.ReadChangeStream. + by Apache Beam BigtableIO. Request + message for Bigtable.ReadChangeStream. table_name (str): Required. The unique name of the table from which to read a change stream. Values are of the form @@ -1466,9 +1464,8 @@ def read_change_stream( Returns: Iterable[google.cloud.bigtable_v2.types.ReadChangeStreamResponse]: NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Response message for - Bigtable.ReadChangeStream. + by Apache Beam BigtableIO. Response + message for Bigtable.ReadChangeStream. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py b/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py index 0e0666242..8ba04e761 100644 --- a/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py +++ b/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py @@ -481,10 +481,9 @@ def read_change_stream( r"""Return a callable for the read change stream method over gRPC. NOTE: This API is intended to be used by Apache Beam - BigtableIO. - Reads changes from a table's change stream. Changes will - reflect both user-initiated mutations and mutations that - are caused by garbage collection. + BigtableIO. Reads changes from a table's change stream. + Changes will reflect both user-initiated mutations and + mutations that are caused by garbage collection. Returns: Callable[[~.ReadChangeStreamRequest], diff --git a/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py b/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py index 49259969b..2c0cbdad6 100644 --- a/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py +++ b/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py @@ -490,10 +490,9 @@ def read_change_stream( r"""Return a callable for the read change stream method over gRPC. NOTE: This API is intended to be used by Apache Beam - BigtableIO. - Reads changes from a table's change stream. Changes will - reflect both user-initiated mutations and mutations that - are caused by garbage collection. + BigtableIO. Reads changes from a table's change stream. + Changes will reflect both user-initiated mutations and + mutations that are caused by garbage collection. Returns: Callable[[~.ReadChangeStreamRequest], diff --git a/google/cloud/bigtable_v2/services/bigtable/transports/rest.py b/google/cloud/bigtable_v2/services/bigtable/transports/rest.py index 066b35e2a..31d230f94 100644 --- a/google/cloud/bigtable_v2/services/bigtable/transports/rest.py +++ b/google/cloud/bigtable_v2/services/bigtable/transports/rest.py @@ -571,8 +571,8 @@ def __call__( Args: request (~.bigtable.GenerateInitialChangeStreamPartitionsRequest): The request object. NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Request message for + by Apache Beam BigtableIO. Request + message for Bigtable.GenerateInitialChangeStreamPartitions. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -583,8 +583,8 @@ def __call__( Returns: ~.bigtable.GenerateInitialChangeStreamPartitionsResponse: NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Response message for + by Apache Beam BigtableIO. Response + message for Bigtable.GenerateInitialChangeStreamPartitions. """ @@ -975,9 +975,8 @@ def __call__( Args: request (~.bigtable.ReadChangeStreamRequest): The request object. NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Request message for - Bigtable.ReadChangeStream. + by Apache Beam BigtableIO. Request + message for Bigtable.ReadChangeStream. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -987,9 +986,8 @@ def __call__( Returns: ~.bigtable.ReadChangeStreamResponse: NOTE: This API is intended to be used - by Apache Beam BigtableIO. - Response message for - Bigtable.ReadChangeStream. + by Apache Beam BigtableIO. Response + message for Bigtable.ReadChangeStream. """ diff --git a/google/cloud/bigtable_v2/types/bigtable.py b/google/cloud/bigtable_v2/types/bigtable.py index 42740eee2..57f806408 100644 --- a/google/cloud/bigtable_v2/types/bigtable.py +++ b/google/cloud/bigtable_v2/types/bigtable.py @@ -756,8 +756,7 @@ class ReadModifyWriteRowResponse(proto.Message): class GenerateInitialChangeStreamPartitionsRequest(proto.Message): r"""NOTE: This API is intended to be used by Apache Beam - BigtableIO. - Request message for + BigtableIO. Request message for Bigtable.GenerateInitialChangeStreamPartitions. Attributes: @@ -785,8 +784,7 @@ class GenerateInitialChangeStreamPartitionsRequest(proto.Message): class GenerateInitialChangeStreamPartitionsResponse(proto.Message): r"""NOTE: This API is intended to be used by Apache Beam - BigtableIO. - Response message for + BigtableIO. Response message for Bigtable.GenerateInitialChangeStreamPartitions. Attributes: @@ -803,8 +801,7 @@ class GenerateInitialChangeStreamPartitionsResponse(proto.Message): class ReadChangeStreamRequest(proto.Message): r"""NOTE: This API is intended to be used by Apache Beam - BigtableIO. - Request message for Bigtable.ReadChangeStream. + BigtableIO. Request message for Bigtable.ReadChangeStream. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -900,8 +897,7 @@ class ReadChangeStreamRequest(proto.Message): class ReadChangeStreamResponse(proto.Message): r"""NOTE: This API is intended to be used by Apache Beam - BigtableIO. - Response message for Bigtable.ReadChangeStream. + BigtableIO. Response message for Bigtable.ReadChangeStream. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. diff --git a/google/cloud/bigtable_v2/types/data.py b/google/cloud/bigtable_v2/types/data.py index 0e9e0bfe5..e37644a76 100644 --- a/google/cloud/bigtable_v2/types/data.py +++ b/google/cloud/bigtable_v2/types/data.py @@ -639,11 +639,10 @@ class Chain(proto.Message): Attributes: filters (MutableSequence[google.cloud.bigtable_v2.types.RowFilter]): The elements of "filters" are chained - together to process the input row: - - in row -> f(0) -> intermediate row -> f(1) -> - ... -> f(N) -> out row The full chain is - executed atomically. + together to process the input row: in row -> + f(0) -> intermediate row -> f(1) -> ... -> f(N) + -> out row The full chain is executed + atomically. """ filters: MutableSequence["RowFilter"] = proto.RepeatedField( @@ -698,6 +697,7 @@ class Condition(proto.Message): r"""A RowFilter which evaluates one of two possible RowFilters, depending on whether or not a predicate RowFilter outputs any cells from the input row. + IMPORTANT NOTE: The predicate filter does not execute atomically with the true and false filters, which may lead to inconsistent or unexpected results. Additionally, Condition filters have poor @@ -1042,8 +1042,7 @@ class ReadModifyWriteRule(proto.Message): class StreamPartition(proto.Message): r"""NOTE: This API is intended to be used by Apache Beam - BigtableIO. - A partition of a change stream. + BigtableIO. A partition of a change stream. Attributes: row_range (google.cloud.bigtable_v2.types.RowRange): diff --git a/google/cloud/bigtable_v2/types/feature_flags.py b/google/cloud/bigtable_v2/types/feature_flags.py index c7a64db5e..92ac5023d 100644 --- a/google/cloud/bigtable_v2/types/feature_flags.py +++ b/google/cloud/bigtable_v2/types/feature_flags.py @@ -29,14 +29,14 @@ class FeatureFlags(proto.Message): - r"""Feature flags supported by a client. This is intended to be sent as - part of request metadata to assure the server that certain behaviors - are safe to enable. This proto is meant to be serialized and - websafe-base64 encoded under the ``bigtable-features`` metadata key. - The value will remain constant for the lifetime of a client and due - to HTTP2's HPACK compression, the request overhead will be tiny. - This is an internal implementation detail and should not be used by - endusers directly. + r"""Feature flags supported or enabled by a client. This is intended to + be sent as part of request metadata to assure the server that + certain behaviors are safe to enable. This proto is meant to be + serialized and websafe-base64 encoded under the + ``bigtable-features`` metadata key. The value will remain constant + for the lifetime of a client and due to HTTP2's HPACK compression, + the request overhead will be tiny. This is an internal + implementation detail and should not be used by end users directly. Attributes: reverse_scans (bool): @@ -47,11 +47,18 @@ class FeatureFlags(proto.Message): mutate_rows_rate_limit (bool): Notify the server that the client enables batch write flow control by requesting - RateLimitInfo from MutateRowsResponse. + RateLimitInfo from MutateRowsResponse. Due to + technical reasons, this disables partial + retries. + mutate_rows_rate_limit2 (bool): + Notify the server that the client enables + batch write flow control by requesting + RateLimitInfo from MutateRowsResponse. With + partial retries enabled. last_scanned_row_responses (bool): Notify the server that the client supports the last_scanned_row field in ReadRowsResponse for long-running - sparse scans. + scans. """ reverse_scans: bool = proto.Field( @@ -62,6 +69,10 @@ class FeatureFlags(proto.Message): proto.BOOL, number=3, ) + mutate_rows_rate_limit2: bool = proto.Field( + proto.BOOL, + number=5, + ) last_scanned_row_responses: bool = proto.Field( proto.BOOL, number=4, diff --git a/google/cloud/bigtable_v2/types/request_stats.py b/google/cloud/bigtable_v2/types/request_stats.py index 27c2bb028..61cce9491 100644 --- a/google/cloud/bigtable_v2/types/request_stats.py +++ b/google/cloud/bigtable_v2/types/request_stats.py @@ -86,6 +86,7 @@ class RequestLatencyStats(proto.Message): response. For more context on the component that is measuring this latency, see: https://cloud.google.com/bigtable/docs/overview + Note: This value may be slightly shorter than the value reported into aggregate latency metrics in Monitoring for this request diff --git a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py index f5f5fc514..b2caa98ba 100644 --- a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py +++ b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py @@ -63,7 +63,7 @@ from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import options_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore diff --git a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py index a537cb9f0..aa717a3cb 100644 --- a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py +++ b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py @@ -62,7 +62,7 @@ from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import options_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account from google.protobuf import any_pb2 # type: ignore from google.protobuf import duration_pb2 # type: ignore