<property>
    <name>yarn.resourcemanager.scheduler.class</name>
    <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler</value>
    </property>

    <property>

    <name>yarn.scheduler.fair.allocation.file</name>

    <value>/usr/hdp/current/hadoop-client/conf/fair-scheduler.xml</value>

    </property>

    <property>

    <name>yarn.scheduler.fair.preemption</name>

    <value>true</value>

    </property>

    <property>

    <name>yarn.scheduler.fair.user-as-default-queue</name>

    <value>true</value>

    <description>default is True</description>

    </property>

    <property>

    <name>yarn.scheduler.fair.allow-undeclared-pools</name>

    <value>false</value>

    <description>default is True</description>

    </property>

 

# cat fair-scheduler.xml
<?xml version="1.0"?>
<allocations>
  <userMaxAppsDefault>30</userMaxAppsDefault>
  <queue name="root">
    <minResources>512mb,1vcores</minResources>
    <maxResources>1024mb,2vcores</maxResources>
    <maxRunningApps>100</maxRunningApps>
    <weight>1.0</weight>
    <schedulingMode>fair</schedulingMode>
    <aclSubmitApps> </aclSubmitApps>
    <aclAdministerApps> </aclAdministerApps>

    <queue name="default">
      <minResources>256mb,1vcores</minResources>
      <maxResources>512mb,1vcores</maxResources>
      <maxRunningApps>100</maxRunningApps>
      <schedulingMode>fair</schedulingMode>
      <weight>1.0</weight>
      <aclSubmitApps>*</aclSubmitApps>
    </queue>

    <queue name="businessA">
      <minResources>256mb,1vcores</minResources>
      <maxResources>512mb,1vcores</maxResources>
      <maxRunningApps>100</maxRunningApps>
      <schedulingMode>fair</schedulingMode>
      <weight>1.0</weight>
      <aclSubmitApps>businessA,lxw1234 group_businessA,group_lxw1234</aclSubmitApps>
      <aclAdministerApps>businessA,hadoop group_businessA,supergroup</aclAdministerApps>
    </queue>

  </queue>
</allocations>