hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandy Ryza (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-164) Race condition in Fair Scheduler
Date Tue, 13 Nov 2012 22:58:12 GMT

    [ https://issues.apache.org/jira/browse/YARN-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496643#comment-13496643
] 

Sandy Ryza commented on YARN-164:
---------------------------------

I noticed this independently and fixed it in my patch for YARN-184. If this one is used, starting
the UpdateThread should happen after creating the QueueManager, and there's no need to check
the initialized variable in the Update thread because it will always be true.
                
> Race condition in Fair Scheduler
> --------------------------------
>
>                 Key: YARN-164
>                 URL: https://issues.apache.org/jira/browse/YARN-164
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: scheduler
>    Affects Versions: 2.0.2-alpha
>            Reporter: Devaraj K
>            Assignee: Devaraj K
>            Priority: Critical
>         Attachments: YARN-164.patch
>
>
> {code:xml}
>       Thread updateThread = new Thread(new UpdateThread());
>       updateThread.start();
>       initialized = true;
> {code}
> In the above code, making the initialized as true after starting the UpdateThread.
> {code:xml}
>   private class UpdateThread implements Runnable {
>     public void run() {
>       while (initialized) {
>         try {
>           Thread.sleep(UPDATE_INTERVAL);
>           update();
>           preemptTasksIfNecessary();
>         } catch (Exception e) {
>           LOG.error("Exception in fair scheduler UpdateThread", e);
>         }
>       }
>     }
>   }
>  {code}
>  In this run method of UpdateThread, it is checking for the initialized and exiting if
it is not true. Here most of the times initialized is getting true after exiting the UpdateThread
and the thread functionality is missing, due to that all the submitted applications are hanging
without making any progress.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message