Fairscheduler setting the user and group a queue can accept

If we set rule specified in queuePlacementPolicy, then the user can submit job to any queue.

<queuePlacementPolicy>
     <rule name="specified" create="false"/>
</queuePlacementPolicy>

If a user has 2 queues, one for on line jobs and one for test jobs. Take user bi as an example. “bi” has two queue, “bi_online” and “bi_test”, we want the two queues accept the jobs from user bi and reject else.
Put all queues in queue root and add aclSubmitApps and aclAdministerApps to the root queue, then the setting take effect.

aclSubmitApps has two parts, separated by a whitespace, the former part is user list, and the latter part is group list.

<aclSubmitApps>user1,user2,user3,... group1,group2,...</aclSubmitApps>


<?xml version="1.0"?>
<allocations>
   <queue name="root">
      <aclSubmitApps>nobody nobody</aclSubmitApps>
      <aclAdministerApps>nobody nobody</aclAdministerApps>

      <queue name="default">
        <weight>2.0</weight>
        <schedulingPolicy>fifo</schedulingPolicy>
        <aclSubmitApps>nobody nobody</aclSubmitApps>
        <aclAdministerApps>nobody nobody</aclAdministerApps>
    <!-- <maxResources>1 mb,1vcores</maxResources>-->
      </queue>
      <queue name="houzhizhen">
        <weight>2.0</weight>
        <schedulingPolicy>fifo</schedulingPolicy>
        <aclSubmitApps>hadoop hadoop</aclSubmitApps>
        <aclAdministerApps>hadoop hadoop</aclAdministerApps>
    <!-- <maxResources>830208 mb,750vcores</maxResources>-->
       </queue>

    <queue name="bi">
      <weight>2.0</weight>
      <schedulingPolicy>fifo</schedulingPolicy>
      <aclSubmitApps>houzhizhen root</aclSubmitApps>
      <aclAdministerApps>houzhizhen root</aclAdministerApps>
    <!-- <maxResources>830208 mb,750vcores</maxResources>-->
    </queue>

  </queue>

  <userMaxAppsDefault>100</userMaxAppsDefault>
  <fairSharePreemptionTimeout>30</fairSharePreemptionTimeout>
  <queuePlacementPolicy>
     <rule name="specified" create="false"/>

     <rule name="reject"/>
  </queuePlacementPolicy>
</allocations>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值