Skip to content
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

Merged
merged 6 commits into from
Feb 3, 2017
Merged

Conversation

jsimsa
Copy link
Contributor

@jsimsa jsimsa commented Feb 1, 2017

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 to SecurityUtils and its methods for applying umask are moved to Mode.

The rest of the PR are mostly mechanical changes that replace uses of Permission with equivalent uses of owner, group, and mode.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/13246/
Test FAILed.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/13247/
Test FAILed.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/13248/

Failed Tests: 1

org.alluxio:alluxio-core-client: 1


Test FAILed.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/13249/

Failed Tests: 0


Test FAILed.

@maobaolong
Copy link
Contributor

#4704 My Pr blocked by the failed test too.

@jsimsa
Copy link
Contributor Author

jsimsa commented Feb 1, 2017

Jenkins, test this please

@jsimsa jsimsa requested review from apc999 and ifcharming February 1, 2017 15:54
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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a bug

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/13257/
Test FAILed.

@jsimsa jsimsa requested a review from calvinjia February 1, 2017 16:22
@jsimsa
Copy link
Contributor Author

jsimsa commented Feb 1, 2017

Jenkins, test this please

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/13258/

Failed Tests: 1

org.alluxio:alluxio-core-client: 1


Test FAILed.

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/13259/
Test PASSed.

@alluxio-bot
Copy link
Contributor

Automated checks report:

  • Valid pull request title: PASS
  • Contains link to JIRA ticket: PASS
  • Commits associated with Github account: PASS

All checks passed!

Copy link
Contributor

@apc999 apc999 left a 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

@jsimsa jsimsa merged commit 93708ea into Alluxio:master Feb 3, 2017
jsimsa added a commit that referenced this pull request Feb 3, 2017
@ifcharming
Copy link
Contributor

LGTM, thanks for the refactoring!

@jsimsa jsimsa deleted the permission branch March 15, 2017 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants