...
HIVE-11488 (Hive 2.0.0) adds the support of logging queryId and sessionId to HiveServer2 log file. To enable that, edit/add %X{queryId} and %X{sessionId} to the pattern format string of the logging configuration file.
Cancelling the
...
Query
When users enter a user enters CTRL+C
on the BeeLine Beeline shell and , if there is a query which is running at the same time , BeeLine then Beeline attempts to cancel the query while closing the socket connection to Hiveserver2HiveServer2. This behavior is enabled only when hive.server2.close.session.on.disconnect
is set to true
. Starting from from Hive 2.2.0 (HIVE-15626) BeeLine Beeline does not exit the command line shell when the running query is being cancelled as a user enters {{CTRL+C
}}. If the user wishes to exit the shell they can enter CTRL+C
for the second time while the query is being cancelled. However, if there is no query currently running, the first CTRL+C
will exit the BeeLine Beeline shell. This behavior is similar to how HiveCLI the Hive CLI handles CTRL+C
.
!quit
is the recommended command to exit the BeeLine Beeline shell.
JDBC
HiveServer2 has a JDBC driver. It supports both embedded and remote access to HiveServer2. Remote HiveServer2 mode is recommended for production use, as it is more secure and doesn't require direct HDFS/metastore access to be granted for users.
...