Good day !
In official docs wrote, that those action could be done throw specifing queue name in jdbc params list "hive_conf_list" (https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-ConnectionUR...
In this case your connection string would look like:
jdbc:hive2://<host>:<port>/dbName;sess_var_list?mapred.job.queue.name=your_queue_name
But of course this solution doesn't works for me (((
So I found workaround of this problem. When you create a new Connection via DriverManager you can specify the additional properties,
for example as in the code below:
java.lang.Class.forName("org.apache.hive.jdbc.HiveDriver");
java.util.Properties properties = new Properties();
properties.put("mapred.job.queue.name", "queu_name");
return java.sql.DriverManager.getConnection(url, properties);
So in this properties you can also specify que name for the creating connection.
This solution works with jdbc driver (maven dependency) version 1.1.0