You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "zhihai xu (JIRA)" <ji...@apache.org> on 2015/01/29 21:53:35 UTC
[jira] [Updated] (YARN-3114) It would be better to consider
integer(long) overflow when compare the time in DelegationTokenRenewer.
[ https://issues.apache.org/jira/browse/YARN-3114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
zhihai xu updated YARN-3114:
----------------------------
Attachment: YARN-3114.000.patch
> 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)