You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "xy2953396112 (via GitHub)" <gi...@apache.org> on 2025/09/13 09:18:00 UTC
[PR] [CELEBORN-2150] Fix the match condition in checkIfWorkingDirCleaned [celeborn]
xy2953396112 opened a new pull request, #3477:
URL: https://github.com/apache/celeborn/pull/3477
<!--
Thanks for sending a pull request! Here are some tips for you:
- Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX] Your PR title ...'.
- Be sure to keep the PR description updated to reflect all changes.
- Please write your PR title to summarize what this PR proposes.
- If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
Fix the match condition in checkIfWorkingDirCleaned
### Why are the changes needed?
`checkIfWorkingDirCleaned` has wrong match condition, `dfsCleaned` always return true.
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
CI
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2150] Fix the match condition in checkIfWorkingDirCleaned [celeborn]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #3477:
URL: https://github.com/apache/celeborn/pull/3477#issuecomment-3301148874
## [Codecov](https://app.codecov.io/gh/apache/celeborn/pull/3477?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 63.75%. Comparing base ([`7f08eb8`](https://app.codecov.io/gh/apache/celeborn/commit/7f08eb8f1dde495cfccd20098952589f543a2826?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c7953a0`](https://app.codecov.io/gh/apache/celeborn/commit/c7953a02c45da9dd6c542fce6ac0b603d239f93e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 10 commits behind head on main.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #3477 +/- ##
==========================================
+ Coverage 63.60% 63.75% +0.16%
==========================================
Files 356 356
Lines 21715 21681 -34
Branches 1925 1921 -4
==========================================
+ Hits 13809 13821 +12
+ Misses 6904 6861 -43
+ Partials 1002 999 -3
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/celeborn/pull/3477?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2150] Fix the match condition in checkIfWorkingDirCleaned [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on PR #3477:
URL: https://github.com/apache/celeborn/pull/3477#issuecomment-3314716422
Thanks. Merged to main(v0.7.0) and branch-0.6(v0.6.2).
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2150] Fix the match condition in checkIfWorkingDirCleaned [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas closed pull request #3477: [CELEBORN-2150] Fix the match condition in checkIfWorkingDirCleaned
URL: https://github.com/apache/celeborn/pull/3477
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2150] Fix the match condition in checkIfWorkingDirCleaned [celeborn]
Posted by "xy2953396112 (via GitHub)" <gi...@apache.org>.
xy2953396112 commented on code in PR #3477:
URL: https://github.com/apache/celeborn/pull/3477#discussion_r2354168098
##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala:
##########
@@ -773,21 +773,30 @@ final private[worker] class StorageManager(conf: CelebornConf, workerSource: Abs
false
}
}
-
- val dfsCleaned = hadoopFs match {
- case dfs: FileSystem =>
- val dfsDir = if (hasHDFSStorage) hdfsDir else if (hasOssStorage) ossDir else s3Dir
- val dfsWorkPath = new Path(dfsDir, conf.workerWorkingDir)
- // DFS path not exist when first time initialize
- if (dfs.exists(dfsWorkPath)) {
- !dfs.listFiles(dfsWorkPath, false).hasNext
- } else {
- true
+ val dfsCleaned = hadoopFs == null || hadoopFs.asScala.forall {
+ case (storageType, fs) =>
+ val dfsDir =
+ if (storageType == StorageInfo.Type.HDFS)
+ hdfsDir
+ else if (storageType == StorageInfo.Type.OSS) ossDir
+ else s3Dir
+ try {
+ val dfsWorkPath = new Path(dfsDir, conf.workerWorkingDir)
+ // DFS path not exist when first time initialize
+ if (fs.exists(dfsWorkPath)) {
Review Comment:
I have updated the code.
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2150] Fix the match condition in checkIfWorkingDirCleaned [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #3477:
URL: https://github.com/apache/celeborn/pull/3477#discussion_r2354117636
##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala:
##########
@@ -773,21 +773,30 @@ final private[worker] class StorageManager(conf: CelebornConf, workerSource: Abs
false
}
}
-
- val dfsCleaned = hadoopFs match {
- case dfs: FileSystem =>
- val dfsDir = if (hasHDFSStorage) hdfsDir else if (hasOssStorage) ossDir else s3Dir
- val dfsWorkPath = new Path(dfsDir, conf.workerWorkingDir)
- // DFS path not exist when first time initialize
- if (dfs.exists(dfsWorkPath)) {
- !dfs.listFiles(dfsWorkPath, false).hasNext
- } else {
- true
+ val dfsCleaned = hadoopFs == null || hadoopFs.asScala.forall {
+ case (storageType, fs) =>
+ val dfsDir =
+ if (storageType == StorageInfo.Type.HDFS)
+ hdfsDir
+ else if (storageType == StorageInfo.Type.OSS) ossDir
+ else s3Dir
+ try {
+ val dfsWorkPath = new Path(dfsDir, conf.workerWorkingDir)
+ // DFS path not exist when first time initialize
+ if (fs.exists(dfsWorkPath)) {
Review Comment:
```suggestion
!fs.exists(dfsWorkPath) || !fs.listFiles(dfsWorkPath, false).hasNext
```
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org