-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-18691. Add a CallerContext getter on the Schedulable interface #5540
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Schedulable.java
Outdated
Show resolved
Hide resolved
|
Thanks @xBis7 . lgtm apart from one comment above. I'd like to invite @steveloughran to vet the interface method addition here as well. |
|
@smengcl Thanks for looking into this PR. I've addressed your comment. |
This comment was marked as outdated.
This comment was marked as outdated.
...-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIdentityProviders.java
Outdated
Show resolved
Hide resolved
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.
lgtm. Pending CI
|
@smengcl Thanks for the review! |
This comment was marked as outdated.
This comment was marked as outdated.
...-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIdentityProviders.java
Outdated
Show resolved
Hide resolved
...-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIdentityProviders.java
Outdated
Show resolved
Hide resolved
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Schedulable.java
Show resolved
Hide resolved
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Schedulable.java
Outdated
Show resolved
Hide resolved
|
@steveloughran Thanks for reviewing this PR. I have made the changes you requested. Let me know how the patch looks now. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Thanks @xBis7 . Latest changes lgtm. Looks like all comments from @steveloughran are addressed. I will merge after a few days or when Steve approves this. |
|
Thanks @xBis7 for the PR. |
|
Backported to branch-3.3 (3.3.9): 57ff8bd |
Description of PR
This patch will help us solve a FairCallQueue impersonation issue we have on the Apache Ozone project.
The issue: On Ozone the FairCallQueue doesn't work when used with the Ozone S3G. The OzoneManager and the S3G are using a single permanent connection for communication, which is hiding all S3G client users under a special S3G user. For every request that comes through the S3G,
getUserGroupInformation()from the Schedulable returns the specials3guser. Therefore, there is no impersonation and the FairCallQueue is ineffective.We would like to expose the
CallerContextfield from theCallclass and use that to carry the information needed by theIdentityProvider. On Ozone, we will set the correct information on theCallerContextbefore issuing the request and then provide anIdentityProviderimplementation which will access the newCallerContextgetter and use it to return the username tomakeIdentity().Here is a draft patch on Ozone side that utilizes these changes: apache/ozone#4116
hadoop jira: https://issues.apache.org/jira/browse/HADOOP-18691
How was this patch tested?
No new tests were added for this patch as it doesn't make any functional changes but only exposing existing data. It was tested on Ozone side.
Here is a gist with steps and information on how the FairCallQueue was tested using this patch and an
OzoneIdentityProviderimpl: https://gist.github.com/xBis7/b8247986e718417a4b48320eab6efeda