hadoop-yarn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nijel (JIRA)" <j...@apache.org>
Subject [jira] [Created] (YARN-3830) AbstractYarnScheduler.createReleaseCache may try to clean a null attempt
Date Fri, 19 Jun 2015 06:04:00 GMT
nijel created YARN-3830:
---------------------------

             Summary: AbstractYarnScheduler.createReleaseCache may try to clean a null attempt
                 Key: YARN-3830
                 URL: https://issues.apache.org/jira/browse/YARN-3830
             Project: Hadoop YARN
          Issue Type: Bug
            Reporter: nijel
            Assignee: nijel


org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler.createReleaseCache()
{code}
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(
{code}

Here the attempt can be null since the attempt is created later. So null pointer exception
 will come
{code}
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)
{code}

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message