You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by zh...@apache.org on 2023/06/28 09:53:57 UTC

[incubator-celeborn] branch branch-0.3 updated: [CELEBORN-728] Celeborn won't clean remnant application directory on HDFS if worker is restarted

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 42a9160c8 [CELEBORN-728] Celeborn won't clean remnant application directory on HDFS if worker is restarted
42a9160c8 is described below

commit 42a9160c8ceaf79bae514c54dafcb5b8e12d5251
Author: Demon Liang <li...@alipay.com>
AuthorDate: Wed Jun 28 17:53:50 2023 +0800

    [CELEBORN-728] Celeborn won't clean remnant application directory on HDFS if worker is restarted
    
    ### What changes were proposed in this pull request?
    To clean the remnant application directory after Celeborn Worker is restarted.
    
    ### Why are the changes needed?
    Remnant application directories will not be deleted, because `hadoopFs.listFiles(path,false)` will not list directories.
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    Closes #1641 from Demon-Liang/0.3-dev.
    
    Authored-by: Demon Liang <li...@alipay.com>
    Signed-off-by: zky.zhoukeyong <zk...@alibaba-inc.com>
---
 .../apache/celeborn/service/deploy/worker/storage/StorageManager.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala b/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala
index ae29d79df..09a0d832c 100644
--- a/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala
+++ b/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala
@@ -531,7 +531,7 @@ final private[worker] class StorageManager(conf: CelebornConf, workerSource: Abs
     if (hadoopFs != null) {
       val hdfsWorkPath = new Path(hdfsDir, conf.workerWorkingDir)
       if (hadoopFs.exists(hdfsWorkPath)) {
-        val iter = hadoopFs.listFiles(hdfsWorkPath, false)
+        val iter = hadoopFs.listStatusIterator(hdfsWorkPath)
         while (iter.hasNext) {
           val fileStatus = iter.next()
           if (!appIds.contains(fileStatus.getPath.getName)) {