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

Commit afc7d44

Browse files
committed
fix
1 parent f56667a commit afc7d44

2 files changed

Lines changed: 20 additions & 23 deletions

File tree

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/ClassicDirectAccessChecker.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,19 @@ public boolean check(Channel channel) {
6464
}
6565
}
6666

67-
/**
68-
* Executes the underlying RPC and evaluates the eligibility.
69-
*/
67+
/** Executes the underlying RPC and evaluates the eligibility. */
7068
private boolean evaluateEligibility(Channel channel) {
7169
MetadataExtractorInterceptor interceptor = createInterceptor();
7270
Channel interceptedChannel = ClientInterceptors.intercept(channel, interceptor);
7371
channelPrimer.primeChannel(interceptedChannel);
7472
MetadataExtractorInterceptor.SidebandData sidebandData = interceptor.getSidebandData();
7573

7674
boolean isEligible =
77-
Optional.ofNullable(sidebandData)
78-
.map(MetadataExtractorInterceptor.SidebandData::getPeerInfo)
79-
.map(PeerInfo::getTransportType)
80-
.map(type -> type == PeerInfo.TransportType.TRANSPORT_TYPE_DIRECT_ACCESS)
81-
.orElse(false);
75+
Optional.ofNullable(sidebandData)
76+
.map(MetadataExtractorInterceptor.SidebandData::getPeerInfo)
77+
.map(PeerInfo::getTransportType)
78+
.map(type -> type == PeerInfo.TransportType.TRANSPORT_TYPE_DIRECT_ACCESS)
79+
.orElse(false);
8280

8381
if (isEligible) {
8482
// getIp should be non-null as isEligible is true

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

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -252,25 +252,24 @@ public ClientOperationSettings getPerOpSettings() {
252252
return perOpSettings;
253253
}
254254

255-
256255
/** Returns a builder for the default ChannelProvider for this service. */
257256
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
258257
InstantiatingGrpcChannelProvider.Builder grpcTransportProviderBuilder =
259-
BigtableStubSettings.defaultGrpcTransportProviderBuilder();
258+
BigtableStubSettings.defaultGrpcTransportProviderBuilder();
260259
return grpcTransportProviderBuilder
261-
.setChannelPoolSettings(
262-
ChannelPoolSettings.builder()
263-
.setInitialChannelCount(10)
264-
.setMinRpcsPerChannel(1)
265-
// Keep it conservative as we scale the channel size every 1min
266-
// and delta is 2 channels.
267-
.setMaxRpcsPerChannel(25)
268-
.setPreemptiveRefreshEnabled(true)
269-
.build())
270-
.setMaxInboundMessageSize(MAX_MESSAGE_SIZE)
271-
.setKeepAliveTime(Duration.ofSeconds(30)) // sends ping in this interval
272-
.setKeepAliveTimeout(
273-
Duration.ofSeconds(10)); // wait this long before considering the connection dead
260+
.setChannelPoolSettings(
261+
ChannelPoolSettings.builder()
262+
.setInitialChannelCount(10)
263+
.setMinRpcsPerChannel(1)
264+
// Keep it conservative as we scale the channel size every 1min
265+
// and delta is 2 channels.
266+
.setMaxRpcsPerChannel(25)
267+
.setPreemptiveRefreshEnabled(true)
268+
.build())
269+
.setMaxInboundMessageSize(MAX_MESSAGE_SIZE)
270+
.setKeepAliveTime(Duration.ofSeconds(30)) // sends ping in this interval
271+
.setKeepAliveTimeout(
272+
Duration.ofSeconds(10)); // wait this long before considering the connection dead
274273
}
275274

276275
/** Applies Direct Access traits to an existing builder. */

0 commit comments

Comments
 (0)