zhihai xu created YARN-3114:
-------------------------------
Summary: 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
Advertising
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)