[
https://issues.apache.org/jira/browse/YARN-5216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15365101#comment-15365101
]
Konstantinos Karanasos commented on YARN-5216:
----------------------------------------------
Thanks for the reply, [~hrsharma].
Some observations:
* The only operations that the NM needs to worry about is starting and stopping
of containers. Rescheduling/rebalancing is not something done at the NM. The NM
simply kills a container, the AM gets notified and resends the container
request to the RM that in turn reschedules it.
* The way a paused container resumes its execution should be encapsulated in
the container lifecycle. All the ContainersManager needs to do is call a
startContainer and the container should resume if it is paused. So I think
there is no need for a dedicated {{OpportunisticContainerManager}}.
As far as I can see, all you need from the NM to support preemption is (let me
know if there are more things that I am missing):
# Determine the way a container stops (option 1: kill, option 2: preempt).
# Determine the way it start (that is, resume it if it's paused, instead of
starting it from the beginning).
# Decide which container to start (you might want to start first containers
that are paused instead of new ones).
So essentially you only need to tune the startContainer and stopContainer
methods.
Given the above, I can see two options:
# Subclass the {{QueuingContainersManagerImpl}} and override the startContainer
and stopContainer related methods.
# Add a preemption policy that gets plugged in the above methods.
> Expose configurable preemption policy for OPPORTUNISTIC containers running on
> the NM
> ------------------------------------------------------------------------------------
>
> Key: YARN-5216
> URL: https://issues.apache.org/jira/browse/YARN-5216
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Arun Suresh
> Assignee: Hitesh Sharma
> Attachments: YARN5216.001.patch, yarn5216.002.patch
>
>
> Currently, the default action taken by the QueuingContainerManager,
> introduced in YARN-2883, when a GUARANTEED Container is scheduled on an NM
> with OPPORTUNISTIC containers using up resources, is to KILL the running
> OPPORTUNISTIC containers.
> This JIRA proposes to expose a configurable hook to allow the NM to take a
> different action.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]