Yarn新建队列分支并运行应用

目录

新建队列分支

分发配置文件

刷新队列

 在新队列运行任务


新建队列分支

编辑capacity-scheduler.xml

cd /opt/module/hadoop-3.1.3/etc/hadoop

vim capacity-scheduler.xml

Yarn新建队列分支并运行应用_第1张图片

增加以下内容



    yarn.scheduler.capacity.root.queues
    default,hive
    
      The queues at the this level (root is the root queue).
    




    yarn.scheduler.capacity.root.default.capacity
    40




    yarn.scheduler.capacity.root.default.maximum-capacity
    60

(2)为新加队列添加必要属性:


    yarn.scheduler.capacity.root.hive.capacity
    60




    yarn.scheduler.capacity.root.hive.user-limit-factor
    1




    yarn.scheduler.capacity.root.hive.maximum-capacity
    80




    yarn.scheduler.capacity.root.hive.state
    RUNNING




    yarn.scheduler.capacity.root.hive.acl_submit_applications
    *




    yarn.scheduler.capacity.root.hive.acl_administer_queue
    *




    yarn.scheduler.capacity.root.hive.acl_application_max_priority
    *






    yarn.scheduler.capacity.root.hive.maximum-application-lifetime
    -1




    yarn.scheduler.capacity.root.hive.default-application-lifetime
    -1

分发配置文件

 xsync capacity-scheduler.xml

刷新队列

yarn rmadmin -refreshQueues

Yarn新建队列分支并运行应用_第2张图片

 在新队列运行任务

cd /opt/module/hadoop-3.1.3

hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar wordcount -D mapreduce.job.queuename=hive /input/ /output/

 

你可能感兴趣的:(大数据,hadoop,大数据,yarn)