rickyma commented on code in PR #1685:
URL:
https://github.com/apache/incubator-uniffle/pull/1685#discussion_r1594982436
##########
server/src/main/java/org/apache/uniffle/server/LocalStorageChecker.java:
##########
@@ -241,6 +242,10 @@ void updateStorageFreeSpace(long free) {
storage.updateDiskFree(free);
}
+ void updateServiceUsedSpace(long used) {
Review Comment:
Ditto. used -> usedSize
##########
storage/src/main/java/org/apache/uniffle/storage/common/LocalStorage.java:
##########
@@ -47,6 +47,7 @@ public class LocalStorage extends AbstractStorage {
private final long diskCapacity;
private volatile long diskFree;
Review Comment:
I think the original variables naming is not appropriate.
##########
storage/src/main/java/org/apache/uniffle/storage/common/LocalStorage.java:
##########
@@ -270,6 +269,14 @@ public void updateDiskFree(long free) {
this.diskFree = free;
}
+ public void updateServiceUsed(long used) {
+ this.serviceUsed = used;
+ }
+
+ public long getServiceUsed() {
Review Comment:
Ditto. getServiceUsed -> getServiceUsedSize
##########
server/src/main/java/org/apache/uniffle/server/LocalStorageChecker.java:
##########
@@ -113,8 +113,9 @@ public boolean checkIsHealthy() {
totalSpace.addAndGet(total);
wholeDiskUsedSpace.addAndGet(total - free);
-
serviceUsedSpace.addAndGet(getServiceUsedSpace(storageInfo.storageDir));
-
+ long used = getServiceUsedSpace(storageInfo.storageDir);
Review Comment:
Ditto. used -> usedSize? or usedBytes better?
##########
storage/src/main/java/org/apache/uniffle/storage/common/LocalStorage.java:
##########
@@ -270,6 +269,14 @@ public void updateDiskFree(long free) {
this.diskFree = free;
}
+ public void updateServiceUsed(long used) {
Review Comment:
updateServiceUsed -> updateServiceUsedSize
It is better?
BTW. What does `service` here mean? Do we have a better name?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]