m-trieu commented on code in PR #31504:
URL: https://github.com/apache/beam/pull/31504#discussion_r1634274834
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/stubs/WindmillChannelFactory.java:
##########
@@ -55,31 +54,24 @@ public static Channel localhostChannel(int port) {
public static ManagedChannel remoteChannel(
WindmillServiceAddress windmillServiceAddress, int
windmillServiceRpcChannelTimeoutSec) {
switch (windmillServiceAddress.getKind()) {
- case IPV6:
- return remoteChannel(windmillServiceAddress.ipv6(),
windmillServiceRpcChannelTimeoutSec);
case GCP_SERVICE_ADDRESS:
return remoteChannel(
windmillServiceAddress.gcpServiceAddress(),
windmillServiceRpcChannelTimeoutSec);
- // switch is exhaustive will never happen.
case AUTHENTICATED_GCP_SERVICE_ADDRESS:
- return remoteDirectChannel(
- windmillServiceAddress.authenticatedGcpServiceAddress(),
- windmillServiceRpcChannelTimeoutSec);
+ return
remoteDirectChannel(windmillServiceAddress.authenticatedGcpServiceAddress());
+ // switch is exhaustive will never happen.
default:
throw new UnsupportedOperationException(
- "Only IPV6, GCP_SERVICE_ADDRESS, AUTHENTICATED_GCP_SERVICE_ADDRESS
are supported WindmillServiceAddresses.");
+ "Only GCP_SERVICE_ADDRESS or AUTHENTICATED_GCP_SERVICE_ADDRESS are
supported WindmillServiceAddress Kinds.");
}
}
static ManagedChannel remoteDirectChannel(
- AuthenticatedGcpServiceAddress authenticatedGcpServiceAddress,
- int windmillServiceRpcChannelTimeoutSec) {
- return withDefaultChannelOptions(
- AltsChannelBuilder.forAddress(
-
authenticatedGcpServiceAddress.gcpServiceAddress().getHost(),
-
authenticatedGcpServiceAddress.gcpServiceAddress().getPort())
-
.overrideAuthority(authenticatedGcpServiceAddress.authenticatingService()),
- windmillServiceRpcChannelTimeoutSec)
+ AuthenticatedGcpServiceAddress authenticatedGcpServiceAddress) {
+ return AltsChannelBuilder.forAddress(
Review Comment:
reverted
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]