SteNicholas commented on code in PR #2688:
URL: https://github.com/apache/celeborn/pull/2688#discussion_r1722805960
##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala:
##########
@@ -851,20 +854,32 @@ final private[worker] class StorageManager(conf:
CelebornConf, workerSource: Abs
0
}
}.sum
- val fileStore = Files.getFileStore(Paths.get(diskInfo.mountPoint))
- val fileSystemReportedUsableSpace = fileStore.getUsableSpace
+
+ val lists = getFileSystemReportedSpace(diskInfo.mountPoint)
+ val fileSystemReportedUsableSpace = lists.head
+ val fileSystemReportedTotalSpace = lists(1)
val workingDirUsableSpace =
Math.min(diskInfo.configuredUsableSpace - totalUsage,
fileSystemReportedUsableSpace)
- val totalSpace = fileStore.getTotalSpace
- logDebug(s"updateDiskInfos workingDirUsableSpace:$workingDirUsableSpace
filemeta:$fileSystemReportedUsableSpace conf:${diskInfo.configuredUsableSpace}
totalUsage:$totalUsage totalSpace: $totalSpace")
- diskInfo.setUsableSpace(workingDirUsableSpace)
- diskInfo.setTotalSpace(totalSpace)
+ val minimumReserveSize =
+ DiskUtils.getMinimumUsableSize(diskInfo, diskReserveSize,
diskReserveRatio)
+ val usableSpace = Math.max(workingDirUsableSpace - minimumReserveSize, 0)
Review Comment:
Could this be logged in line 866?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]