On 12/8/14, 10:09 PM, Fabio wrote:
Hi everyone,
when running Hive on Tez, a Tez session is alive within the Hive CLI
until I leave the CLI. So if I run on the terminal something like "hive
-f query.sql", once the query is completed the Tez session is closed. Is
there a way to run a query in this way (let's say from the linux
terminal using the -f parameter) but still keeping the Tez session open
among subsequent commands of this kind?

Not in the way you described, but HiveServer2 can pool connections.

Then beeline (not fat client, but the thin SQL CLI) can connect to it and pick up an existing session for reuse.

There's an earlier thread which discusses how this is configured

http://mail-archives.apache.org/mod_mbox/hive-user/201412.mbox/%3ccag6lhyf3taze7grem1psuquk6g+mpmdyno8j6okpcleqnvy...@mail.gmail.com%3E

To use this effectively, you need HiveServer2 to use the GRANT/ALLOW security model (similar to how mysql runs all queries as mysql user, while allowing granular table level security).

Cheers,
Gopal

Reply via email to