下面配置的是两个队列default和etl, default队列分配20%的处理能力, etl队列分配80%的处理能力,用户dba只能向default队列提交作业,用户etl只能向etl队列提交作业,dba用户组只能向default队列提交任务:
yarn.scheduler.capacity.maximum-am-resource-percent=0.2 --AM可以占用资源队列的最大百分比
yarn.scheduler.capacity.maximum-applications=10000 --最多并行运行的作业数目
yarn.scheduler.capacity.node-locality-delay=40
yarn.scheduler.capacity.root.accessible-node-labels=*
yarn.scheduler.capacity.root.acl_administer_queue=root
yarn.scheduler.capacity.root.acl_submit_applications=*
yarn.scheduler.capacity.root.capacity=100
yarn.scheduler.capacity.root.etl.accessible-node-labels=*
yarn.scheduler.capacity.root.etl.acl_administer_queue=root
yarn.scheduler.capacity.root.etl.capacity=80--能力分配
yarn.scheduler.capacity.root.etl.maximum-capacity=80--最大能力
yarn.scheduler.capacity.root.etl.minimum-user-limit-percent=100
yarn.scheduler.capacity.root.etl.ordering-policy=fifo
yarn.scheduler.capacity.root.etl.state=RUNNING
yarn.scheduler.capacity.root.etl.user-limit-factor=1
yarn.scheduler.capacity.root.dba.acl_administer_queue=root
yarn.scheduler.capacity.root.dba.capacity=20--能力分配
yarn.scheduler.capacity.root.dba.maximum-capacity=20--最大能力
yarn.scheduler.capacity.root.dba.minimum-user-limit-percent=100
yarn.scheduler.capacity.root.dba.ordering-policy=fifo
yarn.scheduler.capacity.root.dba.state=RUNNING--状态
yarn.scheduler.capacity.root.dba.user-limit-factor=1
yarn.scheduler.capacity.root.queues=default,etl--定义队列
yarn.scheduler.capacity.queue-mappings=u:etl:etl,u:dba:default,g:dba:default--用户、用户组队列映射
yarn.scheduler.capacity.queue-mappings-override.enable=true
--启用映射重写功能