Chinaunix首页 | 论坛 | 博客
  • 博客访问: 216361
  • 博文数量: 39
  • 博客积分: 945
  • 博客等级: 准尉
  • 技术积分: 532
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-04 17:25
文章分类

全部博文(39)

文章存档

2012年(39)

我的朋友

分类: 服务器与存储

2012-05-14 11:41:33


 安装hive-0.8.1以后。运行hive的时候经常会出现这样的日志警告

点击(此处)折叠或打开

  1. hadoop@hadoop-master:~/hadoop-1.0.1/conf$ hive
  2. WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
  3. Logging initialized using configuration in jar:file:/home/hadoop/hadoop-1.0.1/contrib/hive/lib/hive-common-0.8.1.jar!/hive-log4j.properties
  4. Hive history file=/tmp/hadoop/hive_job_log_hadoop_201205141112_539544268.txt
  5. hive>

解决方法很简单。操作如下:

点击(此处)折叠或打开

  1. hadoop@hadoop-master:~/hadoop-1.0.1/contrib/hive/conf$ cp hive-exec-log4j.properties.template hive-exec-log4j.properties
  2. hadoop@hadoop-master:~/hadoop-1.0.1/contrib/hive/conf$ sed -i '/log4j\.appender\.EventCounter/ s/org\.apache\.hadoop\.metrics\.jvm\.EventCounter/org\.apache\.hadoop.log\.metrics\.EventCounter/g' hive-exec-log4j.properties
  3. #修改log4j.appender.EventCounter=org.apache.hadoop.metrics.jvm.EventCounter 为
  4. log4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter
然后运行下hive

点击(此处)折叠或打开

  1. hadoop@hadoop-master:~/hadoop-1.0.1/contrib/hive/conf$ hive
  2. Logging initialized using configuration in file:/home/hadoop/hadoop-1.0.1/contrib/hive/conf/hive-log4j.properties
  3. Hive history file=/tmp/hadoop/hive_job_log_hadoop_201205141150_1475610732.txt
  4. hive>
关于日志的警告消失了。


阅读(3643) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~