Hadoop YARN:fair-scheduler.xml中的AclSubmitApps不起作用?

时间:2014-10-20 09:12:44

标签: hadoop acl yarn

我打算做的是限制可以将任务发送到testmonitor队列的用户或组。

在我设置AclSubmitApps之后,我仍然可以在用户testmonitor中通过set mapred.job.queue.name=root.testmonitor;提交一个hive任务,其队列设置为monitor:monitor。我可以确保我的fair-scheduler.xml由yarn重新加载(通过更改maxRunningApps并可以看到hadoop监视器网页中的更改)。

我发现fair-scheduler.xmlofficial document给出的示例之间没有本质区别。谁能给我一些想法?非常感谢!

我的fair-scheduler.xml     

<allocations>
  <queue name="default">
    <minResources>100000 mb,64vcores</minResources>
    <maxResources>12000000 mb,720vcores</maxResources>
    <maxRunningApps>50</maxRunningApps>
    <weight>1.0</weight>
    <schedulingPolicy>fifo</schedulingPolicy>
    <minSharePreemptionTimeout>300</minSharePreemptionTimeout>
  </queue>

  <queue name="testmonitor">
    <minResources>12000000 mb, 600vcores</minResources>
    <maxResources>20000000 mb, 720vcores</maxResources>
    <maxRunningApps>5</maxRunningApps>
    <weight>2.0</weight>
    <schedulingPolicy>fair</schedulingPolicy>
    <minSharePreemptionTimeout>300</minSharePreemptionTimeout>
    <aclSubmitApps>testmonitor</aclSubmitApps>
  </queue>

  <userMaxAppsDefault>50</userMaxAppsDefault>
  <fairSharePreemptionTimeout>6000</fairSharePreemptionTimeout>
  <defaultQueueSchedulingPolicy>fifo</defaultQueueSchedulingPolicy>
</allocations>

监控正在运行的任务: enter image description here

关于公平调度程序的官方文档示例:

<?xml version="1.0"?>
<allocations>
  <queue name="sample_queue">
    <minResources>10000 mb,0vcores</minResources>
    <maxResources>90000 mb,0vcores</maxResources>
    <maxRunningApps>50</maxRunningApps>
    <weight>2.0</weight>
    <schedulingPolicy>fair</schedulingPolicy>
    <queue name="sample_sub_queue">
      <aclSubmitApps>charlie</aclSubmitApps>
      <minResources>5000 mb,0vcores</minResources>
    </queue>
  </queue>

  <user name="sample_user">
    <maxRunningApps>30</maxRunningApps>
  </user>
  <userMaxAppsDefault>5</userMaxAppsDefault>

  <queuePlacementPolicy>
    <rule name="specified" />
    <rule name="primaryGroup" create="false" />
    <rule name="default" />
  </queuePlacementPolicy>
</allocations>

1 个答案:

答案 0 :(得分:0)

将根队列添加为父队列。

<queue name="root">
<aclSubmitApps> </aclSubmitApps>
<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> 
</queue>