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

Naganarasimha G R commented on YARN-6741:
-----------------------------------------

Thanks [~sunilg] for commenting on this issue.
The approach what is taken for deletion is first set the queue state to 
*STOPPED* and then if the state of the queue after refresh has changed to  
*STOPPED* (if running apps > 0 then queue's state is set to *DRAINING* ) then 
we can proceed with deletion of the queue in the second refresh. With this we 
ensure that the queue's are not deleted if it has running apps and admin 
ensures that apps are either finished are killed before deletion of a queue. 
But for the ParentQueue to be modified as LeafQueue, we do not have any 
limitation of running apps and anyway if all the children are already deleted 
then it implies that the running apps under this parentQueue is already zero, 
So no need to ensure explicitly by first setting it as STOPPED and then 
converting to LeafQueue.

> Deleting all children of a Parent Queue on refresh throws exception
> -------------------------------------------------------------------
>
>                 Key: YARN-6741
>                 URL: https://issues.apache.org/jira/browse/YARN-6741
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: capacity scheduler
>    Affects Versions: 3.0.0-alpha3
>            Reporter: Naganarasimha G R
>            Assignee: Naganarasimha G R
>         Attachments: YARN-6741.001.patch, YARN-6741.002.patch, 
> YARN-6741.003.patch
>
>
> If we configure CS such that all  children of a parent queue are deleted and 
> made as a leaf queue, then {{refreshQueue}} operation fails when 
> re-initializing the parent Queue
> {code}
>        // Sanity check
>       if (!(newlyParsedQueue instanceof ParentQueue) || !newlyParsedQueue
>           .getQueuePath().equals(getQueuePath())) {
>         throw new IOException(
>             "Trying to reinitialize " + getQueuePath() + " from "
>                 + newlyParsedQueue.getQueuePath());
>       }
> {code}
> *Expected Behavior:*
> Converting a Parent Queue to leafQueue on refreshQueue needs to be supported.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to