[ 
https://issues.apache.org/jira/browse/YARN-3114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

zhihai xu reopened YARN-3114:
-----------------------------

> It would be better to consider integer(long) overflow when compare the time 
> in DelegationTokenRenewer.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-3114
>                 URL: https://issues.apache.org/jira/browse/YARN-3114
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>            Reporter: zhihai xu
>            Assignee: zhihai xu
>            Priority: Minor
>         Attachments: YARN-3114.000.patch
>
>
> It would be better to consider integer(long) overflow when compare the time 
> in DelegationTokenRenewer.
> When compare time in DelegationTokenRenewer#DelayedTokenRemovalRunnable to 
> cancel token , it will have problem when currentTimeMillis is close to 
> Long.MAX_VALUE.
> The safer way to compare time will compare the time difference:
> change
> {code}
> if (e.getValue() < System.currentTimeMillis()) {
> {code}
> to 
> {code}
> if (e.getValue() - System.currentTimeMillis() < 0) {
> {code}



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

Reply via email to