Pivotal Knowledge Base

Follow

Configuring ACLs for fairscheduler in PHD 2 and PHD 3

Environment

  • PHD 2.x
  • PHD 3.x

Purpose

This article provides a sample configuration for configuration ACL's with fair scheduler in PHD 2.x and 3.x It will also describe some of the functionality differences between the two versions. For information regarding how to configure the fair scheduler please see the following links

Some General information about ACL's

  • aclAdministerApp param defaults to "*" which means all users can administer the queue they execute the job in.  So it is important to set this param if you plan to use aclSubmitApps param

Using ACLs in fairscheduler with PHD 2.x

sample configuration

<?xml version="1.0"?>
<allocations>
<queue name="queue1">
    <minResources>10000mb,10vcores</minResources>
    <maxResources>30000mb,30vcores</maxResources>
    <maxRunningApps>10</maxRunningApps>
    <weight>2.0</weight>
    <schedulingMode>fair</schedulingMode>
    <aclAdministerApps>gpadmin</aclAdministerApps>
    <aclSubmitApps>gpadmin</aclSubmitApps>
</queue>
</allocations>

If a user other then gpadmin attempts to submit an application to the "queue1" queue they will see the following error

sudo -u postgres hadoop jar /usr/lib/gphd/hadoop-mapreduce/hadoop-mapreduce-examples.jar pi -Dmapreduce.job.queuename=queue1 100 100

15/07/10 12:04:18 INFO mapreduce.Job: Job job_1436555033060_0001 failed with state FAILED due to: User postgres cannot submit applications to queue root.queue1

Using ACLs in fairscheduler with PHD 3.x

<?xml version="1.0"?>
<allocations>
<queue name="root">
<aclSubmitApps>gpadmin</aclSubmitApps>
<aclAdministerApps>gpadmin</aclAdministerApps>
<queue name="queue1">
    <minResources>10000mb,10vcores</minResources>
    <maxResources>30000mb,30vcores</maxResources>
    <maxRunningApps>10</maxRunningApps>
    <weight>2.0</weight>
    <schedulingMode>fair</schedulingMode>
    <aclAdministerApps>gpadmin</aclAdministerApps>
    <aclSubmitApps>gpadmin</aclSubmitApps>
</queue>
</queue>
</allocations>

If a user other then gpadmin attempts to submit an application to the "queue1" queue they will see the following error

sudo -u postgres hadoop jar /usr/phd/current/hadoop-mapreduce-client/hadoop-mapreduce-examples.jar pi -Dmapreduce.job.queuename=queue1 100 100


java.io.IOException: Failed to run job : User postgres cannot submit applications to queue root.queue1

In PHD 3.x there are some caveats and enhancments users should take note of

  • Ambari does not support enabling fair scheduler. If a user attempts to manually configure fair scheduler in the yarn-site.xml then normal Ambari operations like start/stopping of the resource manager service will overwrites those changes
  • Capacity scheduler is recommended in PHD 3.x given fairscheduler is not supported
  • In phd 2.x users find it difficult to configure ACLs because configure the root queue is not exposed in this version. The following enhancement YARN-1258 is available in PHD 3.x
  • Often users request this feature YARN-2257 which allows automated queue routing based on user submitting the job. This feature is there in PHD 3.x

Comments

Powered by Zendesk