记录通过执行的配置单元查询。直线 [英] Logs for hive query executed via. beeline

查看:227
本文介绍了记录通过执行的配置单元查询。直线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在直线下面跑蜂巢。

  0:jdbc:hive2://< servername>是否可以告诉我在哪里可以看到Map reudce日志? :10003 />选择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其中a.offr_id = b.offr_id和b.disp_end_ts> '2016-09-13 00:00:00'; 


解决方案

使用beeline时,MapReduce日志是HiveServer2 log4j日志。



如果您的Hive安装是由Cloudera Manager(CM)配置的,那么它通常位于 / var / log / hive / hadoop-cmf-HIVE-1-HIVESERVER2 - * .out 在HiveServer2正在运行的节点上(可能与您运行的直线距离相同或不同)



其他情况很少:


  • 您的Hive安装为没有配置CM?您需要手动创建log4j配置文件:


    • 创建 hive- log4j.properties 配置文件在 HIVE_CONF_DIR 环境变量指定的目录中。 (这使得它可以被HiveServer2 JVM类路径访问)


      • 在这个文件中,日志位置由 log.dir log.file 。请参阅 conf / hive-log4j.properties.template 以获取此文件的示例模板。


    • 在嵌入式​​HS2模式中运行直线(即 beeline -u jdbc :hive2:// user password )?:




      • 您将自定义beeline log4j(与HiveServer2 log4j )。

      • 直线log4j属性文件严格地称为 beeline-log4j2.properties (在Hive 2.0之前的版本中,它被称为 beeline-log4j.properties )。需要通过 HIVE_CONF_DIR 创建并通过直线JVM类路径访问。请参阅HIVE-10502和HIVE-12020以进一步讨论此问题。


    • 您想自定义HiveServer2日志打印在直线标准输出上吗?




      • 可以在HiveServer2级别使用 hive.server2.logging.operation.enabled hive.server2.logging.operation configs。



    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';
    

    解决方案

    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:

      • Create hive-log4j.properties config file in directory specified by HIVE_CONF_DIR environment variable. (This makes it accessible to HiveServer2 JVM classpath)
        • In this file, log location is specified by log.dir and log.file. See conf/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) ?:

      • You will customize beeline log4j (as opposed to HiveServer2 log4j).
      • Beeline log4j properties file is strictly called beeline-log4j2.properties (in versions prior to Hive 2.0, it is called beeline-log4j.properties). Needs to be created and made accessible to beeline JVM classpath via HIVE_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 ?

      • This can be configured at HiveServer2 level using hive.server2.logging.operation.enabled and hive.server2.logging.operation configs.

    这篇关于记录通过执行的配置单元查询。直线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆