yetanotherion opened a new pull request #747: Support delegation token renewal
URL: https://github.com/apache/hive/pull/747
 
 
   Hive uses the TokenStoreDelegationTokenSecretManager to store
   the delegation tokens.
   
   The renewal is delegated to the AbstractDelegationTokenSecretManager
   of hadoop-commons. This class stores the tokens in a protected attribute
   Map<DelegationTokenIdentifier, DelegationTokenInformation> 'currentTokens'.
   
   On the other hand,
   TokenStoreDelegationTokenSecretManager that inherits from 
AbstractDelegationTokenSecretManager,
   stores the tokens in a private DelegationTokenStore 'tokenStore' that
   permits to associate a DelegationTokenIdentifier to a 
DelegationTokenInformation too.
   
   The expiry date of the delegation token is stored in the
   DelegationTokenInformation (the value of the map).
   
   TokenStoreDelegationTokenSecretManager.renewToken
   populates the attribute 'currentTokens', with the value tokenStore
   associated to the releated DelegationTokenIdentifier. Let's call this
   value tokenId.
   
   Then it calls super.renewToken that updates the
   DelegationTokenInformation, of tokenId, with a new expiry date,
   in 'currentTokens'.
   
   Unfortunately
   1. TokenStoreDelegationTokenSecretManager
   cleans the 'currentTokens' attribute,
   without updating the DelegationTokenInformation associated to tokenId
   in 'tokenStore'.
   2. Returning the new expiry date, reflecting what was in
   currentTokens, but not what's in 'tokenStore'.
   
   Fix the two issues by updating tokenStore once the delegation
   is renewed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to