You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2020/01/07 14:55:00 UTC
[jira] [Commented] (YARN-9879) Allow multiple leaf queues with the
same name in CS
[ https://issues.apache.org/jira/browse/YARN-9879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17009797#comment-17009797 ]
Peter Bacsko commented on YARN-9879:
------------------------------------
[~wilfreds] based on your suggestion, here's what I came up with:
We can still maintain the HashMap with queueName->CSQueue, however we'd use two levels:
1. Leaf queue -> full path
2. Full path -> CSQueue object
We additionally need an extra map which tells whether a leaf queue is unique.
So after some thinking, this is the semi-pseudocode that could possibly do the job:
{noformat}
Map<String, CSQueue>fullPathQueues;
Map<String, String> leafToFullPath;
Map<String, Boolean> leafUnique;
public CSQueue getQueue(String queueName) {
if (fullPathName(queueName)) {
return queues.get(queueName);
} else {
if (leafUnique.get(queueName)) {
String fullName = leafToFullPath.get(queueName);
return queues.get(fullName);
} else {
throw new YarnException(queueName + " is not unique");
}
}
}
{noformat}
Obviously methods like {{addQueue()}}, {{removeQueue()}} should be updated too.
> Allow multiple leaf queues with the same name in CS
> ---------------------------------------------------
>
> Key: YARN-9879
> URL: https://issues.apache.org/jira/browse/YARN-9879
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Gergely Pollak
> Assignee: Gergely Pollak
> Priority: Major
> Attachments: DesignDoc_v1.pdf
>
>
> Currently the leaf queue's name must be unique regardless of its position in the queue hierarchy.
> Design doc and first proposal is being made, I'll attach it as soon as it's done.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org