-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ALLUXIO-2393] Remove the Permission class. #4717
Conversation
Merged build finished. Test FAILed. |
Test FAILed. |
Merged build finished. Test FAILed. |
Test FAILed. |
Merged build finished. Test FAILed. |
Test FAILed. Failed Tests: 1org.alluxio:alluxio-core-client: 1Test FAILed. |
Merged build finished. Test FAILed. |
Test FAILed. Failed Tests: 0Test FAILed. |
#4704 My Pr blocked by the failed test too. |
Jenkins, test this please |
inodes.add(inode); | ||
} else { | ||
Inode<?> inode = InodeDirectory.create(i + 1, i, (i + 1) + "", | ||
CreateDirectoryOptions.defaults().setPermission(permissions.get(i))); | ||
CreateDirectoryOptions.defaults().setOwner(owner).setGroup(group).setMode(mode)); | ||
inodes.add(inode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was a bug
Merged build finished. Test FAILed. |
Test FAILed. |
Jenkins, test this please |
Merged build finished. Test FAILed. |
Test FAILed. Failed Tests: 2org.alluxio:alluxio-core-client: 1org.alluxio:alluxio-tests: 1Test FAILed. |
Merged build finished. Test FAILed. |
Test FAILed. Failed Tests: 1org.alluxio:alluxio-core-client: 1Test FAILed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Automated checks report:
All checks passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the improve! It makes the code much cleaner now
LGTM, thanks for the refactoring! |
Addresses https://alluxio.atlassian.net/browse/ALLUXIO-2393
The motivation behind this PR is to decouple owner, group, and mode of path permissions as these attributes are often initialized through different means, which presents challenges for the
Permission
class API.The main change in this PR is that the
Permission
class is removed. Its methods for initializing owner and group using login module and thrift client are moved toSecurityUtils
and its methods for applying umask are moved toMode
.The rest of the PR are mostly mechanical changes that replace uses of
Permission
with equivalent uses of owner, group, and mode.