Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3114

It would be better to consider integer(long) overflow when compare the time in DelegationTokenRenewer.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • None
    • None
    • resourcemanager
    • None

    Description

      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

      if (e.getValue() < System.currentTimeMillis()) {
      

      to

      if (e.getValue() - System.currentTimeMillis() < 0) {
      

      Attachments

        1. YARN-3114.000.patch
          2 kB
          Zhihai Xu

        Activity

          People

            zxu Zhihai Xu
            zxu Zhihai Xu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: