Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 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 CTRL+C on the BeeLine shell and if there is a query which is running at the same time, BeeLine attempts to cancel the query while closing the socket connection to Hiveserver2. 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 does not exit the command line shell when the running query is being cancelled as 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 shell. This behavior is similar to how HiveCLI handles CTRL+C!quit is the recommended command to exit the 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.

...