[ https://issues.apache.org/jira/browse/HADOOP-4472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643425#action_12643425 ]
Vivek Ratan commented on HADOOP-4472: ------------------------------------- bq. If we think that doing HADOOP-4513 addresses the issue to do with initializing too many jobs simultaneously in the capacity scheduler, then I propose that we don't fix this issue at all for now. Instead we should look at HADOOP-4421. Thoughts? Agreed. Just to sum up. A job can start running (i.e., we can schedule the first of its map or reduce tasks) when it's M/R tasks are initialized and when its setup task is complete. Each of these (running of the setup task, calling initTasks()) can potentially take a while. The benefit of moving the creation of the setup task outside of initTasks() is the ability to run the setup task independently of when initTasks() is called. IN particular, we'd like to run the setup tasks as early as possible. Or at the very least, avoid running the setup task after initTasks(), as these two are independent. This approach is beneficial if either the setup task or initTasks(), or both, take a long time. However, achieving this separation is not easy. If we want to preserve current semantics and not change any interfaces, then we need to update a job's state to RUNNING either when the setup task is done or when initTasks() completes. Since the job's state change requires notifications to listeners, and initTasks() does not have access to listeners, this notification is going to be hard to do without changing some interfaces. See HADOOP-4521 for a related issue. Given that the long-term solution is not clear, and could be quite different, we should drop this proposal and look at a larger solution in the context of HADOOP-4421. > Should we move out the creation of setup/cleanup tasks from > JobInProgress.initTasks()? > --------------------------------------------------------------------------------------- > > Key: HADOOP-4472 > URL: https://issues.apache.org/jira/browse/HADOOP-4472 > Project: Hadoop Core > Issue Type: Improvement > Components: mapred > Reporter: Vivek Ratan > Assignee: Amareshwari Sriramadasu > > JobInProgress.initTasks() creates TIPs for map and reduce tasks, and also the > newly-introduced setup and cleanup tasks. initTasks() is called by the > schedulers, as for reasons of memory optimizations, schedulers may choose to > initialize M/R tasks at various moments (the Capacity Scheduler, for example, > calls initTasks() just when it considers a job for running). One can say that > Schedulers 'own' the initialization of M/R tasks in a job. Furthermore the JT > 'owns' the setup and cleanup tasks (it schedules them, and Schedulers are > unaware of these tasks). This causes a problematic dependency between the JT > and a Scheduler. For example, the Capacity Scheduler calls initTasks() and > immediately calls JobInProgress.obtainNewMapTask for a map task. This is a > problem today, because we cannot run any map or reduce tasks before the setup > task is run, which the Capacity Scheduler is not aware of. > Either all Schedulers are explicitly aware of setup/cleanup tasks and their > dependencies with M/R tasks (in which case, Schedulers 'own' the creation and > scheduling of all these tasks correctly), or the JT 'owns' the setup/cleanup > tasks and Schedulers are completely unaware of them (in which case, the > creation of setup/cleanup tasks must be moved out of initTasks into a > separate method which is called by the JT). > I think the latter is the right way to go (unless we implement HADOOP-4421, > in which case the former option may be viable as well). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.