Support Questions

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

Hive Server 2 connection configured to go to a queue

avatar

How can we default all hive server 2 connections to go to a separate Yarn Queue?

11 REPLIES 11

avatar
Master Mentor
@Shivaji

See this https://streever.atlassian.net/wiki/pages/viewpage.action?pageId=4390918

Option #1 - Thru the Scripts run in the established connection

So now that you have a pool of AM's running, for possibly multiple queue's, who do you get your JDBC session into HS2 to use the desired queue? You need to specify the queue you want in your JDBC session with:

Specify Queue in Script

-- (Preferred) But less known property, not so well documented is required for HDP 2.1.1 set tez.queue.name=alt; -- For HDP 2.1.3 and above, this property will work. set mapreduce.job.queuename=alt;

Option #2 - Modify the JDBC URL String to include the queue

Specify a Queue in the JDBC Connection String

jdbc:hive2://localhost:10000?tez.queue.name=alt

Option #3 - Set the Default Queue for Hive Server2

On the server that's running Hive Server2, modify hive-site.xml the include the following:

hive-site.xml

<property> <name>mapreduce.job.queuename</name> <value>alt</value> </property>

OR

tez-site.xml

<property> <name>tez.queue.name</name> <value>alt</value> </property>

avatar

I have seen this before.

2344-screen-shot-2016-02-23-at-43807-am.png

screen-shot-2016-02-23-at-43742-am.png

Ambari does not allow you to do this?

Tried in sandbox

Couple of other side affects

a) If I set tez.queue.name explicitly

Performance of queries of demo 2 is much slower

b) Both the queues have 50% of the queue capacity

avatar
Master Mentor

@Shivaji You can define multiple queues. I know , its a lot to read http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.4/bk_performance_tuning/content/hive_perf_best...

You have to define the queue in your code or connection.

avatar

Done the reading. Let me know if it works for you. The user to queue mapping is working. But not the above.

avatar
Master Mentor

@Shivaji Let me get back to you on this with a demo

avatar
Super Collaborator

I have a similar question.

In my case, I need to connect to Hive using a Sas tool that only provides me with the following fields:

Host(s)

Port

Database

And then there is a tool to add "server side properties", which creates a list of key/value pairs.

Can anyone tell me what server side properties I can use to force this connection to always use a specific queue?

Or, a way to associate this connection with a user and associate that user with a key/value pair?

avatar
Master Mentor

avatar

@Artem Ervits

I have gone through the docs. Please see the comment to Neeraj's question.

a) How do you set this in Ambari?

The Hive Queues do not get set. Try this on Sandbox.

avatar
Master Mentor

Capacity scheduler view is in sandbox, you can setup those queues using the capacity scheduler view our manually using scheduler section of yarn configs. This page http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.4/bk_performance_tuning/content/section_create...