yarn-site.xml 添加如下内容
<property>
<name>yarn.acl.enable</name>
<value>true</value>
</property>
<property>
<name>yarn.admin.acl</name>
<value>root root</value>
</property>
fair-scheduler.xml 完整的demo
<?xml version="1.0"?>
<allocations>
<queue name="root">
<aclSubmitApps> </aclSubmitApps>
<aclAdministerApps> </aclAdministerApps>
<queue name="default">
<aclSubmitApps></aclSubmitApps>
<aclAdministerApps> </aclAdministerApps>
<minResources>1024 mb,1 vcores</minResources>
<maxResources>983040 mb,720 vcores</maxResources>
<maxRunningApps>100</maxRunningApps> <!-- 可以同时运行的作业数 -->
<weight>5.0</weight> <!-- 权值 -->
<schedulingPolicy>fifo</schedulingPolicy>
</queue>
<queue name="test">
<minResources>1024 mb,1 vcores</minResources>
<maxResources>6029312 mb,2944 vcores</maxResources>
<aclSubmitApps>bibo</aclSubmitApps>
<maxRunningApps>100</maxRunningApps> <!-- 可以同时运行的作业数 -->
<weight>4.0</weight> <!-- 权值 -->
<schedulingPolicy>fifo</schedulingPolicy>
</queue>
</queue>
</allocations>
参考资料
YARN 中公平调度程序的 ACL 不起作用
https://www.alibabacloud.com/help/zh/doc-detail/62958.htm
https://hadoop.apache.org/docs/r2.7.0/hadoop-yarn/hadoop-yarn-site/FairScheduler.html#Queue_Access_Control_Lists
网友评论