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

Konstantinos Karanasos commented on YARN-5216:
----------------------------------------------

Thanks for the patch, [~hrsharma].

Some first comments:
It seems there is a lot of refactoring that is not really needed for 
introducing pluggable preemption policies. Essentially for the preemption 
policies, you simply need to override the way you are stopping a container (and 
possibly the way you are starting it too?).
For instance, why do we need to pull the queues of opportunistic containers to 
a new class? After all, the {{QueuingContainersManagerImpl}} extends the 
{{ContainersManagerImpl}} just to add these containers queues.
Another drawback of the refactoring is that in various points we now have to 
treat the queued/allocated opportunistic differently from the queued/allocated 
guaranteed by adding many explicit if statements.

More concretely, I suggest to add a {{ContainerPreemptionManager}} that 
provides different ways to do the stopping (and starting?) of containers, 
instead of pulling the data structures from the 
{{QueuingContainersManagerImpl}} and having to override many more methods.

Minor:
# Let's give a more descriptive name to the first implementation of the 
{{ContainerPreemptionManager}} to show that it preempts containers by killing 
them.
# After the parameter you added in {{YarnConfiguration}}, please add an extra 
constant that determines its default value (check the other parameters for 
reference).

> 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]

Reply via email to