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

Commit e220058

Browse files
chore: add a system property for DirectAccess enablement
This is needed for internal tooling to configure DirectAccess state in process Change-Id: I3ce30b04c7b57ec0f7019145aa90c7972cce7752
1 parent d5565b5 commit e220058

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ public class EnhancedBigtableStubSettings extends StubSettings<EnhancedBigtableS
100100

101101
// TODO change this to true when enabling directpath by default
102102
// For now, Only runs Direct Access Checker if user explicitly sets CBT_ENABLE_DIRECTPATH=true
103-
private static final DirectPathConfig DIRECT_PATH_CONFIG =
104-
Optional.ofNullable(System.getenv("CBT_ENABLE_DIRECTPATH"))
103+
private static DirectPathConfig DIRECT_PATH_CONFIG =
104+
Optional.ofNullable(
105+
Optional.ofNullable(System.getenv("CBT_ENABLE_DIRECTPATH"))
106+
.orElse(System.getProperty("bigtable.internal.enable-directpath")))
105107
.map(Boolean::parseBoolean)
106108
.map(b -> b ? DirectPathConfig.FORCED_ON : DirectPathConfig.FORCED_OFF)
107109
.orElse(DirectPathConfig.DEFAULT);

0 commit comments

Comments
 (0)