-
Notifications
You must be signed in to change notification settings - Fork 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
YARN-11225. [Federation] Add postDelegationToken postDelegationTokenExpiration cancelDelegationToken REST APIs for Router. #5185
Conversation
💔 -1 overall
This message was automatically generated. |
@goiri Can you help review this PR? Thank you very much! |
💔 -1 overall
This message was automatically generated. |
…xpiration cancelDelegationToken REST APIs for Router.
f2b82df
to
2b67668
Compare
🎊 +1 overall
This message was automatically generated. |
...src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorREST.java
Show resolved
Hide resolved
import org.apache.hadoop.util.ReflectionUtils; | ||
import org.apache.hadoop.util.Sets; | ||
import org.apache.hadoop.util.Time; | ||
import org.apache.hadoop.util.concurrent.HadoopExecutors; | ||
import org.apache.hadoop.yarn.api.protocolrecords.*; |
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.
Expand
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.
I will fix it.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
return this.getRouterClientRMService().getDelegationToken(createReq); | ||
}); | ||
|
||
org.apache.hadoop.yarn.api.records.Token token = resp.getRMDelegationToken(); |
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.
It might be cleaner to have a static method for this:
private static Token<RMDelegationTokenIdentifier> getToken(GetDelegationTokenResponse resp) {
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.
Or maybe even the DelegationToken respToken
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 your suggestion, I will modify the code.
@@ -156,6 +172,31 @@ public void setUp() { | |||
Assert.fail(); |
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 is from before but if we just surface the exception we don't need to add the fail().
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.
I will fix it.
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@goiri Thank you very much for helping to review the code! |
JIRA: YARN-11225. [Federation] Add postDelegationToken, postDelegationTokenExpiration, cancelDelegationToken REST APIs for Router.