-
Notifications
You must be signed in to change notification settings - Fork 9.1k
YARN-11350. [Federation] Router Support DelegationToken With ZK.(Old Version) #5111
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
💔 -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. |
💔 -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. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@@ -129,6 +135,7 @@ | |||
* |--- RESERVATION | |||
* | |----- RESERVATION1 | |||
* | |----- RESERVATION2 | |||
* |--- |
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 don't think we need this?
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.
Thank you very much for your help reviewing the code, I will fix it.
@@ -1002,7 +1053,9 @@ public RouterRMTokenResponse removeStoredToken(RouterRMTokenRequest request) | |||
@Override | |||
public RouterRMTokenResponse getTokenByRouterStoreToken(RouterRMTokenRequest request) | |||
throws YarnException, IOException { | |||
request.getRouterStoreToken().getTokenIdentifier(); | |||
throw new NotImplementedException("Code is not implemented"); |
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.
Didn't we implement it?
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 part of the code has been completed, I will confirm my submission record again.
} else { | ||
nodeName += String.format("%04d", rmDTSequenceNumber); | ||
put(nodeCreatePath, routerStoreToken.toByteArray(), false); |
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.
put(nodeCreatePath, routerStoreToken.toByteArray(), isUpdate);
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. |
We have submitted a new pr (#5131), this pr will be closed. |
JIRA: YARN-11350. [Federation] Router Support DelegationToken With ZK.
YARN Router needs to support DelegationToken. In the process of implementing this feature, refer to
RMDelegationTokenSecretManager
, HDFSRBF#ZKDelegationTokenSecretManager
.There are a few things to keep in mind to implement this feature:
1.How to store and query
masterkey
?2.How to store and query
DelegationToken
?3.How to store and query
SequenceNum
?For
question 1
andquestion 2
, we can directly refer toRMDelegationTokenSecretManager
to serialize the data and store it in ZK.For
question 3
, we need to consider multiple routers sharingsequenceNum
, and we need to ensure that the self-increment ofsequenceNum
can be shared among multiple routers. At this point we will use curator's SharedCount to implement this function.For the introduction of SharedCount, we can refer to the following articles
https://curator.apache.org/curator-recipes/shared-counter.html.