轉自:http://blog.csdn.net/wisgood/article/details/39075883
作業提交到的隊列:mapreduce.job.queuename
作業優先級:mapreduce.job.priority,優先級默認有5個:LOW VERY_LOW NORMAL(默認) HIGH VERY_HIGH
1、靜態設置
1.1 Pig版本
SET mapreduce.job.queuename root.etl.distcp;
SET mapreduce.job.priority HIGH;
1.2 Hive版本
SET mapreduce.job.queuename=root.etl.distcp;
SET mapreduce.job.priority=HIGH;
1.3 MapReduce版本:
hadoop jar app.jar -D mapreduce.job.queuename=root.etl.distcp -D mapreduce.job.priority=HIGH
2、動態調整
如果是已經在運行中的任務,可以動態調整任務所屬隊列及其優先級。
2.1 調整優先級
hadoop1.0及以下版本:hadoop job -set-priority job_201707060942_6121418 VERY_HIGH
hadoop2.0及以上版本:yarn application -appId application_1478676388082_963529 -updatePriority VERY_HIGH
yarn application -movetoqueue application_1478676388082_963529 -queue root.etl
其中application_1478676388082_963529為yarn applition id,queue后跟的是需要move到的隊列。
hadoop2.0及以上版本:yarn application -appId application_1478676388082_963529 -updatePriority VERY_HIGH
2.2 動態調整隊列
hadoop2.0及以上版本可以通過下面命令yarn application -movetoqueue application_1478676388082_963529 -queue root.etl
其中application_1478676388082_963529為yarn applition id,queue后跟的是需要move到的隊列。