This is an automated email from the ASF dual-hosted git repository.
zhouky pushed a commit to branch branch-0.3
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/branch-0.3 by this push:
new a681c2e17 [CELEBORN-961] Catch exception when constructing Worker
a681c2e17 is described below
commit a681c2e171f57ca3c0d2ba7d6cf6b5c7387dbc63
Author: jiang13021 <[email protected]>
AuthorDate: Sat Sep 9 17:40:13 2023 +0800
[CELEBORN-961] Catch exception when constructing Worker
### What changes were proposed in this pull request?
Move the constructor of Worker into a try-catch block.
### Why are the changes needed?
There are some exceptions thrown from Worker's constructor instead of
Worker.initialize(), so it is necessary to catch these exceptions.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Start a worker with conf
```
celeborn.worker.directMemoryRatioToPauseReceive=0.7
celeborn.worker.directMemoryRatioToResume=0.7
```
an IllegalArgumentException will be caught
Closes #1894 from jiang13021/celenorn-961.
Authored-by: jiang13021 <[email protected]>
Signed-off-by: zky.zhoukeyong <[email protected]>
(cherry picked from commit 163dc8d5b8f8993f90c4714008aa9496ac505cc6)
Signed-off-by: zky.zhoukeyong <[email protected]>
---
.../main/scala/org/apache/celeborn/service/deploy/worker/Worker.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Worker.scala
b/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Worker.scala
index 143b54850..597fc9e5b 100644
---
a/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Worker.scala
+++
b/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Worker.scala
@@ -727,8 +727,8 @@ private[deploy] object Worker extends Logging {
conf.set(MASTER_ENDPOINTS.key,
RpcAddress.fromCelebornURL(master).hostPort)
}
- val worker = new Worker(conf, workerArgs)
try {
+ val worker = new Worker(conf, workerArgs)
worker.initialize()
} catch {
case e: Throwable =>