google-cloud-bigtable 2.50.0__tar.gz → 2.50.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_cloud_bigtable-2.50.0/google_cloud_bigtable.egg-info → google_cloud_bigtable-2.50.2}/PKG-INFO +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/batcher.py +3 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_async/_read_rows.py +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_async/client.py +1 -2
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_async/mutations_batcher.py +28 -16
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_cross_sync/cross_sync.py +37 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_metrics/handlers/gcp_exporter.py +78 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_sync_autogen/_read_rows.py +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_sync_autogen/client.py +1 -2
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_sync_autogen/mutations_batcher.py +23 -17
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/read_rows_query.py +47 -25
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/gapic_version.py +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/row_set.py +0 -11
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin/gapic_version.py +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/gapic_version.py +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/gapic_version.py +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2/google_cloud_bigtable.egg-info}/PKG-INFO +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/utils.py +1 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_async/test_mutations_batcher.py +93 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_cross_sync/test_cross_sync.py +39 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_metrics/test_gcp_exporter_handler.py +233 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_sync_autogen/test_mutations_batcher.py +90 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/test_read_rows_query.py +147 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_batcher.py +40 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_client.py +46 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_table.py +8 -8
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/LICENSE +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/MANIFEST.in +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/README.rst +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/app_profile.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/backup.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/cluster.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/column_family.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_async/_mutate_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_async/_swappable_channel.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_async/metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_cross_sync/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_cross_sync/_decorators.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_cross_sync/_mapping_meta.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_metrics/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_metrics/data_model.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_metrics/handlers/_base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_metrics/handlers/opentelemetry.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_metrics/metrics_controller.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_metrics/tracked_retry.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_sync_autogen/_mutate_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_sync_autogen/_swappable_channel.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/_sync_autogen/metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/exceptions.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/_byte_cursor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/_checksum.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/_parameters_formatting.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/_query_result_parsing_utils.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/_reader.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/metadata.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/execute_query/values.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/mutations.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/read_modify_write_rules.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/row.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/data/row_filters.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/encryption_info.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/enums.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/error.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/instance.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/policy.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/py.typed +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/row.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/row_data.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/row_filters.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin/py.typed +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/_compat.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/gapic_metadata.json +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/services/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/services/bigtable_table_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/services/bigtable_table_admin/async_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/services/bigtable_table_admin/client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/types/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/types/async_consistency.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/types/async_restore_table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/types/consistency.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/types/restore_table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/overlay/types/wait_for_consistency_request.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/py.typed +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest_base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest_base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/types/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/types/common.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/types/instance.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/types/table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/types/types.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/utils/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_admin_v2/utils/oneof_message.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/_compat.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/gapic_metadata.json +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/py.typed +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/services/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/services/bigtable/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/services/bigtable/async_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/services/bigtable/client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/services/bigtable/transports/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/services/bigtable/transports/base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/services/bigtable/transports/rest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/services/bigtable/transports/rest_base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/types/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/types/bigtable.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/types/data.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/types/feature_flags.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/types/peer_info.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/types/request_stats.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/types/response_params.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/types/session.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable_v2/types/types.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google_cloud_bigtable.egg-info/SOURCES.txt +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google_cloud_bigtable.egg-info/dependency_links.txt +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google_cloud_bigtable.egg-info/not-zip-safe +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google_cloud_bigtable.egg-info/requires.txt +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google_cloud_bigtable.egg-info/top_level.txt +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/setup.cfg +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/setup.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/admin_overlay/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/admin_overlay/conftest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/admin_overlay/test_system_async.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/admin_overlay/test_system_autogen.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/conftest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/cross_sync/test_cases/async_to_sync.yaml +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/cross_sync/test_cases/cross_sync_files.yaml +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/cross_sync/test_cases/rm_aio.yaml +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/cross_sync/test_cases/strip_async_conditional_branches.yaml +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/cross_sync/test_cases/symbol_replacer.yaml +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/cross_sync/test_cross_sync_e2e.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/data/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/data/test_metrics_async.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/data/test_metrics_autogen.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/data/test_system_async.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/data/test_system_autogen.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/v2_client/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/v2_client/_helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/v2_client/conftest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/v2_client/test_data_api.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/v2_client/test_instance_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/system/v2_client/test_table_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/admin_overlay/my_oneof_message.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/admin_overlay/test_admin_packaging.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/admin_overlay/test_async_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/admin_overlay/test_async_consistency.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/admin_overlay/test_async_restore_table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/admin_overlay/test_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/admin_overlay/test_consistency.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/admin_overlay/test_oneof_message.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/admin_overlay/test_restore_table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/conftest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_async/test__mutate_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_async/test__read_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_async/test__swappable_channel.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_async/test_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_async/test_metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_async/test_read_rows_acceptance.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_cross_sync/test_cross_sync_decorators.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_metrics/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_metrics/test_data_model.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_metrics/test_metrics_controller.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_metrics/test_opentelemetry_handler.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_metrics/test_tracked_retry.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_sync_autogen/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_sync_autogen/test__mutate_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_sync_autogen/test__read_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_sync_autogen/test__swappable_channel.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_sync_autogen/test_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_sync_autogen/test_metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/_sync_autogen/test_read_rows_acceptance.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/_async/test_query_iterator.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/_sync_autogen/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/_sync_autogen/test_query_iterator.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/resources/README.md +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/resources/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/resources/descriptors.pb +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/resources/singer.proto +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/resources/singer_pb2.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/sql_helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/test_byte_cursor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/test_checksum.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/test_execute_query_parameters_parsing.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/test_metadata.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/test_query_result_parsing_utils.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/execute_query/test_query_result_row_reader.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/read-rows-acceptance-test.json +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/test__helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/test_exceptions.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/test_helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/test_mutations.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/test_read_modify_write_rules.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/test_row.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/test_row_filters.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/data/test_sync_up_to_date.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/gapic/bigtable_admin_v2/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/gapic/bigtable_admin_v2/test_compat.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/gapic/bigtable_v2/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/gapic/bigtable_v2/test_bigtable.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/gapic/bigtable_v2/test_compat.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/test_packaging.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/test_sql_routing_parameters.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/_testing.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/read-rows-acceptance-test.json +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_app_profile.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_backup.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_cluster.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_column_family.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_encryption_info.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_error.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_instance.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_policy.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_row.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_row_data.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_row_filters.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_row_merger.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/tests/unit/v2_client/test_row_set.py +0 -0
{google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/batcher.py
RENAMED
|
@@ -204,7 +204,10 @@ class MutationsBatcher(object):
|
|
|
204
204
|
* :exc:`~batcher.MutationsBatchError` if there's any error in the mutations.
|
|
205
205
|
"""
|
|
206
206
|
self._close_batcher()
|
|
207
|
+
# Set atexit registration after internal batcher.
|
|
208
|
+
atexit.unregister(self.close)
|
|
207
209
|
self._init_batcher()
|
|
210
|
+
atexit.register(self.close)
|
|
208
211
|
|
|
209
212
|
def __exit__(self, exc_type, exc_value, exc_traceback):
|
|
210
213
|
"""Clean up resources. Flush and shutdown the ThreadPoolExecutor."""
|
|
@@ -416,9 +416,8 @@ class BigtableDataClientAsync(ClientWithProject):
|
|
|
416
416
|
):
|
|
417
417
|
# raise error if not in an event loop in async client
|
|
418
418
|
CrossSync.verify_async_event_loop()
|
|
419
|
-
self._channel_refresh_task = CrossSync.
|
|
419
|
+
self._channel_refresh_task = CrossSync.create_daemon_task(
|
|
420
420
|
self._manage_channel,
|
|
421
|
-
sync_executor=self._executor,
|
|
422
421
|
task_name=f"{self.__class__.__name__} channel refresh",
|
|
423
422
|
)
|
|
424
423
|
|
|
@@ -43,7 +43,6 @@ from google.cloud.bigtable.data.mutations import (
|
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
if TYPE_CHECKING:
|
|
46
|
-
from google.cloud.bigtable.data._metrics import BigtableClientSideMetricsController
|
|
47
46
|
from google.cloud.bigtable.data.mutations import RowMutationEntry
|
|
48
47
|
|
|
49
48
|
if CrossSync.is_async:
|
|
@@ -194,17 +193,18 @@ class _FlowControlAsync:
|
|
|
194
193
|
async def add_to_flow_with_metrics(
|
|
195
194
|
self,
|
|
196
195
|
mutations: RowMutationEntry | list[RowMutationEntry],
|
|
197
|
-
|
|
196
|
+
target: TargetType,
|
|
198
197
|
):
|
|
199
198
|
inner_generator = self.add_to_flow(mutations)
|
|
200
199
|
while True:
|
|
201
|
-
# start a new metric
|
|
202
|
-
metric = metrics_controller.create_operation(OperationType.BULK_MUTATE_ROWS)
|
|
203
200
|
flow_start_time = time.monotonic_ns()
|
|
204
201
|
try:
|
|
205
202
|
value = await inner_generator.__anext__()
|
|
206
203
|
except CrossSync.StopIteration:
|
|
207
204
|
return
|
|
205
|
+
# Include flow-control waiting without creating a metric on exhaustion.
|
|
206
|
+
metric = target._create_operation(OperationType.BULK_MUTATE_ROWS)
|
|
207
|
+
metric.start_time_ns = flow_start_time
|
|
208
208
|
metric.flow_throttling_time_ns = time.monotonic_ns() - flow_start_time
|
|
209
209
|
yield value, metric
|
|
210
210
|
|
|
@@ -287,8 +287,8 @@ class MutationsBatcherAsync:
|
|
|
287
287
|
if not CrossSync.is_async
|
|
288
288
|
else None
|
|
289
289
|
)
|
|
290
|
-
self._flush_timer = CrossSync.
|
|
291
|
-
self._timer_routine, flush_interval
|
|
290
|
+
self._flush_timer = CrossSync.create_daemon_task(
|
|
291
|
+
self._timer_routine, flush_interval
|
|
292
292
|
)
|
|
293
293
|
self._flush_jobs: set[CrossSync.Future[None]] = set()
|
|
294
294
|
# MutationExceptionGroup reports number of successful entries along with failures
|
|
@@ -392,18 +392,25 @@ class MutationsBatcherAsync:
|
|
|
392
392
|
CrossSync.Future[list[FailedMutationEntryError]], list[RowMutationEntry]
|
|
393
393
|
]
|
|
394
394
|
] = []
|
|
395
|
+
found_exceptions: list[FailedMutationEntryError] = []
|
|
395
396
|
async for batch, metric in self._flow_control.add_to_flow_with_metrics(
|
|
396
|
-
new_entries, self._target
|
|
397
|
+
new_entries, self._target
|
|
397
398
|
):
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
399
|
+
try:
|
|
400
|
+
batch_task = CrossSync.create_task(
|
|
401
|
+
self._execute_mutate_rows,
|
|
402
|
+
batch,
|
|
403
|
+
metric,
|
|
404
|
+
sync_executor=self._sync_rpc_executor,
|
|
405
|
+
)
|
|
406
|
+
in_process_requests.append((batch_task, batch))
|
|
407
|
+
except RuntimeError:
|
|
408
|
+
# Executor is already shut down (e.g. during atexit); flush synchronously.
|
|
409
|
+
found_exceptions.extend(await self._execute_mutate_rows(batch, metric))
|
|
405
410
|
# wait for all inflight requests to complete
|
|
406
|
-
found_exceptions
|
|
411
|
+
found_exceptions.extend(
|
|
412
|
+
await self._wait_for_batch_results(*in_process_requests)
|
|
413
|
+
)
|
|
407
414
|
# update exception data to reflect any new errors
|
|
408
415
|
self._entries_processed_since_last_raise += len(new_entries)
|
|
409
416
|
self._add_exceptions(found_exceptions)
|
|
@@ -545,7 +552,12 @@ class MutationsBatcherAsync:
|
|
|
545
552
|
"""
|
|
546
553
|
self._closed.set()
|
|
547
554
|
self._flush_timer.cancel()
|
|
548
|
-
self.
|
|
555
|
+
entries = self._staged_entries
|
|
556
|
+
try:
|
|
557
|
+
self._schedule_flush()
|
|
558
|
+
except RuntimeError:
|
|
559
|
+
# Executor is already shut down (e.g. during atexit); flush synchronously.
|
|
560
|
+
await self._flush_internal(entries)
|
|
549
561
|
# shut down executors
|
|
550
562
|
if self._sync_flush_executor:
|
|
551
563
|
with self._sync_flush_executor:
|
|
@@ -205,6 +205,19 @@ class CrossSync(metaclass=MappingMeta):
|
|
|
205
205
|
task.set_name(task_name)
|
|
206
206
|
return task
|
|
207
207
|
|
|
208
|
+
@staticmethod
|
|
209
|
+
def create_daemon_task(
|
|
210
|
+
fn: Callable[..., Coroutine[Any, Any, T]],
|
|
211
|
+
*fn_args,
|
|
212
|
+
task_name: str | None = None,
|
|
213
|
+
**fn_kwargs,
|
|
214
|
+
) -> CrossSync.Task[T]:
|
|
215
|
+
"""
|
|
216
|
+
Abstraction over asyncio.create_task for long-lived background tasks.
|
|
217
|
+
Sync version runs on a dedicated daemon thread instead of a ThreadPoolExecutor.
|
|
218
|
+
"""
|
|
219
|
+
return CrossSync.create_task(fn, *fn_args, task_name=task_name, **fn_kwargs)
|
|
220
|
+
|
|
208
221
|
@staticmethod
|
|
209
222
|
async def yield_to_event_loop() -> None:
|
|
210
223
|
"""
|
|
@@ -319,6 +332,30 @@ class CrossSync(metaclass=MappingMeta):
|
|
|
319
332
|
raise ValueError("sync_executor is required for sync version")
|
|
320
333
|
return sync_executor.submit(fn, *fn_args, **fn_kwargs)
|
|
321
334
|
|
|
335
|
+
@staticmethod
|
|
336
|
+
def create_daemon_task(
|
|
337
|
+
fn: Callable[..., T],
|
|
338
|
+
*fn_args,
|
|
339
|
+
task_name: str | None = None,
|
|
340
|
+
**fn_kwargs,
|
|
341
|
+
) -> CrossSync._Sync_Impl.Task[T]:
|
|
342
|
+
"""
|
|
343
|
+
Run a long-lived background task on a dedicated daemon thread and
|
|
344
|
+
return a Future representing its completion.
|
|
345
|
+
"""
|
|
346
|
+
future: concurrent.futures.Future[T] = concurrent.futures.Future()
|
|
347
|
+
|
|
348
|
+
def _run() -> None:
|
|
349
|
+
if not future.set_running_or_notify_cancel(): # pragma: NO COVER
|
|
350
|
+
return
|
|
351
|
+
try:
|
|
352
|
+
future.set_result(fn(*fn_args, **fn_kwargs))
|
|
353
|
+
except BaseException as exc:
|
|
354
|
+
future.set_exception(exc)
|
|
355
|
+
|
|
356
|
+
threading.Thread(target=_run, name=task_name, daemon=True).start()
|
|
357
|
+
return future
|
|
358
|
+
|
|
322
359
|
@staticmethod
|
|
323
360
|
def yield_to_event_loop() -> None:
|
|
324
361
|
"""
|
|
@@ -18,11 +18,13 @@ import logging
|
|
|
18
18
|
import time
|
|
19
19
|
from collections import defaultdict
|
|
20
20
|
|
|
21
|
+
import google.auth.credentials
|
|
21
22
|
from google.api.distribution_pb2 import Distribution
|
|
22
23
|
from google.api.metric_pb2 import Metric as GMetric
|
|
23
24
|
from google.api.metric_pb2 import MetricDescriptor
|
|
24
25
|
from google.api.monitored_resource_pb2 import MonitoredResource
|
|
25
26
|
from google.api_core import gapic_v1
|
|
27
|
+
from google.api_core.exceptions import PermissionDenied, Unauthenticated
|
|
26
28
|
from google.cloud.monitoring_v3 import (
|
|
27
29
|
CreateTimeSeriesRequest,
|
|
28
30
|
MetricServiceClient,
|
|
@@ -115,6 +117,53 @@ def _partition_attributes(
|
|
|
115
117
|
return resource_labels, metric_labels
|
|
116
118
|
|
|
117
119
|
|
|
120
|
+
# scope required to call CreateServiceTimeSeries
|
|
121
|
+
_MONITORING_WRITE_SCOPE = "https://www.googleapis.com/auth/monitoring.write"
|
|
122
|
+
# any one of these scopes is sufficient to write metrics to Cloud Monitoring
|
|
123
|
+
_MONITORING_SCOPES = frozenset(
|
|
124
|
+
{
|
|
125
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
|
126
|
+
"https://www.googleapis.com/auth/monitoring",
|
|
127
|
+
_MONITORING_WRITE_SCOPE,
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def _get_monitoring_credentials(
|
|
133
|
+
credentials: google.auth.credentials.Credentials | None,
|
|
134
|
+
) -> google.auth.credentials.Credentials | None:
|
|
135
|
+
"""
|
|
136
|
+
Return credentials that are able to authenticate against Cloud Monitoring.
|
|
137
|
+
|
|
138
|
+
The metrics exporter shares the credentials of the Bigtable client it belongs to.
|
|
139
|
+
If those credentials are already pinned to a fixed set of scopes that doesn't
|
|
140
|
+
cover Cloud Monitoring (for example, credentials created by the legacy
|
|
141
|
+
``google.cloud.bigtable.Client``, which only requests Bigtable scopes),
|
|
142
|
+
``MetricServiceClient`` can't add its own default scopes to them, and every
|
|
143
|
+
export would be rejected as UNAUTHENTICATED. In that case, a copy of the
|
|
144
|
+
credentials scoped to ``monitoring.write`` is returned instead. The original
|
|
145
|
+
credentials object (and the scopes used for Bigtable traffic) are left untouched.
|
|
146
|
+
|
|
147
|
+
Credentials that don't support scoping (e.g. end-user credentials), or that still
|
|
148
|
+
accept default scopes, are returned unchanged.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
credentials: the credentials used by the Bigtable client, or None to use
|
|
152
|
+
application default credentials
|
|
153
|
+
Returns:
|
|
154
|
+
credentials suitable for the Cloud Monitoring client
|
|
155
|
+
"""
|
|
156
|
+
if credentials is None:
|
|
157
|
+
return None
|
|
158
|
+
if (
|
|
159
|
+
isinstance(credentials, google.auth.credentials.Scoped)
|
|
160
|
+
and not credentials.requires_scopes
|
|
161
|
+
and not _MONITORING_SCOPES.intersection(credentials.scopes or ())
|
|
162
|
+
):
|
|
163
|
+
return credentials.with_scopes([_MONITORING_WRITE_SCOPE])
|
|
164
|
+
return credentials
|
|
165
|
+
|
|
166
|
+
|
|
118
167
|
class GoogleCloudMetricsHandler(OpenTelemetryMetricsHandler):
|
|
119
168
|
"""
|
|
120
169
|
Maintains an internal set of OpenTelemetry metrics for the Bigtable client library,
|
|
@@ -167,8 +216,18 @@ class BigtableMetricsExporter(MetricExporter):
|
|
|
167
216
|
|
|
168
217
|
def __init__(self, *client_args, **client_kwargs):
|
|
169
218
|
super().__init__()
|
|
219
|
+
if client_kwargs.get("credentials") is not None:
|
|
220
|
+
# the exporter shares the Bigtable client's credentials. Make sure
|
|
221
|
+
# they are able to authenticate against Cloud Monitoring
|
|
222
|
+
client_kwargs["credentials"] = _get_monitoring_credentials(
|
|
223
|
+
client_kwargs["credentials"]
|
|
224
|
+
)
|
|
170
225
|
self.client = MetricServiceClient(*client_args, **client_kwargs)
|
|
171
226
|
self.prefix = "bigtable.googleapis.com/internal/client"
|
|
227
|
+
# set after a non-retryable authentication/authorization failure.
|
|
228
|
+
# Once disabled, exports are skipped instead of failing (and logging)
|
|
229
|
+
# on every export interval
|
|
230
|
+
self._disabled = False
|
|
172
231
|
|
|
173
232
|
def export(
|
|
174
233
|
self, metrics_data: MetricsData, timeout_millis: float = 10_000, **kwargs
|
|
@@ -177,6 +236,8 @@ class BigtableMetricsExporter(MetricExporter):
|
|
|
177
236
|
Write a set of metrics to Cloud Monitoring.
|
|
178
237
|
This method is called by the OpenTelemetry SDK
|
|
179
238
|
"""
|
|
239
|
+
if self._disabled:
|
|
240
|
+
return MetricExportResult.FAILURE
|
|
180
241
|
deadline = time.monotonic() + (timeout_millis / 1000)
|
|
181
242
|
metric_kind = MetricDescriptor.MetricKind.CUMULATIVE
|
|
182
243
|
series_by_project: dict[str, list[TimeSeries]] = defaultdict(list)
|
|
@@ -231,6 +292,23 @@ class BigtableMetricsExporter(MetricExporter):
|
|
|
231
292
|
)
|
|
232
293
|
self._batch_write(project_id, series_list, deadline)
|
|
233
294
|
return MetricExportResult.SUCCESS
|
|
295
|
+
except (Unauthenticated, PermissionDenied) as e:
|
|
296
|
+
# authentication/authorization failures won't resolve on their own.
|
|
297
|
+
# Stop exporting instead of failing again on every export interval
|
|
298
|
+
self._disabled = True
|
|
299
|
+
_LOGGER.warning(
|
|
300
|
+
"Bigtable client-side metrics could not be exported to Cloud "
|
|
301
|
+
"Monitoring for project(s) %s: %s. Client-side metrics are now "
|
|
302
|
+
"disabled for this client; Bigtable data operations are not "
|
|
303
|
+
"affected. To publish client-side metrics, make sure the Cloud "
|
|
304
|
+
"Monitoring API is enabled and the client's credentials are "
|
|
305
|
+
"allowed to write metrics to the project "
|
|
306
|
+
"(e.g. roles/monitoring.metricWriter).",
|
|
307
|
+
", ".join(series_by_project),
|
|
308
|
+
e,
|
|
309
|
+
)
|
|
310
|
+
_LOGGER.debug("Client-side metrics export failure details:", exc_info=True)
|
|
311
|
+
return MetricExportResult.FAILURE
|
|
234
312
|
except Exception as e:
|
|
235
313
|
_LOGGER.warning(
|
|
236
314
|
"Failed to export metrics to Cloud Monitoring: %s", e, exc_info=True
|
|
@@ -306,9 +306,8 @@ class BigtableDataClient(ClientWithProject):
|
|
|
306
306
|
and (not self._disable_background_refresh)
|
|
307
307
|
):
|
|
308
308
|
CrossSync._Sync_Impl.verify_async_event_loop()
|
|
309
|
-
self._channel_refresh_task = CrossSync._Sync_Impl.
|
|
309
|
+
self._channel_refresh_task = CrossSync._Sync_Impl.create_daemon_task(
|
|
310
310
|
self._manage_channel,
|
|
311
|
-
sync_executor=self._executor,
|
|
312
311
|
task_name=f"{self.__class__.__name__} channel refresh",
|
|
313
312
|
)
|
|
314
313
|
|
|
@@ -46,7 +46,6 @@ from google.cloud.bigtable.data.mutations import (
|
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
if TYPE_CHECKING:
|
|
49
|
-
from google.cloud.bigtable.data._metrics import BigtableClientSideMetricsController
|
|
50
49
|
from google.cloud.bigtable.data._sync_autogen.client import (
|
|
51
50
|
_DataApiTarget as TargetType,
|
|
52
51
|
)
|
|
@@ -164,18 +163,17 @@ class _FlowControl:
|
|
|
164
163
|
yield mutations[start_idx:end_idx]
|
|
165
164
|
|
|
166
165
|
def add_to_flow_with_metrics(
|
|
167
|
-
self,
|
|
168
|
-
mutations: RowMutationEntry | list[RowMutationEntry],
|
|
169
|
-
metrics_controller: BigtableClientSideMetricsController,
|
|
166
|
+
self, mutations: RowMutationEntry | list[RowMutationEntry], target: TargetType
|
|
170
167
|
):
|
|
171
168
|
inner_generator = self.add_to_flow(mutations)
|
|
172
169
|
while True:
|
|
173
|
-
metric = metrics_controller.create_operation(OperationType.BULK_MUTATE_ROWS)
|
|
174
170
|
flow_start_time = time.monotonic_ns()
|
|
175
171
|
try:
|
|
176
172
|
value = inner_generator.__next__()
|
|
177
173
|
except CrossSync._Sync_Impl.StopIteration:
|
|
178
174
|
return
|
|
175
|
+
metric = target._create_operation(OperationType.BULK_MUTATE_ROWS)
|
|
176
|
+
metric.start_time_ns = flow_start_time
|
|
179
177
|
metric.flow_throttling_time_ns = time.monotonic_ns() - flow_start_time
|
|
180
178
|
yield (value, metric)
|
|
181
179
|
|
|
@@ -254,8 +252,8 @@ class MutationsBatcher:
|
|
|
254
252
|
if not CrossSync._Sync_Impl.is_async
|
|
255
253
|
else None
|
|
256
254
|
)
|
|
257
|
-
self._flush_timer = CrossSync._Sync_Impl.
|
|
258
|
-
self._timer_routine, flush_interval
|
|
255
|
+
self._flush_timer = CrossSync._Sync_Impl.create_daemon_task(
|
|
256
|
+
self._timer_routine, flush_interval
|
|
259
257
|
)
|
|
260
258
|
self._flush_jobs: set[CrossSync._Sync_Impl.Future[None]] = set()
|
|
261
259
|
self._entries_processed_since_last_raise: int = 0
|
|
@@ -340,17 +338,21 @@ class MutationsBatcher:
|
|
|
340
338
|
list[RowMutationEntry],
|
|
341
339
|
]
|
|
342
340
|
] = []
|
|
341
|
+
found_exceptions: list[FailedMutationEntryError] = []
|
|
343
342
|
for batch, metric in self._flow_control.add_to_flow_with_metrics(
|
|
344
|
-
new_entries, self._target
|
|
343
|
+
new_entries, self._target
|
|
345
344
|
):
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
345
|
+
try:
|
|
346
|
+
batch_task = CrossSync._Sync_Impl.create_task(
|
|
347
|
+
self._execute_mutate_rows,
|
|
348
|
+
batch,
|
|
349
|
+
metric,
|
|
350
|
+
sync_executor=self._sync_rpc_executor,
|
|
351
|
+
)
|
|
352
|
+
in_process_requests.append((batch_task, batch))
|
|
353
|
+
except RuntimeError:
|
|
354
|
+
found_exceptions.extend(self._execute_mutate_rows(batch, metric))
|
|
355
|
+
found_exceptions.extend(self._wait_for_batch_results(*in_process_requests))
|
|
354
356
|
self._entries_processed_since_last_raise += len(new_entries)
|
|
355
357
|
self._add_exceptions(found_exceptions)
|
|
356
358
|
|
|
@@ -462,7 +464,11 @@ class MutationsBatcher:
|
|
|
462
464
|
"""Flush queue and clean up resources"""
|
|
463
465
|
self._closed.set()
|
|
464
466
|
self._flush_timer.cancel()
|
|
465
|
-
self.
|
|
467
|
+
entries = self._staged_entries
|
|
468
|
+
try:
|
|
469
|
+
self._schedule_flush()
|
|
470
|
+
except RuntimeError:
|
|
471
|
+
self._flush_internal(entries)
|
|
466
472
|
if self._sync_flush_executor:
|
|
467
473
|
with self._sync_flush_executor:
|
|
468
474
|
self._sync_flush_executor.shutdown(wait=True)
|
|
@@ -87,6 +87,19 @@ class RowRange:
|
|
|
87
87
|
init_dict["end_key_open"] = end_key
|
|
88
88
|
self._pb = RowRangePB(**init_dict)
|
|
89
89
|
|
|
90
|
+
def _key(
|
|
91
|
+
self,
|
|
92
|
+
) -> tuple[bytes | None, bytes | None, bool | None, bool | None]:
|
|
93
|
+
return (
|
|
94
|
+
self.start_key,
|
|
95
|
+
self.end_key,
|
|
96
|
+
self.start_is_inclusive,
|
|
97
|
+
self.end_is_inclusive,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
def __hash__(self) -> int:
|
|
101
|
+
return hash(self._key())
|
|
102
|
+
|
|
90
103
|
@property
|
|
91
104
|
def start_key(self) -> bytes | None:
|
|
92
105
|
"""
|
|
@@ -229,7 +242,12 @@ class ReadRowsQuery:
|
|
|
229
242
|
row_filter: a RowFilter to apply to the query
|
|
230
243
|
"""
|
|
231
244
|
|
|
232
|
-
|
|
245
|
+
__slots__ = (
|
|
246
|
+
"_limit",
|
|
247
|
+
"_filter",
|
|
248
|
+
"_row_keys",
|
|
249
|
+
"_row_ranges",
|
|
250
|
+
)
|
|
233
251
|
|
|
234
252
|
def __init__(
|
|
235
253
|
self,
|
|
@@ -246,10 +264,13 @@ class ReadRowsQuery:
|
|
|
246
264
|
row_ranges = [row_ranges]
|
|
247
265
|
if not isinstance(row_keys, list):
|
|
248
266
|
row_keys = [row_keys]
|
|
249
|
-
|
|
250
|
-
self.
|
|
251
|
-
|
|
252
|
-
|
|
267
|
+
# Use dicts as ordered sets to preserve insertion order with O(1) deduplication
|
|
268
|
+
self._row_keys: dict[bytes, None] = {}
|
|
269
|
+
self._row_ranges: dict[RowRange, None] = {}
|
|
270
|
+
for k in row_keys:
|
|
271
|
+
self.add_key(k)
|
|
272
|
+
for r in row_ranges:
|
|
273
|
+
self.add_range(r)
|
|
253
274
|
self.limit = limit or None
|
|
254
275
|
self.filter = row_filter
|
|
255
276
|
|
|
@@ -261,7 +282,7 @@ class ReadRowsQuery:
|
|
|
261
282
|
Returns:
|
|
262
283
|
list[bytes]: the row keys in this query
|
|
263
284
|
"""
|
|
264
|
-
return list(self.
|
|
285
|
+
return list(self._row_keys)
|
|
265
286
|
|
|
266
287
|
@property
|
|
267
288
|
def row_ranges(self) -> list[RowRange]:
|
|
@@ -271,7 +292,7 @@ class ReadRowsQuery:
|
|
|
271
292
|
Returns:
|
|
272
293
|
list[RowRange]: the row ranges in this query
|
|
273
294
|
"""
|
|
274
|
-
return
|
|
295
|
+
return list(self._row_ranges)
|
|
275
296
|
|
|
276
297
|
@property
|
|
277
298
|
def limit(self) -> int | None:
|
|
@@ -336,8 +357,7 @@ class ReadRowsQuery:
|
|
|
336
357
|
row_key = row_key.encode()
|
|
337
358
|
elif not isinstance(row_key, bytes):
|
|
338
359
|
raise ValueError("row_key must be string or bytes")
|
|
339
|
-
|
|
340
|
-
self._row_set.row_keys.append(row_key)
|
|
360
|
+
self._row_keys[row_key] = None
|
|
341
361
|
|
|
342
362
|
def add_range(
|
|
343
363
|
self,
|
|
@@ -349,8 +369,7 @@ class ReadRowsQuery:
|
|
|
349
369
|
Args:
|
|
350
370
|
row_range: a range of row keys to add to this query
|
|
351
371
|
"""
|
|
352
|
-
|
|
353
|
-
self._row_set.row_ranges.append(row_range._pb)
|
|
372
|
+
self._row_ranges[row_range] = None
|
|
354
373
|
|
|
355
374
|
def shard(self, shard_keys: RowKeySamples) -> ShardedQuery:
|
|
356
375
|
"""
|
|
@@ -491,10 +510,19 @@ class ReadRowsQuery:
|
|
|
491
510
|
app_profile_id=table.app_profile_id,
|
|
492
511
|
filter=self.filter._to_pb() if self.filter else None,
|
|
493
512
|
rows_limit=self.limit or 0,
|
|
494
|
-
rows=
|
|
513
|
+
rows=RowSetPB(
|
|
514
|
+
row_keys=self.row_keys,
|
|
515
|
+
row_ranges=[r._pb for r in self._row_ranges],
|
|
516
|
+
),
|
|
495
517
|
**table._request_path,
|
|
496
518
|
)
|
|
497
519
|
|
|
520
|
+
def __copy__(self) -> ReadRowsQuery:
|
|
521
|
+
new_query = ReadRowsQuery(limit=self.limit, row_filter=self.filter)
|
|
522
|
+
new_query._row_keys = self._row_keys.copy()
|
|
523
|
+
new_query._row_ranges = self._row_ranges.copy()
|
|
524
|
+
return new_query
|
|
525
|
+
|
|
498
526
|
def __eq__(self, other):
|
|
499
527
|
"""
|
|
500
528
|
RowRanges are equal if they have the same row keys, row ranges,
|
|
@@ -509,24 +537,18 @@ class ReadRowsQuery:
|
|
|
509
537
|
if not isinstance(other, ReadRowsQuery):
|
|
510
538
|
return False
|
|
511
539
|
# empty queries are equal
|
|
512
|
-
if len(self.
|
|
513
|
-
this_range_empty = len(self.
|
|
514
|
-
[bool(r) is False for r in self.
|
|
540
|
+
if len(self._row_keys) == 0 and len(other._row_keys) == 0:
|
|
541
|
+
this_range_empty = len(self._row_ranges) == 0 or all(
|
|
542
|
+
[bool(r) is False for r in self._row_ranges]
|
|
515
543
|
)
|
|
516
|
-
other_range_empty = len(other.
|
|
517
|
-
[bool(r) is False for r in other.
|
|
544
|
+
other_range_empty = len(other._row_ranges) == 0 or all(
|
|
545
|
+
[bool(r) is False for r in other._row_ranges]
|
|
518
546
|
)
|
|
519
547
|
if this_range_empty and other_range_empty:
|
|
520
548
|
return self.filter == other.filter and self.limit == other.limit
|
|
521
|
-
# otherwise, sets should have same sizes
|
|
522
|
-
if len(self.row_keys) != len(other.row_keys):
|
|
523
|
-
return False
|
|
524
|
-
if len(self.row_ranges) != len(other.row_ranges):
|
|
525
|
-
return False
|
|
526
|
-
ranges_match = all([row in other.row_ranges for row in self.row_ranges])
|
|
527
549
|
return (
|
|
528
|
-
self.
|
|
529
|
-
and
|
|
550
|
+
self._row_keys.keys() == other._row_keys.keys()
|
|
551
|
+
and self._row_ranges.keys() == other._row_ranges.keys()
|
|
530
552
|
and self.filter == other.filter
|
|
531
553
|
and self.limit == other.limit
|
|
532
554
|
)
|
{google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.2}/google/cloud/bigtable/row_set.py
RENAMED
|
@@ -157,17 +157,6 @@ class RowRange(_MappableAttributesMixin, BaseRowRange):
|
|
|
157
157
|
"end_inclusive": "end_is_inclusive",
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
def _key(self):
|
|
161
|
-
return (
|
|
162
|
-
self.start_key,
|
|
163
|
-
self.end_key,
|
|
164
|
-
self.start_is_inclusive,
|
|
165
|
-
self.end_is_inclusive,
|
|
166
|
-
)
|
|
167
|
-
|
|
168
|
-
def __hash__(self):
|
|
169
|
-
return hash(self._key())
|
|
170
|
-
|
|
171
160
|
def get_range_kwargs(self):
|
|
172
161
|
"""Convert row range object to dict which can be passed to
|
|
173
162
|
google.bigtable.v2.RowRange add method.
|