pyhs2 set queue in query
<p>I am using pyhs2 to query hive through python but I cannot set the queue inside the query.</p>

<p>I want to set the queue to adhoc</p>

<pre><code>cursor.execute("set mapred.job.queue.name=adhoc;")
cursor.execute("select * from test")
pyhs2.error.Pyhs2Exception: 'Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask'
</code></pre>

<p>and when I try to put the queue inside the query:</p>

<pre><code>cursor.execute("set mapred.job.queue.name=adhoc; select * from test")
</code></pre>

<p>The second part of the query doesn't get executed</p>

<p>Apparently it is not possible to run multiple statements with <code>pyhs2</code> therefore you are unable to set the mapred queue name. Pyhs2 is no longer maintained and the readme advises to use <a href="https://github.com/dropbox/PyHive" rel="nofollow">PyHive</a> which supports these kind of operations.</p>

python hive queue