[
https://issues.apache.org/jira/browse/YARN-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15981951#comment-15981951
]
Wangda Tan commented on YARN-5949:
----------------------------------
Thanks [~jhung] for your patch, overall looks good to me as well, few
comments/suggestions:
- Not caused by this patch, there's some place of
{{RMWebServices#updateSchedulerConfiguration}} hardcoded to use
CapacityScheduler, could you update to MutableConfScheduler instead? Similarly,
we should avoid directly call CapacityScheduler in
removeQueue/addQueue/updateQueue as well. There're some cleanups can be done
for emoveQueue/addQueue/updateQueue, there're some duplicated logics.
- QueueAdminConfigurationMutationPolicy use regex to parse the configs and get
existing queue names, we should avoid doing this. YarnScheduler has a
getQueueInfo API, by using that we can get all queues.
- Also we should get existing queues when necessary, I think we can add an API
to reinitialize ConfigurationMutationPolicy.
- Please make sure QueueAdminConfigurationMutationPolicy can handle invalid
configs (like "x.y.z" and x is not a root queue)
- Is it possible to change a global config (such as
{{yarn.scheduler.capacity.maximum-applications}}), if so, is following check
enough?
{code}
while (queue == null) {
// We are adding a queue (whose parent we are possibly also adding).
// Check ACL of lowest parent queue which already exists.
parentPath = parentPath.substring(0, parentPath.lastIndexOf('.'));
String parentName = parentPath.lastIndexOf('.') != -1 ?
parentPath.substring(parentPath.lastIndexOf('.') + 1) : parentPath;
queue = ((CapacityScheduler) rmContext.getScheduler())
.getQueue(parentName);
}
if (!queue.hasAccess(QueueACL.ADMINISTER_QUEUE, user)) {
return false;
}
{code}
If a global config is updated by admin, should we request admin permission?
> Add pluggable configuration policy interface as a component of
> MutableCSConfigurationProvider
> ---------------------------------------------------------------------------------------------
>
> Key: YARN-5949
> URL: https://issues.apache.org/jira/browse/YARN-5949
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Jonathan Hung
> Assignee: Jonathan Hung
> Attachments: YARN-5949-YARN-5734.001.patch
>
>
> This will allow different policies to customize how/if configuration changes
> should be applied (for example, a policy might restrict whether a
> configuration change by a certain user is allowed). This will be enforced by
> the MutableCSConfigurationProvider.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]