Hive日志(Hive Logging)--hive GettingStarted翻译
Hive uses log4j for logging. By default logs are not emitted to the console by the CLI. The default logging level is WARN for Hive releases prior to 0.13.0. Starting with Hive 0.13.0, the default logging level is INFO.
Hive使用log4j记录日志,默认日志不输出到cli控制台。默认日志级别是warn在hive 0.13.0之前,从hive 0.13.0开始,默认日志输出级别为info。
The logs are stored in the directory /tmp/<user.name>:
日志默认存储在以下目录中:
· /tmp/<user.name>/hive.log
|
比如:/tmp/root/hive.log |
Note: In local mode, prior to Hive 0.13.0 the log file name was ".log" instead of "hive.log". This bug was fixed in release 0.13.0 (see HIVE-5528 and HIVE-5676).
这是一个Bug的说明。
To configure a different log location, set hive.log.dir in $HIVE_HOME/conf/hive-log4j.properties. Make sure the directory has the sticky bit set (chmod 1777 <dir>).
设置一个不同的hive日志位置,通过在$HIVE_HOME/conf/hive-log4j.properties文件中设置hive.log.dir参数。确定这个路径是一个粘滞位权限。
· hive.log.dir=<other_location>
If the user wishes, the logs can be emitted to the console by adding the arguments shown below:
如果你愿意,日志也可以通过如下命令显示在控制台中:
· bin/hive --hiveconf hive.root.logger=INFO,console //for HiveCLI (deprecated)
· bin/hiveserver2 --hiveconf hive.root.logger=INFO,console
Alternatively, the user can change the logging level only by using:
当然,也可以通过如下方式改变日志级别:
· bin/hive --hiveconf hive.root.logger=INFO,DRFA //for HiveCLI (deprecated)
· bin/hiveserver2 --hiveconf hive.root.logger=INFO,DRFA
Another option for logging is TimeBasedRollingPolicy (applicable for Hive 0.15.0 and above, HIVE-9001) by providing DAILY option as shown below:
· bin/hive --hiveconf hive.root.logger=INFO,DAILY //for HiveCLI (deprecated)
· bin/hiveserver2 --hiveconf hive.root.logger=INFO,DAILY
Note that setting hive.root.logger via the 'set' command does not change logging properties since they are determined at initialization time.
注意通过set命令设置hive.root.logger属性不能改变日志记录属性,因为它是在初始化时确定的。
Hive also stores query logs on a per Hive session basis in /tmp/<user.name>/, but can be configured in hive-site.xml with the hive.querylog.location property.
Hive也存储查询日志在每一个hive session记录在/tmp/<user.name>/,但是可以在hive-site.xml文件中配置属性ive.querylog.location。
Logging during Hive execution on a Hadoop cluster is controlled by Hadoop configuration. Usually Hadoop will produce one log file per map and reduce task stored on the cluster machine(s) where the task was executed. The log files can be obtained by clicking through to the Task Details page from the Hadoop JobTracker Web UI.
当hive在hadoop集群执行期间产生日志是由hadoop配置属性控制的。实际上hadoop会为每一个map或reduce任务产生一个日志文件并且存储在集群上任务执行的那个计算机上。这些日志信息在hadoop web UI界面通过点击任务详细信息看到。
When using local mode (using mapreduce.framework.name=local), Hadoop/Hive execution logs are produced on the client machine itself. Starting with release 0.6 – Hive uses the hive-exec-log4j.properties (falling back to hive-log4j.properties only if it's missing) to determine where these logs are delivered by default. The default configuration file produces one log file per query executed in local mode and stores it under /tmp/<user.name>. The intent of providing a separate configuration file is to enable administrators to centralize execution log capture if desired (on a NFS file server for example). Execution logs are invaluable for debugging run-time errors.
当运行在本地模式时(using mapreduce.framework.name=local),hadoop/hive运行日志产生在自己机器的客户端产生。从0.6版本开始,hive使用hive-exec-log4j.properties配置文件决定日志保存位置。默认的配置将产生一个log文件记录在本地模式运行的每一个执行动作,并且存储log在/tmp/<user.name>下。提供一个单独的配置文件的目的是如果管理员需要,可以集中捕获执行日志。执行日志对于提供运行时debug错误来说是非常重要的。
For information about WebHCat errors and logging, see Error Codes and Responses and Log Files in the WebHCat manual.
Error logs are very useful to debug problems. Please send them with any bugs (of which there are many!) to hive-dev@hadoop.apache.org.
From Hive 2.1.0 onwards (with HIVE-13027), Hive uses Log4j2's asynchronous logger by default. Setting hive.async.log.enabled to false will disable asynchronous logging and fallback to synchronous logging. Asynchronous logging can give significant performance improvement as logging will be handled in a separate thread that uses the LMAX disruptor queue for buffering log messages. Refer to https://logging.apache.org/log4j/2.x/manual/async.html for benefits and drawbacks.
从hive 2.1.0开始,hive使用log4j2方法实现异步日志方法。设置hive.async.log.enabled为false将会关闭异步日志功能并且回退到同步日志模式。使用异步日志功能可以极大改善性能,日志处理使用一个应用了LMAX disruptor queue的单独线程缓存消息队列。
HiveServer2 Logs
HiveServer2 operation logs are available to clients starting in Hive 0.14. See HiveServer2 Logging for configuration.
Hiveserver2操作日志从hive0.14开始提供给用户。
Audit Logs
Audit logs are logged from the Hive metastore server for every metastore API invocation.
审计日志记录hive元数据的访问和每一个api针对元数据的调用。
An audit log has the function and some of the relevant function arguments logged in the metastore log file. It is logged at the INFO level of log4j, so you need to make sure that the logging at the INFO level is enabled (see HIVE-3505). The name of the log entry is "HiveMetaStore.audit".
Audit logs were added in Hive 0.7 for secure client connections (HIVE-1948) and in Hive 0.10 for non-secure connections (HIVE-3277; also see HIVE-2797).
Perf Logger
In order to obtain the performance metrics via the PerfLogger, you need to set DEBUG level logging for the PerfLogger class (HIVE-12675). This can be achieved by setting the following in the log4j properties file.
log4j.logger.org.apache.hadoop.hive.ql.log.PerfLogger=DEBUG
If the logger level has already been set to DEBUG at root via hive.root.logger, the above setting is not required to see the performance logs.
Hive日志(Hive Logging)--hive GettingStarted翻译的更多相关文章
- Flume + HDFS + Hive日志收集系统
最近一段时间,负责公司的产品日志埋点与收集工作,搭建了基于Flume+HDFS+Hive日志搜集系统. 一.日志搜集系统架构: 简单画了一下日志搜集系统的架构图,可以看出,flume承担了agent与 ...
- Flume-NG + HDFS + HIVE 日志收集分析
国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私 ...
- hive日志位置(日志定位报错:Failed with exception Unable to move sourcehdfs://namenode/tmp/hive-pmp_bi/h)
Hive中的日志分为两种 1. 系统日志,记录了hive的运行情况,错误状况. 2. Job 日志,记录了Hive 中job的执行的历史过程. 日志查看方法 1,在本地运行机器上 hive日志存储位置 ...
- Hive初步使用、安装MySQL 、Hive配置MetaStore、配置Hive日志《二》
一.Hive的简单使用 基本的命令和MySQL的命令差不多 首先在 /opt/datas 下创建数据 students.txt 1001 zhangsan 1002 lisi 1003 wangwu ...
- Flume 概述+环境配置+监听Hive日志信息并写入到hdfs
Flume介绍Flume是Apache基金会组织的一个提供的高可用的,高可靠的,分布式的海量日志采集.聚合和传输的系统,Flume支持在日志系统中定制各类数据发送方,用于收集数据:同时,Flume提供 ...
- flume学习以及ganglia(若是要监控hive日志,hive存放在/tmp/hadoop/hive.log里,只要运行过hive就会有)
python3.6hdfs的使用 https://blog.csdn.net/qq_29863961/article/details/80291654 https://pypi.org/ 官网直接搜 ...
- hive 日志
hive中日志分为两种: 1 系统日志,记录hive运行情况,错误状态 2 job日志 , 记录hive中 job执行的历史过程 系统日志存储位置: 配置在 hive/conf/hive-log4j. ...
- Hive总结(五)hive日志
日志记录了程序执行的过程.是一种查找问题的利器. Hive中的日志分为两种 1. 系统日志,记录了hive的执行情况,错误状况. 2. Job 日志,记录了Hive 中job的运行的历史过程. 系统日 ...
- hive 日志配置/表头配置
1.日志配置,拷贝hive/conf下的hive-log4j2.properties.template为hive-log4j2.properties,修改日志目录,接下来在创建hive/logs,目录 ...
随机推荐
- phpmyadmin登录提示mysqli_real_connect(): (HY000/2002): No such file or directory和mysql8登录失败的问题
网上的解决方法有很多,但都无法解决我的问题,最后在stackoverflow上找到解决方法,原文地址:https://stackoverflow.com/questions/41881123/mysq ...
- 译:5.RabbitMQ Java Client 之 Topics (主题)
在 上篇博文 译:4.RabbitMQ 之Routing(路由) 中,我们改进了日志系统. 我们使用的是direct(直接交换),而不是使用只能进行虚拟广播的 fanout(扇出交换) ,并且有可能选 ...
- win8使用技巧
windows 8操作系统相信大家已经不再陌生了,虽然正式版本还未发布,但不少朋友已经在使用微软事先推出的windows 消费者预览版,直白的说就是公测版,预览版是免费的,但仅可以使用一年,但其功能与 ...
- N个降序数组,找到最大的K个数
问题定义 这个问题来自网上看到的百度算法题,感觉很不错,问题定义如下: 假定有20个有序数组,每个数组有500个数字,降序排列,数字类型32位uint数值,现在需要取出这10000个数字中最大的500 ...
- ffmpeg主体架构分析
[时间:2016-07] [状态:Open] [关键词:ffmpeg,libavcodec,libavformat] FFmpeg接触几年了,用的比较多的是libavcodec和libavformat ...
- FTP实验
一.安装 sudo apt-get install vsftpd service vsftpd start 启动vsftpd服务 如果在不设置任何的情况下,可以以匿名的方式访问该ftp. 这时候你可以 ...
- [转]MySql 5.7关键字和保留字-附表
原文地址:https://www.cnblogs.com/Z-Fanghan/p/6892944.html 现在使用navicat图形界面或者Hibernate做映射生成表的时候,渐渐的会忽视掉关键字 ...
- 【iCore4 双核心板_ARM】例程一:ARM驱动三色LED
实验原理: 通过STM32的三个GPIO驱动一个三色LED,引脚PB2接红色LED(ARM_LEDR), 引脚PA9接蓝色LED(ARM_LEDB),引脚PA10接绿色LED(ARM_LEDG), ...
- 【iCore1S 双核心板_FPGA】例程九:锁相环实验——锁相环的使用
实验现象: 利用Quartus内部组件生成锁相环,用SignalTap II进行校验. 核心代码: //--------------------Module_PLL------------------ ...
- Linux初始化init系统-Sysvinit、Upstart、Systemd
首先了解以下Ubuntu运行级别(init)对应工具的变化历史: 1.Ubuntu 6.10及以前版本使用Sysvinit. 2.Ubuntu 14.10及以前版本使用Upstart但是还留着Sysv ...