google-cloud-bigtable 2.41.0__tar.gz → 2.43.0__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.41.0/google_cloud_bigtable.egg-info → google_cloud_bigtable-2.43.0}/PKG-INFO +6 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/batcher.py +58 -9
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/client.py +22 -15
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_async/_mutate_rows.py +13 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_async/_read_rows.py +1 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_async/client.py +69 -23
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_async/mutations_batcher.py +1 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_helpers.py +3 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_metrics/__init__.py +8 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_metrics/data_model.py +12 -1
- google_cloud_bigtable-2.43.0/google/cloud/bigtable/data/_metrics/handlers/gcp_exporter.py +334 -0
- google_cloud_bigtable-2.43.0/google/cloud/bigtable/data/_metrics/handlers/opentelemetry.py +251 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_metrics/tracked_retry.py +4 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_sync_autogen/_mutate_rows.py +8 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_sync_autogen/_read_rows.py +1 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_sync_autogen/client.py +59 -21
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_sync_autogen/mutations_batcher.py +1 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/gapic_version.py +1 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/row.py +2 -2
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/row_data.py +1 -1
- google_cloud_bigtable-2.43.0/google/cloud/bigtable/row_filters.py +232 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/table.py +14 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin/gapic_version.py +1 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/__init__.py +18 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/gapic_version.py +1 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py +1 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py +1 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py +1 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py +1 -2
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py +1 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py +1 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py +1 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py +1 -2
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/types/table.py +4 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/__init__.py +19 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/gapic_version.py +1 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/services/bigtable/async_client.py +1 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/services/bigtable/client.py +1 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/services/bigtable/transports/base.py +1 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/services/bigtable/transports/rest.py +1 -2
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/types/data.py +33 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/types/feature_flags.py +7 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0/google_cloud_bigtable.egg-info}/PKG-INFO +6 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google_cloud_bigtable.egg-info/SOURCES.txt +4 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google_cloud_bigtable.egg-info/requires.txt +5 -2
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/setup.py +5 -2
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/data/__init__.py +12 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/data/test_metrics_async.py +8 -7
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/data/test_metrics_autogen.py +7 -7
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/data/test_system_async.py +51 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/data/test_system_autogen.py +49 -1
- google_cloud_bigtable-2.43.0/tests/system/v2_client/test_data_api.py +1264 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_async/test__mutate_rows.py +52 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_async/test_client.py +266 -29
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_async/test_mutations_batcher.py +15 -5
- google_cloud_bigtable-2.43.0/tests/unit/data/_metrics/test_gcp_exporter_handler.py +445 -0
- google_cloud_bigtable-2.43.0/tests/unit/data/_metrics/test_opentelemetry_handler.py +404 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_sync_autogen/test__mutate_rows.py +46 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_sync_autogen/test_client.py +247 -24
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_sync_autogen/test_mutations_batcher.py +12 -4
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py +16 -2
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py +16 -2
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/gapic/bigtable_v2/test_bigtable.py +16 -2
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/_testing.py +15 -3
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_batcher.py +94 -10
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_client.py +144 -41
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_instance.py +1 -1
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_row.py +6 -4
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_row_data.py +8 -8
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_row_filters.py +125 -89
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_table.py +101 -55
- google_cloud_bigtable-2.41.0/google/cloud/bigtable/row_filters.py +0 -869
- google_cloud_bigtable-2.41.0/tests/system/v2_client/test_data_api.py +0 -424
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/LICENSE +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/MANIFEST.in +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/README.rst +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/app_profile.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/backup.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/cluster.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/column_family.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_async/_swappable_channel.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_async/metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_cross_sync/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_cross_sync/_decorators.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_cross_sync/_mapping_meta.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_cross_sync/cross_sync.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_metrics/handlers/_base.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_metrics/metrics_controller.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_sync_autogen/_swappable_channel.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_sync_autogen/metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/exceptions.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/_byte_cursor.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/_checksum.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/_parameters_formatting.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/_query_result_parsing_utils.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/_reader.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/metadata.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/execute_query/values.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/mutations.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/read_modify_write_rules.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/read_rows_query.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/row.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/row_filters.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/encryption_info.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/enums.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/error.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/helpers.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/instance.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/policy.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/py.typed +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/row_merger.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/row_set.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin/py.typed +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/gapic_metadata.json +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/services/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/services/bigtable_table_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/services/bigtable_table_admin/async_client.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/services/bigtable_table_admin/client.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/types/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/types/async_consistency.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/types/async_restore_table.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/types/consistency.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/types/restore_table.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/overlay/types/wait_for_consistency_request.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/py.typed +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest_base.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest_base.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/types/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/types/common.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/types/instance.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/types/types.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/utils/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_admin_v2/utils/oneof_message.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/gapic_metadata.json +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/py.typed +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/services/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/services/bigtable/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/services/bigtable/transports/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/services/bigtable/transports/rest_base.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/types/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/types/bigtable.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/types/peer_info.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/types/request_stats.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/types/response_params.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/types/session.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable_v2/types/types.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google_cloud_bigtable.egg-info/dependency_links.txt +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google_cloud_bigtable.egg-info/not-zip-safe +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google_cloud_bigtable.egg-info/top_level.txt +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/setup.cfg +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/admin_overlay/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/admin_overlay/conftest.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/admin_overlay/test_system_async.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/admin_overlay/test_system_autogen.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/conftest.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/cross_sync/test_cases/async_to_sync.yaml +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/cross_sync/test_cases/cross_sync_files.yaml +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/cross_sync/test_cases/rm_aio.yaml +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/cross_sync/test_cases/strip_async_conditional_branches.yaml +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/cross_sync/test_cases/symbol_replacer.yaml +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/cross_sync/test_cross_sync_e2e.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/utils.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/v2_client/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/v2_client/_helpers.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/v2_client/conftest.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/v2_client/test_instance_admin.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/system/v2_client/test_table_admin.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/admin_overlay/my_oneof_message.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/admin_overlay/test_admin_packaging.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/admin_overlay/test_async_client.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/admin_overlay/test_async_consistency.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/admin_overlay/test_async_restore_table.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/admin_overlay/test_client.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/admin_overlay/test_consistency.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/admin_overlay/test_oneof_message.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/admin_overlay/test_restore_table.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/conftest.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_async/test__read_rows.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_async/test__swappable_channel.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_async/test_metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_async/test_read_rows_acceptance.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_cross_sync/test_cross_sync.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_cross_sync/test_cross_sync_decorators.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_metrics/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_metrics/test_data_model.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_metrics/test_metrics_controller.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_metrics/test_tracked_retry.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_sync_autogen/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_sync_autogen/test__read_rows.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_sync_autogen/test__swappable_channel.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_sync_autogen/test_metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/_sync_autogen/test_read_rows_acceptance.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/_async/test_query_iterator.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/_sync_autogen/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/_sync_autogen/test_query_iterator.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/resources/README.md +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/resources/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/resources/descriptors.pb +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/resources/singer.proto +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/resources/singer_pb2.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/sql_helpers.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/test_byte_cursor.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/test_checksum.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/test_execute_query_parameters_parsing.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/test_metadata.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/test_query_result_parsing_utils.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/execute_query/test_query_result_row_reader.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/read-rows-acceptance-test.json +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/test__helpers.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/test_exceptions.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/test_helpers.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/test_mutations.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/test_read_modify_write_rules.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/test_read_rows_query.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/test_row.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/test_row_filters.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/data/test_sync_up_to_date.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/gapic/bigtable_admin_v2/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/gapic/bigtable_v2/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/test_packaging.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/test_sql_routing_parameters.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/__init__.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/read-rows-acceptance-test.json +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_app_profile.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_backup.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_cluster.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_column_family.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_encryption_info.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_error.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_policy.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_row_merger.py +0 -0
- {google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/tests/unit/v2_client/test_row_set.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-bigtable
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.43.0
|
|
4
4
|
Summary: Google Cloud Bigtable API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-bigtable
|
|
6
6
|
Author: Google LLC
|
|
@@ -21,15 +21,18 @@ Classifier: Operating System :: OS Independent
|
|
|
21
21
|
Classifier: Topic :: Internet
|
|
22
22
|
Requires-Python: >=3.10
|
|
23
23
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist: google-api-core[grpc]<3.0.0,>=2.
|
|
24
|
+
Requires-Dist: google-api-core[grpc]<3.0.0,>=2.25.0
|
|
25
25
|
Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
|
|
26
26
|
Requires-Dist: grpcio<2.0.0,>=1.59.0
|
|
27
27
|
Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
|
|
28
28
|
Requires-Dist: proto-plus<2.0.0,>=1.26.1
|
|
29
29
|
Requires-Dist: protobuf<8.0.0,>=6.33.5
|
|
30
|
+
Requires-Dist: google-cloud-monitoring<3.0.0dev,>=2.0.0
|
|
30
31
|
Requires-Dist: google-cloud-core<3.0.0,>=2.0.0
|
|
31
32
|
Requires-Dist: grpc-google-iam-v1<1.0.0,>=0.14.2
|
|
32
|
-
Requires-Dist: google-crc32c<2.0.
|
|
33
|
+
Requires-Dist: google-crc32c<2.0.0,>=1.6.0
|
|
34
|
+
Requires-Dist: opentelemetry-api<2.0.0dev,>=1.0.0
|
|
35
|
+
Requires-Dist: opentelemetry-sdk<2.0.0dev,>=1.0.0
|
|
33
36
|
Provides-Extra: libcst
|
|
34
37
|
Requires-Dist: libcst>=0.2.5; extra == "libcst"
|
|
35
38
|
Dynamic: author
|
{google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/batcher.py
RENAMED
|
@@ -174,13 +174,25 @@ class MutationsBatcher(object):
|
|
|
174
174
|
request.
|
|
175
175
|
|
|
176
176
|
This class is not suited for usage in systems where each mutation
|
|
177
|
-
must be guaranteed to be sent, since calling mutate may only
|
|
178
|
-
in-memory change.
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
must be guaranteed to be sent, since calling :func:`mutate()` may only
|
|
178
|
+
result in an in-memory change. Rows are only sent to the service when a size
|
|
179
|
+
limit is reached, when :func:`flush()` is called explicitly, or when the
|
|
180
|
+
batcher is closed (:func:`close()` is also registered to run at interpreter
|
|
181
|
+
exit). There is no time-based background flush. As a result, if the process
|
|
182
|
+
terminates abruptly -- e.g. a crash, ``SIGKILL``, or ``os._exit`` where the
|
|
183
|
+
``atexit`` handler never runs -- any :class:`DirectRow` still buffered in
|
|
184
|
+
memory is silently dropped and never sent, even after :func:`mutate()`
|
|
185
|
+
returned.
|
|
181
186
|
|
|
182
187
|
Note on thread safety: The same :class:`MutationBatcher` cannot be shared by multiple end-user threads.
|
|
183
188
|
|
|
189
|
+
.. warning::
|
|
190
|
+
|
|
191
|
+
If using ``MutationsBatcher``, please ensure you are using
|
|
192
|
+
``google-cloud-bigtable >= 2.42.0``, or consider migrating to the
|
|
193
|
+
batcher provided by the synchronous/asynchronous data client
|
|
194
|
+
(:mod:`google.cloud.bigtable.data`).
|
|
195
|
+
|
|
184
196
|
:type table: class
|
|
185
197
|
:param table: class:`~google.cloud.bigtable.table.Table`.
|
|
186
198
|
|
|
@@ -196,8 +208,9 @@ class MutationsBatcher(object):
|
|
|
196
208
|
(5 MB).
|
|
197
209
|
|
|
198
210
|
:type flush_interval: float
|
|
199
|
-
:param flush_interval: (
|
|
200
|
-
|
|
211
|
+
:param flush_interval: (Deprecated) No longer used. Retained only for
|
|
212
|
+
backwards compatibility. There is no time-based background flush; see the
|
|
213
|
+
class docstring for when rows are sent.
|
|
201
214
|
|
|
202
215
|
:type batch_completed_callback: Callable[list:[`~google.rpc.status_pb2.Status`]] = None
|
|
203
216
|
:param batch_completed_callback: (Optional) A callable for handling responses
|
|
@@ -219,8 +232,12 @@ class MutationsBatcher(object):
|
|
|
219
232
|
self.table = table
|
|
220
233
|
self._executor = concurrent.futures.ThreadPoolExecutor()
|
|
221
234
|
atexit.register(self.close)
|
|
222
|
-
|
|
223
|
-
|
|
235
|
+
# ``flush_interval`` is retained for backwards compatibility but is no
|
|
236
|
+
# longer used: the previous background ``threading.Timer`` was one-shot
|
|
237
|
+
# (never re-armed), so it fired at most once and could silently drop the
|
|
238
|
+
# rows it dequeued if that single flush raised on the timer thread.
|
|
239
|
+
# Flushing now happens only on size thresholds, explicit ``flush()``,
|
|
240
|
+
# or ``close()`` (also registered via ``atexit``).
|
|
224
241
|
self.flow_control = _FlowControl(
|
|
225
242
|
max_mutations=MAX_OUTSTANDING_ELEMENTS,
|
|
226
243
|
max_mutation_bytes=MAX_OUTSTANDING_BYTES,
|
|
@@ -350,6 +367,26 @@ class MutationsBatcher(object):
|
|
|
350
367
|
processed_rows = self.futures_mapping[future]
|
|
351
368
|
self.flow_control.release(processed_rows)
|
|
352
369
|
del self.futures_mapping[future]
|
|
370
|
+
# Surface any exception raised inside the async flush. Without this, an
|
|
371
|
+
# exception raised by ``_flush_rows`` (e.g. a non-retryable RPC error, a
|
|
372
|
+
# retry deadline, or a response-count mismatch) would be stored on the
|
|
373
|
+
# future and silently discarded, so the failed mutations would never be
|
|
374
|
+
# reported to the user -- effectively silent data loss. Per-row errors
|
|
375
|
+
# from a successful RPC are already recorded in ``self.exceptions`` by
|
|
376
|
+
# ``_flush_rows``; here the whole batch failed with a single exception,
|
|
377
|
+
# so record it once per row in the batch to keep the reported error
|
|
378
|
+
# count aligned with the number of affected mutations.
|
|
379
|
+
#
|
|
380
|
+
# A cancelled future is "done", so this callback still runs for it, but
|
|
381
|
+
# ``future.exception()`` would raise ``CancelledError``. Nothing here
|
|
382
|
+
# cancels futures today, but guard against it so the callback stays
|
|
383
|
+
# correct if cancellation is ever introduced.
|
|
384
|
+
if future.cancelled():
|
|
385
|
+
return
|
|
386
|
+
exc = future.exception()
|
|
387
|
+
if exc is not None:
|
|
388
|
+
for _ in range(processed_rows.rows_count):
|
|
389
|
+
self.exceptions.put(exc)
|
|
353
390
|
|
|
354
391
|
def _row_fits_in_batch(self, row, batch_info):
|
|
355
392
|
"""Checks if a row can fit in the current batch.
|
|
@@ -405,7 +442,19 @@ class MutationsBatcher(object):
|
|
|
405
442
|
:raises:
|
|
406
443
|
* :exc:`.batcherMutationsBatchError` if there's any error in the mutations.
|
|
407
444
|
"""
|
|
408
|
-
|
|
445
|
+
try:
|
|
446
|
+
self.flush()
|
|
447
|
+
except MutationsBatchError as exc:
|
|
448
|
+
for e in exc.exc:
|
|
449
|
+
self.exceptions.put(e)
|
|
450
|
+
except Exception as exc:
|
|
451
|
+
# A failure in this final synchronous flush must not abort cleanup.
|
|
452
|
+
# If it propagated here it would skip the executor shutdown (leaving
|
|
453
|
+
# in-flight async flushes un-awaited) and skip draining
|
|
454
|
+
# self.exceptions, masking every error already captured from
|
|
455
|
+
# earlier async flushes -- silently discarding those failures.
|
|
456
|
+
# Record it like any other batch failure and continue.
|
|
457
|
+
self.exceptions.put(exc)
|
|
409
458
|
self._executor.shutdown(wait=True)
|
|
410
459
|
atexit.unregister(self.close)
|
|
411
460
|
if self.exceptions.qsize() > 0:
|
{google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/client.py
RENAMED
|
@@ -28,6 +28,7 @@ In the hierarchy of API concepts
|
|
|
28
28
|
:class:`~google.cloud.bigtable.row.Row` (and all the cells in the row)
|
|
29
29
|
"""
|
|
30
30
|
|
|
31
|
+
import copy
|
|
31
32
|
import os
|
|
32
33
|
import warnings
|
|
33
34
|
|
|
@@ -37,7 +38,7 @@ from google.auth.credentials import AnonymousCredentials # type: ignore
|
|
|
37
38
|
from google.cloud.client import ClientWithProject # type: ignore
|
|
38
39
|
from google.cloud.environment_vars import BIGTABLE_EMULATOR # type: ignore
|
|
39
40
|
|
|
40
|
-
from google.cloud import bigtable, bigtable_admin_v2
|
|
41
|
+
from google.cloud import bigtable, bigtable_admin_v2
|
|
41
42
|
from google.cloud.bigtable.cluster import _CLUSTER_NAME_RE, Cluster
|
|
42
43
|
from google.cloud.bigtable.instance import Instance
|
|
43
44
|
from google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.transports import (
|
|
@@ -47,7 +48,6 @@ from google.cloud.bigtable_admin_v2.services.bigtable_table_admin.transports imp
|
|
|
47
48
|
BigtableTableAdminGrpcTransport,
|
|
48
49
|
)
|
|
49
50
|
from google.cloud.bigtable_admin_v2.types import instance
|
|
50
|
-
from google.cloud.bigtable_v2.services.bigtable.transports import BigtableGrpcTransport
|
|
51
51
|
|
|
52
52
|
INSTANCE_TYPE_PRODUCTION = instance.Instance.Type.PRODUCTION
|
|
53
53
|
INSTANCE_TYPE_DEVELOPMENT = instance.Instance.Type.DEVELOPMENT
|
|
@@ -60,7 +60,6 @@ DATA_SCOPE = "https://www.googleapis.com/auth/bigtable.data"
|
|
|
60
60
|
READ_ONLY_SCOPE = "https://www.googleapis.com/auth/bigtable.data.readonly"
|
|
61
61
|
"""Scope for reading table data."""
|
|
62
62
|
|
|
63
|
-
_DEFAULT_BIGTABLE_EMULATOR_CLIENT = "google-cloud-bigtable-emulator"
|
|
64
63
|
_GRPC_CHANNEL_OPTIONS = (
|
|
65
64
|
("grpc.max_send_message_length", -1),
|
|
66
65
|
("grpc.max_receive_message_length", -1),
|
|
@@ -68,6 +67,8 @@ _GRPC_CHANNEL_OPTIONS = (
|
|
|
68
67
|
("grpc.keepalive_timeout_ms", 10000),
|
|
69
68
|
)
|
|
70
69
|
|
|
70
|
+
_DEFAULT_BIGTABLE_EMULATOR_CLIENT = "google-cloud-bigtable-emulator"
|
|
71
|
+
|
|
71
72
|
|
|
72
73
|
def _create_gapic_client(client_class, client_options=None, transport=None):
|
|
73
74
|
def inner(self):
|
|
@@ -284,18 +285,7 @@ class Client(ClientWithProject):
|
|
|
284
285
|
:rtype: :class:`.bigtable_v2.BigtableClient`
|
|
285
286
|
:returns: A BigtableClient object.
|
|
286
287
|
"""
|
|
287
|
-
|
|
288
|
-
transport = self._create_gapic_client_channel(
|
|
289
|
-
bigtable_v2.BigtableClient,
|
|
290
|
-
BigtableGrpcTransport,
|
|
291
|
-
)
|
|
292
|
-
klass = _create_gapic_client(
|
|
293
|
-
bigtable_v2.BigtableClient,
|
|
294
|
-
client_options=self._client_options,
|
|
295
|
-
transport=transport,
|
|
296
|
-
)
|
|
297
|
-
self._table_data_client = klass(self)
|
|
298
|
-
return self._table_data_client
|
|
288
|
+
return self._veneer_data_client._gapic_client
|
|
299
289
|
|
|
300
290
|
@property
|
|
301
291
|
def table_admin_client(self):
|
|
@@ -363,6 +353,23 @@ class Client(ClientWithProject):
|
|
|
363
353
|
self._instance_admin_client = klass(self)
|
|
364
354
|
return self._instance_admin_client
|
|
365
355
|
|
|
356
|
+
@property
|
|
357
|
+
def _veneer_data_client(self):
|
|
358
|
+
"""Getter for the new Data Table API."""
|
|
359
|
+
if self._table_data_client is None:
|
|
360
|
+
from google.cloud.bigtable.data import BigtableDataClient
|
|
361
|
+
|
|
362
|
+
client_info = copy.copy(self._client_info)
|
|
363
|
+
client_info.client_library_version = f"{bigtable.__version__}-data-shim"
|
|
364
|
+
self._table_data_client = BigtableDataClient(
|
|
365
|
+
project=self.project,
|
|
366
|
+
credentials=self._credentials,
|
|
367
|
+
client_options=self._client_options,
|
|
368
|
+
_client_info=client_info,
|
|
369
|
+
_disable_background_refresh=True,
|
|
370
|
+
)
|
|
371
|
+
return self._table_data_client
|
|
372
|
+
|
|
366
373
|
def instance(self, instance_id, display_name=None, instance_type=None, labels=None):
|
|
367
374
|
"""Factory to create a instance associated with this client.
|
|
368
375
|
|
|
@@ -23,7 +23,7 @@ import google.cloud.bigtable.data.exceptions as bt_exceptions
|
|
|
23
23
|
import google.cloud.bigtable_v2.types.bigtable as types_pb
|
|
24
24
|
from google.cloud.bigtable.data._cross_sync import CrossSync
|
|
25
25
|
from google.cloud.bigtable.data._helpers import _attempt_timeout_generator
|
|
26
|
-
from google.cloud.bigtable.data._metrics import tracked_retry
|
|
26
|
+
from google.cloud.bigtable.data._metrics.tracked_retry import tracked_retry
|
|
27
27
|
|
|
28
28
|
# mutate_rows requests are limited to this number of mutations
|
|
29
29
|
from google.cloud.bigtable.data.mutations import (
|
|
@@ -214,6 +214,18 @@ class _MutateRowsOperationAsync:
|
|
|
214
214
|
self._handle_entry_error(idx, exc)
|
|
215
215
|
# bubble up exception to be handled by retry wrapper
|
|
216
216
|
raise
|
|
217
|
+
# Any entries that were sent but never received a response entry (a
|
|
218
|
+
# successfully-closed but incomplete stream) must not be treated as
|
|
219
|
+
# successful. Record a retryable error so idempotent entries are retried
|
|
220
|
+
# and non-idempotent entries surface as failures instead of being
|
|
221
|
+
# silently dropped.
|
|
222
|
+
for idx in active_request_indices.values():
|
|
223
|
+
self._handle_entry_error(
|
|
224
|
+
idx,
|
|
225
|
+
bt_exceptions._MutateRowsIncomplete(
|
|
226
|
+
"no response entry received for mutation"
|
|
227
|
+
),
|
|
228
|
+
)
|
|
217
229
|
# check if attempt succeeded, or needs to be retried
|
|
218
230
|
if self.remaining_indices:
|
|
219
231
|
# unfinished work; raise exception to trigger retry
|
|
@@ -25,7 +25,7 @@ from google.cloud.bigtable.data._cross_sync import CrossSync
|
|
|
25
25
|
from google.cloud.bigtable.data._helpers import (
|
|
26
26
|
_attempt_timeout_generator,
|
|
27
27
|
)
|
|
28
|
-
from google.cloud.bigtable.data._metrics import tracked_retry
|
|
28
|
+
from google.cloud.bigtable.data._metrics.tracked_retry import tracked_retry
|
|
29
29
|
from google.cloud.bigtable.data.exceptions import (
|
|
30
30
|
InvalidChunk,
|
|
31
31
|
_ResetRow,
|
|
@@ -17,6 +17,7 @@ from __future__ import annotations
|
|
|
17
17
|
|
|
18
18
|
import abc
|
|
19
19
|
import concurrent.futures
|
|
20
|
+
import logging
|
|
20
21
|
import os
|
|
21
22
|
import random
|
|
22
23
|
import time
|
|
@@ -49,10 +50,10 @@ from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper
|
|
|
49
50
|
from google.protobuf.message import Message
|
|
50
51
|
from grpc import Channel
|
|
51
52
|
|
|
52
|
-
from google.cloud.bigtable.client import _DEFAULT_BIGTABLE_EMULATOR_CLIENT
|
|
53
53
|
from google.cloud.bigtable.data._cross_sync import CrossSync
|
|
54
54
|
from google.cloud.bigtable.data._helpers import (
|
|
55
55
|
_CONCURRENCY_LIMIT,
|
|
56
|
+
_DEFAULT_BIGTABLE_EMULATOR_CLIENT,
|
|
56
57
|
TABLE_DEFAULT,
|
|
57
58
|
_align_timeouts,
|
|
58
59
|
_attempt_timeout_generator,
|
|
@@ -64,10 +65,16 @@ from google.cloud.bigtable.data._helpers import (
|
|
|
64
65
|
_WarmedInstanceKey,
|
|
65
66
|
)
|
|
66
67
|
from google.cloud.bigtable.data._metrics import (
|
|
68
|
+
ActiveOperationMetric,
|
|
67
69
|
BigtableClientSideMetricsController,
|
|
68
70
|
OperationType,
|
|
69
|
-
tracked_retry,
|
|
70
71
|
)
|
|
72
|
+
from google.cloud.bigtable.data._metrics.handlers._base import MetricsHandler
|
|
73
|
+
from google.cloud.bigtable.data._metrics.handlers.gcp_exporter import (
|
|
74
|
+
BigtableMetricsExporter,
|
|
75
|
+
GoogleCloudMetricsHandler,
|
|
76
|
+
)
|
|
77
|
+
from google.cloud.bigtable.data._metrics.tracked_retry import tracked_retry
|
|
71
78
|
from google.cloud.bigtable.data.exceptions import (
|
|
72
79
|
FailedQueryShardError,
|
|
73
80
|
ShardedReadRowsExceptionGroup,
|
|
@@ -159,6 +166,8 @@ if TYPE_CHECKING:
|
|
|
159
166
|
|
|
160
167
|
__CROSS_SYNC_OUTPUT__ = "google.cloud.bigtable.data._sync_autogen.client"
|
|
161
168
|
|
|
169
|
+
_LOGGER = logging.getLogger(__name__)
|
|
170
|
+
|
|
162
171
|
|
|
163
172
|
@CrossSync.convert_class(
|
|
164
173
|
sync_name="BigtableDataClient",
|
|
@@ -209,9 +218,15 @@ class BigtableDataClientAsync(ClientWithProject):
|
|
|
209
218
|
"""
|
|
210
219
|
if "pool_size" in kwargs:
|
|
211
220
|
warnings.warn("pool_size no longer supported")
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
221
|
+
|
|
222
|
+
# set up client info headers for veneer library. _client_info is for internal use only,
|
|
223
|
+
# for the legacy client shim.
|
|
224
|
+
if kwargs.get("_client_info"):
|
|
225
|
+
self.client_info = kwargs["_client_info"]
|
|
226
|
+
else:
|
|
227
|
+
self.client_info = DEFAULT_CLIENT_INFO
|
|
228
|
+
self.client_info.client_library_version = self._client_version()
|
|
229
|
+
|
|
215
230
|
# parse client options
|
|
216
231
|
if type(client_options) is dict:
|
|
217
232
|
client_options = client_options_lib.from_dict(client_options)
|
|
@@ -262,6 +277,31 @@ class BigtableDataClientAsync(ClientWithProject):
|
|
|
262
277
|
"is the default."
|
|
263
278
|
)
|
|
264
279
|
self._is_closed = CrossSync.Event()
|
|
280
|
+
# Private argument, for internal use only
|
|
281
|
+
self._disable_background_refresh = bool(
|
|
282
|
+
kwargs.get("_disable_background_refresh", False)
|
|
283
|
+
)
|
|
284
|
+
handlers: list[MetricsHandler] = []
|
|
285
|
+
if self._emulator_host is None:
|
|
286
|
+
try:
|
|
287
|
+
# create a metrics exporter using the same client configuration
|
|
288
|
+
exporter = BigtableMetricsExporter(
|
|
289
|
+
credentials=self._credentials,
|
|
290
|
+
client_options=client_options,
|
|
291
|
+
)
|
|
292
|
+
handlers.append(
|
|
293
|
+
GoogleCloudMetricsHandler(
|
|
294
|
+
exporter=exporter,
|
|
295
|
+
client_version=self._client_version(),
|
|
296
|
+
)
|
|
297
|
+
)
|
|
298
|
+
except Exception as e:
|
|
299
|
+
_LOGGER.warning(
|
|
300
|
+
"Failed to initialize Google Cloud Metrics Exporter: %s. "
|
|
301
|
+
"Client-side metrics will be disabled.",
|
|
302
|
+
e,
|
|
303
|
+
)
|
|
304
|
+
self._metrics = BigtableClientSideMetricsController(handlers=handlers)
|
|
265
305
|
self.transport = cast(TransportType, self._gapic_client.transport)
|
|
266
306
|
# keep track of active instances to for warmup on channel refresh
|
|
267
307
|
self._active_instances: Set[_WarmedInstanceKey] = set()
|
|
@@ -372,6 +412,7 @@ class BigtableDataClientAsync(ClientWithProject):
|
|
|
372
412
|
not self._channel_refresh_task
|
|
373
413
|
and not self._emulator_host
|
|
374
414
|
and not self._is_closed.is_set()
|
|
415
|
+
and not self._disable_background_refresh
|
|
375
416
|
):
|
|
376
417
|
# raise error if not in an event loop in async client
|
|
377
418
|
CrossSync.verify_async_event_loop()
|
|
@@ -394,6 +435,7 @@ class BigtableDataClientAsync(ClientWithProject):
|
|
|
394
435
|
if self._executor:
|
|
395
436
|
self._executor.shutdown(wait=False)
|
|
396
437
|
self._channel_refresh_task = None
|
|
438
|
+
self._metrics.close()
|
|
397
439
|
|
|
398
440
|
@CrossSync.convert
|
|
399
441
|
async def _ping_and_warm_instances(
|
|
@@ -1109,8 +1151,6 @@ class _DataApiTargetAsync(abc.ABC):
|
|
|
1109
1151
|
default_retryable_errors or ()
|
|
1110
1152
|
)
|
|
1111
1153
|
|
|
1112
|
-
self._metrics = BigtableClientSideMetricsController()
|
|
1113
|
-
|
|
1114
1154
|
try:
|
|
1115
1155
|
self._register_instance_future = CrossSync.create_task(
|
|
1116
1156
|
self.client._register_instance,
|
|
@@ -1124,6 +1164,21 @@ class _DataApiTargetAsync(abc.ABC):
|
|
|
1124
1164
|
f"{self.__class__.__name__} must be created within an async event loop context."
|
|
1125
1165
|
) from e
|
|
1126
1166
|
|
|
1167
|
+
def _create_operation(
|
|
1168
|
+
self, op_type: OperationType, **kwargs
|
|
1169
|
+
) -> ActiveOperationMetric:
|
|
1170
|
+
table_id = getattr(self, "table_id", None) or getattr(
|
|
1171
|
+
self, "materialized_view_id", None
|
|
1172
|
+
)
|
|
1173
|
+
return self.client._metrics.create_operation(
|
|
1174
|
+
op_type,
|
|
1175
|
+
project_id=self.client.project,
|
|
1176
|
+
instance_id=self.instance_id,
|
|
1177
|
+
table_id=table_id,
|
|
1178
|
+
app_profile_id=self.app_profile_id,
|
|
1179
|
+
**kwargs,
|
|
1180
|
+
)
|
|
1181
|
+
|
|
1127
1182
|
@property
|
|
1128
1183
|
@abc.abstractmethod
|
|
1129
1184
|
def _request_path(self) -> dict[str, str]:
|
|
@@ -1189,9 +1244,7 @@ class _DataApiTargetAsync(abc.ABC):
|
|
|
1189
1244
|
self,
|
|
1190
1245
|
operation_timeout=operation_timeout,
|
|
1191
1246
|
attempt_timeout=attempt_timeout,
|
|
1192
|
-
metric=self.
|
|
1193
|
-
OperationType.READ_ROWS, is_streaming=True
|
|
1194
|
-
),
|
|
1247
|
+
metric=self._create_operation(OperationType.READ_ROWS, is_streaming=True),
|
|
1195
1248
|
retryable_exceptions=retryable_excs,
|
|
1196
1249
|
)
|
|
1197
1250
|
return row_merger.start_operation()
|
|
@@ -1295,9 +1348,7 @@ class _DataApiTargetAsync(abc.ABC):
|
|
|
1295
1348
|
self,
|
|
1296
1349
|
operation_timeout=operation_timeout,
|
|
1297
1350
|
attempt_timeout=attempt_timeout,
|
|
1298
|
-
metric=self.
|
|
1299
|
-
OperationType.READ_ROWS, is_streaming=False
|
|
1300
|
-
),
|
|
1351
|
+
metric=self._create_operation(OperationType.READ_ROWS, is_streaming=False),
|
|
1301
1352
|
retryable_exceptions=retryable_excs,
|
|
1302
1353
|
)
|
|
1303
1354
|
results_generator = row_merger.start_operation()
|
|
@@ -1512,9 +1563,7 @@ class _DataApiTargetAsync(abc.ABC):
|
|
|
1512
1563
|
retryable_excs = _get_retryable_errors(retryable_errors, self)
|
|
1513
1564
|
predicate = retries.if_exception_type(*retryable_excs)
|
|
1514
1565
|
|
|
1515
|
-
with self.
|
|
1516
|
-
OperationType.SAMPLE_ROW_KEYS
|
|
1517
|
-
) as operation_metric:
|
|
1566
|
+
with self._create_operation(OperationType.SAMPLE_ROW_KEYS) as operation_metric:
|
|
1518
1567
|
|
|
1519
1568
|
@CrossSync.convert
|
|
1520
1569
|
async def execute_rpc():
|
|
@@ -1646,9 +1695,7 @@ class _DataApiTargetAsync(abc.ABC):
|
|
|
1646
1695
|
# mutations should not be retried
|
|
1647
1696
|
predicate = retries.if_exception_type()
|
|
1648
1697
|
|
|
1649
|
-
with self.
|
|
1650
|
-
OperationType.MUTATE_ROW
|
|
1651
|
-
) as operation_metric:
|
|
1698
|
+
with self._create_operation(OperationType.MUTATE_ROW) as operation_metric:
|
|
1652
1699
|
target = partial(
|
|
1653
1700
|
self.client._gapic_client.mutate_row,
|
|
1654
1701
|
request=MutateRowRequest(
|
|
@@ -1722,7 +1769,7 @@ class _DataApiTargetAsync(abc.ABC):
|
|
|
1722
1769
|
mutation_entries,
|
|
1723
1770
|
operation_timeout,
|
|
1724
1771
|
attempt_timeout,
|
|
1725
|
-
metric=self.
|
|
1772
|
+
metric=self._create_operation(OperationType.BULK_MUTATE_ROWS),
|
|
1726
1773
|
retryable_exceptions=retryable_excs,
|
|
1727
1774
|
)
|
|
1728
1775
|
await operation.start()
|
|
@@ -1781,7 +1828,7 @@ class _DataApiTargetAsync(abc.ABC):
|
|
|
1781
1828
|
false_case_mutations = [false_case_mutations]
|
|
1782
1829
|
false_case_list = [m._to_pb() for m in false_case_mutations or []]
|
|
1783
1830
|
|
|
1784
|
-
with self.
|
|
1831
|
+
with self._create_operation(OperationType.CHECK_AND_MUTATE):
|
|
1785
1832
|
result = await self.client._gapic_client.check_and_mutate_row(
|
|
1786
1833
|
request=CheckAndMutateRowRequest(
|
|
1787
1834
|
true_mutations=true_case_list,
|
|
@@ -1839,7 +1886,7 @@ class _DataApiTargetAsync(abc.ABC):
|
|
|
1839
1886
|
if not rules:
|
|
1840
1887
|
raise ValueError("rules must contain at least one item")
|
|
1841
1888
|
|
|
1842
|
-
with self.
|
|
1889
|
+
with self._create_operation(OperationType.READ_MODIFY_WRITE):
|
|
1843
1890
|
result = await self.client._gapic_client.read_modify_write_row(
|
|
1844
1891
|
request=ReadModifyWriteRowRequest(
|
|
1845
1892
|
rules=[rule._to_pb() for rule in rules],
|
|
@@ -1860,7 +1907,6 @@ class _DataApiTargetAsync(abc.ABC):
|
|
|
1860
1907
|
"""
|
|
1861
1908
|
Called to close the Table instance and release any resources held by it.
|
|
1862
1909
|
"""
|
|
1863
|
-
self._metrics.close()
|
|
1864
1910
|
if self._register_instance_future:
|
|
1865
1911
|
self._register_instance_future.cancel()
|
|
1866
1912
|
self.client._remove_instance_registration(
|
|
@@ -379,7 +379,7 @@ class MutationsBatcherAsync:
|
|
|
379
379
|
# flush new entries
|
|
380
380
|
in_process_requests: list[CrossSync.Future[list[FailedMutationEntryError]]] = []
|
|
381
381
|
async for batch, metric in self._flow_control.add_to_flow_with_metrics(
|
|
382
|
-
new_entries, self._target._metrics
|
|
382
|
+
new_entries, self._target.client._metrics
|
|
383
383
|
):
|
|
384
384
|
batch_task = CrossSync.create_task(
|
|
385
385
|
self._execute_mutate_rows,
|
{google_cloud_bigtable-2.41.0 → google_cloud_bigtable-2.43.0}/google/cloud/bigtable/data/_helpers.py
RENAMED
|
@@ -47,6 +47,9 @@ ShardedQuery = List[ReadRowsQuery]
|
|
|
47
47
|
# used by read_rows_sharded to limit how many requests are attempted in parallel
|
|
48
48
|
_CONCURRENCY_LIMIT = 10
|
|
49
49
|
|
|
50
|
+
# used by every data client as a default project name for testing on Bigtable emulator.
|
|
51
|
+
_DEFAULT_BIGTABLE_EMULATOR_CLIENT = "google-cloud-bigtable-emulator"
|
|
52
|
+
|
|
50
53
|
# used to identify an active bigtable resource that needs to be warmed through PingAndWarm
|
|
51
54
|
# each instance/app_profile_id pair needs to be individually tracked
|
|
52
55
|
_WarmedInstanceKey = namedtuple(
|
|
@@ -19,6 +19,12 @@ from google.cloud.bigtable.data._metrics.data_model import (
|
|
|
19
19
|
OperationState,
|
|
20
20
|
OperationType,
|
|
21
21
|
)
|
|
22
|
+
from google.cloud.bigtable.data._metrics.handlers.gcp_exporter import (
|
|
23
|
+
GoogleCloudMetricsHandler,
|
|
24
|
+
)
|
|
25
|
+
from google.cloud.bigtable.data._metrics.handlers.opentelemetry import (
|
|
26
|
+
OpenTelemetryMetricsHandler,
|
|
27
|
+
)
|
|
22
28
|
from google.cloud.bigtable.data._metrics.metrics_controller import (
|
|
23
29
|
BigtableClientSideMetricsController,
|
|
24
30
|
)
|
|
@@ -26,6 +32,8 @@ from google.cloud.bigtable.data._metrics.tracked_retry import tracked_retry
|
|
|
26
32
|
|
|
27
33
|
__all__ = (
|
|
28
34
|
"BigtableClientSideMetricsController",
|
|
35
|
+
"OpenTelemetryMetricsHandler",
|
|
36
|
+
"GoogleCloudMetricsHandler",
|
|
29
37
|
"OperationType",
|
|
30
38
|
"OperationState",
|
|
31
39
|
"ActiveOperationMetric",
|
|
@@ -118,6 +118,10 @@ class CompletedOperationMetric:
|
|
|
118
118
|
cluster_id: str
|
|
119
119
|
zone: str
|
|
120
120
|
is_streaming: bool
|
|
121
|
+
project_id: str | None = None
|
|
122
|
+
instance_id: str | None = None
|
|
123
|
+
table_id: str | None = None
|
|
124
|
+
app_profile_id: str | None = None
|
|
121
125
|
first_response_latency_ns: int | None = None
|
|
122
126
|
flow_throttling_time_ns: int = 0
|
|
123
127
|
|
|
@@ -136,7 +140,6 @@ class ActiveAttemptMetric:
|
|
|
136
140
|
# time waiting on user to process the response, in nanoseconds
|
|
137
141
|
# currently only relevant for ReadRows
|
|
138
142
|
application_blocking_time_ns: int = 0
|
|
139
|
-
# backoff time is added to application_blocking_time_ns
|
|
140
143
|
backoff_before_attempt_ns: int = 0
|
|
141
144
|
|
|
142
145
|
|
|
@@ -160,6 +163,10 @@ class ActiveOperationMetric:
|
|
|
160
163
|
active_attempt: ActiveAttemptMetric | None = None
|
|
161
164
|
cluster_id: str | None = None
|
|
162
165
|
zone: str | None = None
|
|
166
|
+
project_id: str | None = None
|
|
167
|
+
instance_id: str | None = None
|
|
168
|
+
table_id: str | None = None
|
|
169
|
+
app_profile_id: str | None = None
|
|
163
170
|
completed_attempts: list[CompletedAttemptMetric] = field(default_factory=list)
|
|
164
171
|
is_streaming: bool = False # only True for read_rows operations
|
|
165
172
|
handlers: list[MetricsHandler] = field(default_factory=list)
|
|
@@ -375,6 +382,10 @@ class ActiveOperationMetric:
|
|
|
375
382
|
cluster_id=self.cluster_id or DEFAULT_CLUSTER_ID,
|
|
376
383
|
zone=self.zone or DEFAULT_ZONE,
|
|
377
384
|
is_streaming=self.is_streaming,
|
|
385
|
+
project_id=self.project_id,
|
|
386
|
+
instance_id=self.instance_id,
|
|
387
|
+
table_id=self.table_id,
|
|
388
|
+
app_profile_id=self.app_profile_id,
|
|
378
389
|
first_response_latency_ns=self.first_response_latency_ns,
|
|
379
390
|
flow_throttling_time_ns=self.flow_throttling_time_ns,
|
|
380
391
|
)
|