You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ayush Saxena (Jira)" <ji...@apache.org> on 2023/09/17 13:24:00 UTC

[jira] [Commented] (HIVE-27564) Add log for ZooKeeperTokenStore

    [ https://issues.apache.org/jira/browse/HIVE-27564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17766082#comment-17766082 ] 

Ayush Saxena commented on HIVE-27564:
-------------------------------------

Committed to master.

Thanx [~1365976815@qq.com] for the contribution!!!

> Add log for ZooKeeperTokenStore
> -------------------------------
>
>                 Key: HIVE-27564
>                 URL: https://issues.apache.org/jira/browse/HIVE-27564
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: lvyanquan
>            Assignee: lvyanquan
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: picture 1.png
>
>
> when use zookeeper to store DelegationTokenIdentifier,  we use 
> {code:java}
> TokenStoreDelegationTokenSecretManager.encodeWritable(tokenIdentifier) {code}
> to encode message of tokens and create the path in zookeeper, like picture1.png
> However, when this token was removed, error message will display DelegationTokenIdentifier only, then we have no idea about whether this path is still existed and when the path in zookeeper was created and deleted.
> {code:java}
> public byte[] retrievePassword(DelegationTokenIdentifier identifier) throws InvalidToken {
>     DelegationTokenInformation info = this.tokenStore.getToken(identifier);
>     if (info == null) {
>         throw new InvalidToken("token expired or does not exist: " + identifier);
>     }
>     // must reuse super as info.getPassword is not accessible
>     synchronized (this) {
>       try {
>         super.currentTokens.put(identifier, info);
>         return super.retrievePassword(identifier);
>       } finally {
>         super.currentTokens.remove(identifier);
>       }
>     }
> } {code}
> So, I try to add so log about the lifecycle of the tokenPath.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)