chamikaramj commented on code in PR #28783:
URL: https://github.com/apache/beam/pull/28783#discussion_r1353225798
##########
sdks/java/transform-service/src/main/java/org/apache/beam/sdk/transformservice/ExpansionService.java:
##########
@@ -48,10 +61,61 @@ public class ExpansionService extends
ExpansionServiceGrpc.ExpansionServiceImplB
clientFactory != null ? clientFactory :
DEFAULT_EXPANSION_SERVICE_CLIENT_FACTORY;
}
+ // Waits till all expansion services are ready.
+ private void waitForAllServicesToBeReady() throws TimeoutException {
+ if (disableServiceCheck) {
+ // Service check disabled. Just returning.
+ return;
+ }
+
+ outer:
+ for (Endpoints.ApiServiceDescriptor endpoint : endpoints) {
+ long start = System.currentTimeMillis();
+ long duration = 10;
+ while (System.currentTimeMillis() - start < SERVICE_CHECK_TIMEOUT) {
+ try {
+ String url = endpoint.getUrl();
+ int portIndex = url.lastIndexOf(":");
+ int port = portIndex > 0 ? Integer.parseInt(url.substring(portIndex
+ 1)) : 80;
Review Comment:
Thanks. Updated.
--
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]