Skip to content

Commit b01e8ec

Browse files
chore: add a system property for DirectAccess enablement (#2872)
This is needed for internal tooling to configure DirectAccess state in process Change-Id: I3ce30b04c7b57ec0f7019145aa90c7972cce7752 Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Rollback plan is reviewed and LGTMed - [ ] All new data plane features have a completed end to end testing plan Fixes #<issue_number_goes_here> ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
1 parent d41c775 commit b01e8ec

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.kokoro/presubmit/integration.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env_vars: {
88

99
env_vars: {
1010
key: "INTEGRATION_TEST_ARGS"
11-
value: "-P bigtable-emulator-it,bigtable-prod-it,bigtable-prod-batch-it,enable-verbose-grpc-logs -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable -Dbigtable.table=integration-tests -Dbigtable.kms_key_name=projects/gcloud-devel/locations/us-east1/keyRings/cmek-test-key-ring/cryptoKeys/cmek-test-key -Dbigtable.wait-for-cmek-key-status=true"
11+
value: "-P bigtable-prod-it,enable-verbose-grpc-logs -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable -Dbigtable.table=integration-tests -Dbigtable.kms_key_name=projects/gcloud-devel/locations/us-east1/keyRings/cmek-test-key-ring/cryptoKeys/cmek-test-key -Dbigtable.wait-for-cmek-key-status=true"
1212
}
1313

1414
env_vars: {

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)