i am running below hive coomand from beeline . Can someone please tell where can I see Map reudce logs for this ?
0: jdbc:hive2://<servername>:10003/> select a.offr_id offerID , a.offr_nm offerNm , b.disp_strt_ts dispStartDt , b.disp_end_ts dispEndDt , vld_strt_ts validStartDt, vld_end_ts validEndDt from gcor_offr a, gcor_offr_dur b where a.offr_id = b.offr_id and b.disp_end_ts > '2016-09-13 00:00:00';
Hive uses log4j for logging. These logs are not emitted to the standard output by default but are instead captured to a log file specified by Hive's log4j properties file. By default, Hive will use hive-log4j.default in the
conf/ directory
of the Hive installation which writes out logs to/tmp/<userid>/hive.log
and uses the WARN level.It is often desirable to emit the logs to the standard output and/or change the logging level for debugging purposes. These can be done from the command line as follows:
When using beeline, MapReduce logs are part of HiveServer2 log4j logs.
If your Hive install was configured by Cloudera Manager (CM), then it will typically be in
/var/log/hive/hadoop-cmf-HIVE-1-HIVESERVER2-*.out
on the node where HiveServer2 is running (may or may not be the same as where you are running beeline from)Few other scenarios:
Your Hive install was not configured by CM ? You will need to manually create log4j config file:
hive-log4j.properties
config file in directory specified byHIVE_CONF_DIR
environment variable. (This makes it accessible to HiveServer2 JVM classpath)log.dir
andlog.file
. Seeconf/hive-log4j.properties.template
in your distribution for an example template for this file.You run beeline in "embedded HS2 mode" (i.e.
beeline -u jdbc:hive2:// user password
) ?:beeline-log4j2.properties
(in versions prior to Hive 2.0, it is calledbeeline-log4j.properties
). Needs to be created and made accessible to beeline JVM classpath viaHIVE_CONF_DIR
. See HIVE-10502 and HIVE-12020 for further discussion on this.You want to customize what HiveServer2 logs get printed on beeline stdout ?
hive.server2.logging.operation.enabled
andhive.server2.logging.operation
configs.