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

Xiao Chen commented on HADOOP-13720:
------------------------------------

Thanks [~yzhangal] for the new revs, and Steve for the reviews.

Looks great overall. Some nitty comments:
- Please update the jira title as you proposed. :)
- It requires more operations (create thread local format, and format the the 
time) when exception happens, but I think that's fine.
- I see some exceptions throws with {{(identifier)}} while some throws without 
the {{()}}. Suggest to make them consistent.
- Can we add a unit test for the new {{Time#formatTime}} ? OTOH there is no 
existing tests....
- {{long curTime = Time.now();}} naming it {{now}} would be more consistent 
with current code, for example {{renewToken}}.

> Add more info to "token ... is expired" message
> -----------------------------------------------
>
>                 Key: HADOOP-13720
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13720
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: common, security
>            Reporter: Yongjun Zhang
>            Assignee: Yongjun Zhang
>            Priority: Trivial
>              Labels: supportability
>         Attachments: HADOOP-13720.001.patch, HADOOP-13720.002.patch, 
> HADOOP-13720.003.patch, HADOOP-13720.004.patch, HADOOP-13720.005.patch
>
>
> Currently AbstractDelegationTokenSecretManager$checkToken does
> {code}
>   protected DelegationTokenInformation checkToken(TokenIdent identifier)
>       throws InvalidToken {
>     assert Thread.holdsLock(this);
>     DelegationTokenInformation info = getTokenInfo(identifier);
>     if (info == null) {
>       throw new InvalidToken("token (" + identifier.toString()
>           + ") can't be found in cache");
>     }
>     if (info.getRenewDate() < Time.now()) {
>       throw new InvalidToken("token (" + identifier.toString() + ") is 
> expired");
>     }
>     return info;
>   } 
> {code}
> When a token is expried, we throw the above exception without printing out 
> the {{info.getRenewDate()}} in the message. If we print it out, we could know 
> for how long the token has not been renewed. This will help us investigate 
> certain issues.
> Create this jira as a request to add that part.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to