Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit e534cc2

Browse files
committed
Moved _DEFAULT_BIGTABLE_EMULATOR_CLIENT to _helpers
1 parent ca1b715 commit e534cc2

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

google/cloud/bigtable/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
from google.cloud.environment_vars import BIGTABLE_EMULATOR # type: ignore
5454

5555
from google.cloud.bigtable.data import BigtableDataClient
56-
from google.cloud.bigtable.data._sync_autogen.client import (
56+
from google.cloud.bigtable.data._helpers import (
5757
_DEFAULT_BIGTABLE_EMULATOR_CLIENT,
5858
)
5959

google/cloud/bigtable/data/_async/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
from google.cloud.bigtable.data._helpers import TABLE_DEFAULT, _align_timeouts
7373
from google.cloud.bigtable.data._helpers import _WarmedInstanceKey
7474
from google.cloud.bigtable.data._helpers import _CONCURRENCY_LIMIT
75+
from google.cloud.bigtable.data._helpers import _DEFAULT_BIGTABLE_EMULATOR_CLIENT
7576
from google.cloud.bigtable.data._helpers import _retry_exception_factory
7677
from google.cloud.bigtable.data._helpers import _validate_timeouts
7778
from google.cloud.bigtable.data._helpers import _get_error_type
@@ -132,7 +133,6 @@
132133

133134

134135
__CROSS_SYNC_OUTPUT__ = "google.cloud.bigtable.data._sync_autogen.client"
135-
_DEFAULT_BIGTABLE_EMULATOR_CLIENT = "google-cloud-bigtable-emulator"
136136

137137

138138
@CrossSync.convert_class(

google/cloud/bigtable/data/_helpers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
# used by read_rows_sharded to limit how many requests are attempted in parallel
4545
_CONCURRENCY_LIMIT = 10
4646

47+
# used by every data client as a default project name for testing on Bigtable emulator.
48+
_DEFAULT_BIGTABLE_EMULATOR_CLIENT = "google-cloud-bigtable-emulator"
49+
4750
# used to identify an active bigtable resource that needs to be warmed through PingAndWarm
4851
# each instance/app_profile_id pair needs to be individually tracked
4952
_WarmedInstanceKey = namedtuple(

google/cloud/bigtable/data/_sync_autogen/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
from google.cloud.bigtable.data._helpers import TABLE_DEFAULT, _align_timeouts
6262
from google.cloud.bigtable.data._helpers import _WarmedInstanceKey
6363
from google.cloud.bigtable.data._helpers import _CONCURRENCY_LIMIT
64+
from google.cloud.bigtable.data._helpers import _DEFAULT_BIGTABLE_EMULATOR_CLIENT
6465
from google.cloud.bigtable.data._helpers import _retry_exception_factory
6566
from google.cloud.bigtable.data._helpers import _validate_timeouts
6667
from google.cloud.bigtable.data._helpers import _get_error_type
@@ -92,7 +93,6 @@
9293
from google.cloud.bigtable.data.execute_query._sync_autogen.execute_query_iterator import (
9394
ExecuteQueryIterator,
9495
)
95-
_DEFAULT_BIGTABLE_EMULATOR_CLIENT = "google-cloud-bigtable-emulator"
9696

9797

9898
@CrossSync._Sync_Impl.add_mapping_decorator("DataClient")

0 commit comments

Comments
 (0)