[CELEBORN-1467] celeborn.worker.storage.dirs should support soft link

### What changes were proposed in this pull request?
`celeborn.worker.storage.dirs` supports soft link

### Why are the changes needed?
NPE will be thrown when StorageManager.createWriter if `celeborn.worker.storage.dirs` contains soft link.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Existing uts.

Closes #2576 from leixm/CELEBORN-1467.

Authored-by: Xianming Lei <31424839+leixm@users.noreply.github.com>
Signed-off-by: mingji <fengmingxiao.fmx@alibaba-inc.com>
This commit is contained in:
Xianming Lei 2024-06-19 10:44:38 +08:00 committed by mingji
parent 627ee8c6ef
commit 759638e0b1
No known key found for this signature in database
GPG Key ID: 6392F71F37356FA0

View File

@ -288,7 +288,9 @@ object DeviceInfo {
val deviceInfo = mountPointToDeviceInfo.get(mountPoint)
val diskInfo = new DiskInfo(
mountPoint,
dirs.map(_._1).toList,
dirs.map { workingDir =>
new File(workingDir._1.getCanonicalPath)
}.toList,
deviceInfo,
conf)
val (_, maxUsableSpace, threadCount, storageType) = dirs(0)