Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to assign the query to YARN Queue, while accessing hive through beeline

avatar
Contributor
 
1 ACCEPTED SOLUTION

avatar
@kotesh banoth

If you are using tez engine:

beeline !connect jdbc:hive2://your.host:your.port/data_base?tez.queue.name=<queue-name>

If you are using MR execution engine:

beeline !connect jdbc:hive2://your.host:your.port/data_base?mapred.job.queue.name=your_queue_name

View solution in original post

7 REPLIES 7

avatar
@kotesh banoth

If you are using tez engine:

beeline !connect jdbc:hive2://your.host:your.port/data_base?tez.queue.name=<queue-name>

If you are using MR execution engine:

beeline !connect jdbc:hive2://your.host:your.port/data_base?mapred.job.queue.name=your_queue_name

avatar
Contributor
@Sandeep Nemuri

Thanks so much.

One more scenario:

If different business users are accessing hive with different user name from same server. Is it possible when user logins into server and can users query be assigned to predefined queue automatically??

Scenario as Below:

93127-queue.png

Thanks in advance

avatar

@kotesh banoth, In this case you can configure yarn queue mapping, This applies to all the applications user is submitting (not only hive/beeline) by default without mentioning the queue name while submitting the app will be submitted to the mapped queue.

Ref: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_yarn-resource-management/content/default...

Hope this helps.

avatar

@kotesh banoth Feel free to accept this answer if it helped you.

avatar
Contributor

avatar
New Contributor

0: jdbc:mysql://hdp1.demo.lab/hive> set mapred.job.queue.name=root.admin;
Error: Unknown system variable 'job' (state=HY000,code=1193)
0: jdbc:mysql://hdp1.demo.lab/hive> set tez.queue.name=root.admin;
Error: Unknown system variable 'queue' (state=HY000,code=1193)
0: jdbc:mysql://hdp1.demo.lab/hive> SET tez.queue.name=root.admin;
Error: Unknown system variable 'queue' (state=HY000,code=1193)
0: jdbc:mysql://hdp1.demo.lab/hive> SET TEZ.QUEUE.NAME=ROOT.ADMIN
0: jdbc:mysql://hdp1.demo.lab/hive> SET TEZ.QUEUE.NAME=ROOT.ADMIN;
Error: Unknown system variable 'QUEUE' (state=HY000,code=1193)
0: jdbc:mysql://hdp1.demo.lab/hive> set TEZ.queue.name=root.admin;
Error: Unknown system variable 'queue' (state=HY000,code=1193)
0: jdbc:mysql://hdp1.demo.lab/hive> SET tez.queue.name=ROOT.ADMIN;
Error: Unknown system variable 'queue' (state=HY000,code=1193)
0: jdbc:mysql://hdp1.demo.lab/hive> SET tez.queue.name=admin;
Error: Unknown system variable 'queue' (state=HY000,code=1193)
0: jdbc:mysql://hdp1.demo.lab/hive> SET tez.job.queue.name=admin;
Error: Unknown system variable 'job' (state=HY000,code=1193)
0: jdbc:mysql://hdp1.demo.lab/hive>

avatar
Expert Contributor

Hi All,


I have a query here.

How to assign a seperate yarn queue when i submit query for hive-hbase integration table ?

By default it goes to default queue.

Appreciate your help please.


thanks,

Rishit Shah