This is an automated email from the ASF dual-hosted git repository.
zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new 37e62f7e5 [CELEBORN-819][FOLLOWUP] Fix worker graceful shutdown
exitKind set
37e62f7e5 is described below
commit 37e62f7e55f3d3fb187c2c40e1c6aabebb3cefb2
Author: onebox-li <[email protected]>
AuthorDate: Tue Aug 22 13:11:36 2023 +0800
[CELEBORN-819][FOLLOWUP] Fix worker graceful shutdown exitKind set
### What changes were proposed in this pull request?
When worker enabled graceful shutdown, `exitKind` is not set correctly
### Why are the changes needed?
Ditto
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Manually test
Closes #1822 from onebox-li/fix-worker-shutdown.
Authored-by: onebox-li <[email protected]>
Signed-off-by: zky.zhoukeyong <[email protected]>
---
.../scala/org/apache/celeborn/service/deploy/worker/Worker.scala | 5 ++++-
1 file changed, 4 insertions(+), 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 45d88b36d..e5267a75f 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
@@ -84,7 +84,7 @@ private[celeborn] class Worker(
conf.workerPushPort > 0 && conf.workerReplicatePort > 0),
"If enable graceful shutdown, the worker should use stable server port.")
if (gracefulShutdown) {
- exitKind == CelebornExitKind.WORKER_GRACEFUL_SHUTDOWN
+ exitKind = CelebornExitKind.WORKER_GRACEFUL_SHUTDOWN
try {
val recoverRoot = new File(conf.workerGracefulShutdownRecoverPath)
if (!recoverRoot.exists()) {
@@ -678,10 +678,13 @@ private[celeborn] class Worker(
logInfo("Shutdown hook called.")
exitKind match {
case CelebornExitKind.WORKER_GRACEFUL_SHUTDOWN =>
+ logInfo("Worker start to shutdown gracefully")
shutdownGracefully()
case CelebornExitKind.WORKER_DECOMMISSION =>
+ logInfo("Worker start to decommission")
decommissionWorker()
case _ =>
+ logInfo("Worker start to exit immediately")
exitImmediately()
}
stop(exitKind)