Ranger yarn plug-in installation

Ranger-0.6.0-yarn-plugin is installed to all ResourceManager nodes of the Yarn. Other NodeManager nodes
do not need to be installed.
Landing HDFS install user, garrison/zdh1234 hadoop (user group), obtain installation package decompression
SCP/home/backup/ranger/ranger – 0.6.0 – yarn – plugin. Tar. Gz.
the tar – ZXVF ranger – 0.6.0 – yarn – plugin. Tar. Gz.
vi install properties
modify parameters is as follows:

POLICY_MGR_URL=http://10.43.159.245:6080
SQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar
REPOSITORY_NAME=yarndev
CUSTOM_USER=garrison
CUSTOM_GROUP=hadoop

To install the Ranger Yarn Plugin, note:./ enabled-plugin. sh script should be run as root. :
./ enableyarn-plugin. sh
needs to restart after the creation of the Yarn.
ZDH – 245 bales to garrison of ZDH – 240
SCP garrison @ ZDH – r – 245:/home/garrison/ranger – 0.6.0 – yarn – plugin.
root installation script execution, and restart the yarn.
The Service of HDFS plugin
YARN new Service registered in Ranger-Admin is modified as follows

Service Name = yarnpdev
UserName = garrison
Password = zdh1234
YARN REST URL = http://10.43.159.240:8188

Then click TestConnection to save successfully.
Close the all-queue policy,
create root.default policy, and give mysql users the right to submit the queue.
use mysql user to perform mapreduce task, give mysql access to the corresponding directory of HDFS:

export JAVA_HOME=/usr/share/java/jdk1.7.0_80
/home/garrison/hadoop-2.7.1/bin/hadoop jar /home/garrison/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar wordcount -Dmapreduce.job.queuename=default hdfs://gagcluster/usr/wordcout.txt /usr/wordresult_002
/home/garrison/hadoop-2.7.1/bin/hadoop fs -text /usr/wordresult_002/part-r-00000

User usersync cannot submit applications to queue root.default
Yarn queue permissions enable capacity schedule queues to implement
Yarn -site.xml configuration file to add configuration items:

<property>
    <name>yarn.resourcemanager.scheduler.class</name>    
    <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler</value>
</property>

The capacity-scheduler. XML configuration is as follows, allowing only the garrison user to submit a job:

<property>
  <name>yarn.scheduler.capacity.root.acl_submit_applications</name>
   <value>garrison</value>
   <description>
     The ACL of who can submit jobs to the root queue.
   </description>
 </property>
 <property>
  <name>yarn.scheduler.capacity.root.acl_administer_queue</name>
  <value>garrison</value>
  <description>
    The ACL of who can administer jobs on the default queue.
  </description>
</property>
<property>
  <name>yarn.scheduler.capacity.root.default.acl_submit_applications</name>
  <value>garrison</value>
  <description>
    The ACL of who can submit jobs to the default queue.
  </description>
</property>
<property>
  <name>yarn.scheduler.capacity.root.default.acl_administer_queue</name>
  <value>garrison</value>
  <description>
    The ACL of who can administer jobs on the default queue.
  </description>
</property>

Read More: