zaynt4606 commented on code in PR #3008:
URL: https://github.com/apache/celeborn/pull/3008#discussion_r1895194557
##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1926,13 +1924,58 @@ public void shutdown() {
}
@Override
- public void setupLifecycleManagerRef(String host, int port) {
+ public void setupLifecycleManagerRef(String host, int port) throws
CelebornIOException {
logger.info("setupLifecycleManagerRef: host = {}, port = {}", host, port);
- lifecycleManagerRef =
- rpcEnv.setupEndpointRef(new RpcAddress(host, port),
RpcNameConstants.LIFECYCLE_MANAGER_EP);
+ try {
+ lifecycleManagerRef =
+ callLifecycleManagerWithTimeoutRetry(
+ () ->
+ rpcEnv.setupEndpointRef(
+ new RpcAddress(host, port),
RpcNameConstants.LIFECYCLE_MANAGER_EP),
+ "setupLifecycleManagerRef");
+ } catch (Exception e) {
+ logger.error("setupLifecycleManagerRef failed, host = {}, port = {}",
host, port);
+ throw new CelebornIOException("setupLifecycleManagerRef failed", e);
+ }
initDataClientFactoryIfNeeded();
}
+ public <T> T callLifecycleManagerWithTimeoutRetry(Callable<T> callable,
String name)
Review Comment:
I agree to change askSync/askAsync.
There are a lot of exception changes caused by that the
`setupLifecycleManagerRef` will throws `RpcTimeoutExceptions` which we need to
catch.
--
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]