[
https://issues.apache.org/jira/browse/YARN-10571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17299562#comment-17299562
]
Andras Gyori commented on YARN-10571:
-------------------------------------
Thank you [~pbacsko], [~shuzirra], [~zhuqi] for the reviews. Here is my
addition to the new revision:
* The CSAutoQueueHandler as removed, and its logic was moved into
CSQueueManager. This is necessary in order to avoid repetition and the allow
the same logic to be used by Mapping rules.
* I have incorporated the StringBuilder idea, good catch, I agree with this!
Also made the code more terse.
* I think finding the first static parent from the other side (beginning with
root) will be an inferior solution because:
** Code will be harder to read due to a lookup needed to identify that the
next queue in the path is not existing or a dynamic queue
** It will be even suboptimal if you need to parse a long static path (eg. for
root.a.b.c.d.e.e-auto you need to parse queues 5 times instead of just 1). Of
course this will change when the dynamic queue depth is not limited to 2, but
it is a trade off. The performance difference is probably negligible.
* I have added early return and also made the logic more efficient and terse
(hopefully)
* The NPE case is a really nice catch, covered this scenario and also added a
test to back it.
> Refactor dynamic queue handling logic
> -------------------------------------
>
> Key: YARN-10571
> URL: https://issues.apache.org/jira/browse/YARN-10571
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Andras Gyori
> Assignee: Andras Gyori
> Priority: Minor
> Attachments: YARN-10571.001.patch, YARN-10571.002.patch
>
>
> As per YARN-10506 we have introduced an other mode for auto queue creation
> and a new class, which handles it. We should move the old, managed queue
> related logic to CSAutoQueueHandler as well, and do additional cleanup
> regarding queue management.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]