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

AbstractYarnScheduler.createReleaseCache may try to clean a null attempt

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: scheduler
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler.createReleaseCache()

      protected void createReleaseCache() {
          // Cleanup the cache after nm expire interval.
          new Timer().schedule(new TimerTask() {
            @Override
            public void run() {
              for (SchedulerApplication<T> app : applications.values()) {
      
                T attempt = app.getCurrentAppAttempt();
                synchronized (attempt) {
                  for (ContainerId containerId : attempt.getPendingRelease()) {
                    RMAuditLogger.logFailure(
      

      Here the attempt can be null since the attempt is created later. So null pointer exception will come

      2015-06-19 09:29:16,195 | ERROR | Timer-3 | Thread Thread[Timer-3,5,main] threw an Exception. | YarnUncaughtExceptionHandler.java:68
      java.lang.NullPointerException
      	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler$1.run(AbstractYarnScheduler.java:457)
      	at java.util.TimerThread.mainLoop(Timer.java:555)
      	at java.util.TimerThread.run(Timer.java:505)
      

      This will skip the other applications in this run.
      Can add a null check and continue with other applications

        Attachments

        1. YARN-3830_4.patch
          8 kB
          nijel
        2. YARN-3830_3.patch
          2 kB
          nijel
        3. YARN-3830_2.patch
          2 kB
          nijel
        4. YARN-3830_1.patch
          1 kB
          nijel

          Activity

            People

            • Assignee:
              nijel nijel
              Reporter:
              nijel nijel
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: