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

TestDelegationTokenRenewer throws NPE but tests pass

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: None
    • Labels:
      None

      Description

      TestDelegationTokenRenewer throws some NPEs:

      2019-09-25 12:51:23,446 WARN  [pool-19-thread-2] security.DelegationTokenRenewer (DelegationTokenRenewer.java:handleDTRenewerAppSubmitEvent(945)) - Unable to add the application to the delegation token renewer.
      java.lang.NullPointerException
      	at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenRenewerRunnable.handleDTRenewerAppSubmitEvent(DelegationTokenRenewer.java:942)
      	at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenRenewerRunnable.run(DelegationTokenRenewer.java:918)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      2019-09-25 12:51:23,446 DEBUG [main] util.MBeans (MBeans.java:unregister(138)) - Unregistering Hadoop:service=ResourceManager,name=CapacitySchedulerMetrics
      Exception in thread "pool-19-thread-2" java.lang.NullPointerException
      	at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenRenewerRunnable.handleDTRenewerAppSubmitEvent(DelegationTokenRenewer.java:951)
      	at org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenRenewerRunnable.run(DelegationTokenRenewer.java:918)
      2019-09-25 12:51:23,447 DEBUG [main] util.MBeans (MBeans.java:unregister(138)) - Unregistering Hadoop:service=ResourceManager,name=MetricsSystem,sub=Stats
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      2019-09-25 12:51:23,447 INFO  [main] impl.MetricsSystemImpl (MetricsSystemImpl.java:stop(216)) - ResourceManager metrics system stopped.
      

      the RMContext dispatcher is not set for the RMMock which results in NPE accessing the event handler of the dispatcher inside DelegationTokenRenewer.

        Attachments

        1. YARN-9857.001.patch
          3 kB
          Ahmed Hussein

          Activity

            People

            • Assignee:
              ahussein Ahmed Hussein
              Reporter:
              ahussein Ahmed Hussein
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: