我已使用fair-scheduler.xml中的acl配置了队列。但其他用户也可以将作业运行到同一队列中。我需要根据我的队列在其他地方定义acl吗。任何链接或帮助将不胜感激。谢谢
<queue name="queue1">
<minResources>10000mb,10vcores</minResources>
<maxResources>30000mb,30vcores</maxResources>
<maxRunningApps>10</maxRunningApps>
<weight>2.0</weight>
<schedulingMode>fair</schedulingMode>
<aclAdministerApps>User1</aclAdministerApps>
<aclSubmitApps>User1</aclSubmitApps>
</queue>
4条答案
按热度按时间juzqafwq1#
你需要创造
allocations.xml
在/etc/hadoop/
文件夹。在中定义所有这些属性allocations.xml
还指定中与计划程序相关的更改yarn-site.xml
```yarn.resourcemanager.scheduler.class
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler
yarn.scheduler.fair.allocation.file
allocations.xml
8yparm6h2#
对我有用。谢谢大家
e5nszbig3#
注意:这是关于容量调度器的。不确定公平调度程序acl继承行为是否不同。
ACL通过配置
yarn.scheduler.capacity.<queue-path>.acl_submit_applications
,请参阅容量调度器:yarn.scheduler.capacity.root.<queue-path>.acl_submit_applications
控制谁可以向给定队列提交应用程序的acl。如果给定用户/组在给定队列或层次结构中的某个父队列上有必要的ACL,则可以提交应用程序。如果未指定,则此属性的ACL将从父队列继承。请注意有关队列继承父队列ACL的部分。因为通常所有队列都从根队列继承,根队列acl保留在default capacity-scheduler.xml中
*
:因此,通常所有队列都会获得所有用户的ACL(
*
)能够服从。配置队列时,应确保限制父队列和所需队列。更新
在查看fs队列代码之后,我必须得出这样的结论:行为是相同的。访问检查在中完成
AllocationConfiguration.hasAccess()
:并不是说代码在队列层次结构上迭代(通过在名称中的每个句点分割ad),直到父队列之一授予访问权。就像容量调度器的行为一样。直到它到达根队列,这时这段代码就会生效:
还要注意如何从
AllocationFileLoaderService.reloadAllocations()
:注意队列名称实际上是如何与父队列和
"root"
是所有队列的隐式父级。因此,您的队列名称root.queue1
.因此,这意味着在fs调度器中,所有队列在默认情况下都将访问权授予所有人,因为它们都继承了
root
队列默认访问。您需要显式重写root
将配置文件中的ACL排队。这与capacityscheduler没有什么不同,但我认为cs获取默认表单配置的行为优于fs从代码获取默认表单配置的行为。我实际上没有测试fs行为,但代码可能在读取时执行。
dsekswqp4#
在文件中写入“root”队列,即yarn.scheduler.fair.allocation.file的值。
前任:
在yarn-site.xml中
在fair scheduler.xml中,应该为根队列定义acl权限。
...
如果用户被授权用于父队列,则他们被授权用于子队列。根队列的默认acl策略是“*”,因此,所有用户都有权访问所有队列。