Updated on 2023-11-30 GMT+08:00

Common Hive Logs

Audit log

An audit log records at what time a user sends a request to HiveServer and MetaStore from which IP address with what statement.

The following HiveServer audit log shows that at 14:51:22 on February 1, 2016, user_chen sent a show tables request to HiveServer from the 192.168.1.18 IP address.

The following MetaStore audit log shows that user hive sent a shutdown request to MetaStore from IP address 192.168.1.18 at 11:31:15 on January 29, 2016.

The audit log must be checked to solve the following problems:

  1. There is no response after a client sends a request. The audit log can be used to check whether the task suspends on the client or server. If the audit log does not contain related information, the task is terminated on the client. If the audit log contains related information, locate the fault according to the run log.
  2. The audit log can be used to check the number of requests in a specified period of time.

HiveServer Run Log

HiveServer receives requests from a client (SQL statement), compile and execute the statement (submitted to Yarn or local MapReduce), and interact with MetaStore to obtain metadata information. The HiveServer run log records a complete SQL execution process.

Generally, if a SQL statement fails to be executed, view the HiveServer run log first.

MetaStore Run Log

Typically, if the HiveServer run log contains a MetaException or MetaStore connection failure, check the MetaStore run log.

GC Log

Both HiveServer and MetaStore have GC logs. If GC-related problems occur, view the GC logs to quickly locate the cause. For example, if HiveServer or MetaStore frequently restarts, check its GC log.