You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2019/08/08 13:24:13 UTC
[GitHub] [hive] yetanotherion opened a new pull request #747: Support
delegation token renewal
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org