@@ -89,9 +89,6 @@ public class EnhancedBigtableStubSettings extends StubSettings<EnhancedBigtableS
89
89
private static final int MAX_MESSAGE_SIZE = 256 * 1024 * 1024 ;
90
90
private static final String SERVER_DEFAULT_APP_PROFILE_ID = "" ;
91
91
92
- // TODO(weiranf): Remove this temporary endpoint once DirectPath goes to public beta
93
- private static final String DIRECT_PATH_ENDPOINT = "test-bigtable.sandbox.googleapis.com:443" ;
94
-
95
92
private static final Set <Code > IDEMPOTENT_RETRY_CODES =
96
93
ImmutableSet .of (Code .DEADLINE_EXCEEDED , Code .UNAVAILABLE );
97
94
@@ -170,12 +167,6 @@ public class EnhancedBigtableStubSettings extends StubSettings<EnhancedBigtableS
170
167
private EnhancedBigtableStubSettings (Builder builder ) {
171
168
super (builder );
172
169
173
- if (DIRECT_PATH_ENDPOINT .equals (builder .getEndpoint ())) {
174
- logger .warning (
175
- "Connecting to Bigtable using DirectPath."
176
- + " This is currently an experimental feature and should not be used in production." );
177
- }
178
-
179
170
// Since point reads, streaming reads, bulk reads share the same base callable that converts
180
171
// grpc errors into ApiExceptions, they must have the same retry codes.
181
172
Preconditions .checkState (
@@ -248,13 +239,9 @@ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProvi
248
239
.setKeepAliveTime (Duration .ofSeconds (30 )) // sends ping in this interval
249
240
.setKeepAliveTimeout (
250
241
Duration .ofSeconds (10 )) // wait this long before considering the connection dead
251
- // TODO(weiranf): Set this to true by default once DirectPath goes to public beta
252
- .setAttemptDirectPath (isDirectPathEnabled ());
253
- }
254
-
255
- // TODO(weiranf): Remove this once DirectPath goes to public beta
256
- private static boolean isDirectPathEnabled () {
257
- return Boolean .getBoolean ("bigtable.attempt-directpath" );
242
+ // Attempts direct access to CBT service over gRPC to improve throughput,
243
+ // whether the attempt is allowed is totally controlled by service owner.
244
+ .setAttemptDirectPath (true );
258
245
}
259
246
260
247
static int getDefaultChannelPoolSize () {
@@ -529,14 +516,7 @@ private Builder() {
529
516
// Defaults provider
530
517
BigtableStubSettings .Builder baseDefaults = BigtableStubSettings .newBuilder ();
531
518
532
- // TODO(weiranf): remove this once DirectPath goes to public Beta and uses the default
533
- // endpoint.
534
- if (isDirectPathEnabled ()) {
535
- setEndpoint (DIRECT_PATH_ENDPOINT );
536
- } else {
537
- setEndpoint (baseDefaults .getEndpoint ());
538
- }
539
-
519
+ setEndpoint (baseDefaults .getEndpoint ());
540
520
setTransportChannelProvider (defaultTransportChannelProvider ());
541
521
setStreamWatchdogCheckInterval (baseDefaults .getStreamWatchdogCheckInterval ());
542
522
setStreamWatchdogProvider (baseDefaults .getStreamWatchdogProvider ());
0 commit comments