ashishkumar50 commented on code in PR #7830:
URL: https://github.com/apache/ozone/pull/7830#discussion_r1950316249
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/utils/DiskCheckUtil.java:
##########
@@ -105,31 +110,31 @@ public boolean checkExistence(File diskDir) {
}
@Override
- public boolean checkPermissions(File storageDir) {
+ public ReadWriteStatus checkPermissions(File storageDir) {
// Check all permissions on the volume. If there are multiple permission
// errors, count it as one failure so the admin can fix them all at once.
- boolean permissionsCorrect = true;
+ ReadWriteStatus readWriteStatus = ReadWriteStatus.READ_WRITE_OK;
if (!storageDir.canRead()) {
logError(storageDir,
"Datanode does not have read permission on volume.");
- permissionsCorrect = false;
+ readWriteStatus = ReadWriteStatus.READ_FAIL;
}
if (!storageDir.canWrite()) {
logError(storageDir,
"Datanode does not have write permission on volume.");
- permissionsCorrect = false;
+ readWriteStatus = ReadWriteStatus.WRITE_FAIL;
Review Comment:
Done
--
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]