Updated on 2022-12-08 GMT+08:00

Content Recorded in 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 the 192.168.1.18 IP address at 11:31:15 on January 29, 2016.

Generally, the audit log does not play a role in actual error location. However, 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 has no related information, the task suspends on the client. If the audit log has related information, view the run log to locate where the program suspends.
  2. The audit log can be used to check the number of requests in a specified period of time. You can view the number of requests in a specified period in audit logs.

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 SQL statement running fails, check the HiveServer run log first.

MetaStore Run Log

Typically, if the HiveServer run log contains 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.