zoukankan      html  css  js  c++  java
  • 1.8 Hive运行日志配置和查看

    一、配置文件

    1、重命名配置文件

    #
    把/opt/modules/hive-0.13.1/conf/hive-log4j.properties.template重命名为hive-log4j.properties
    
    #重新进入hive
    [root@hadoop-senior hive-0.13.1]# bin/hive
    Logging initialized using configuration in file:/opt/modules/hive-0.13.1/conf/hive-log4j.properties    #此时加载的配置文件就是重命名后的
    hive (default)>

    2、配置log目录

    #创建log目录
    [root@hadoop-senior hive-0.13.1]# pwd
    /opt/modules/hive-0.13.1
    
    [root@hadoop-senior hive-0.13.1]# mkdir logs
    
    
    #配置进文件
    hive.log.dir=/opt/modules/hive-0.13.1/logs    #找到此行,改为这样
    
    
    #此时重新进入一下hive,log文件就生成了
    [root@hadoop-senior logs]# ls
    hive.log

    2、命令行设置

    #进入hive的命令行其实也可以设置很多值;
    #直接打如下命令,就会显示很多当前设置的值;
    hive (default)> set;
    
    
    #bin/hive命令
    直接用bin/hive命令也可以设置值;
    [root@hadoop-senior hive-0.13.1]# bin/hive -h    #看帮助
    Missing argument for option: h
    usage: hive
     -d,--define <key=value>          Variable subsitution to apply to hive
                                      commands. e.g. -d A=B or --define A=B
        --database <databasename>     Specify the database to use
     -e <quoted-query-string>         SQL from command line
     -f <filename>                    SQL from files
     -H,--help                        Print help information
     -h <hostname>                    connecting to Hive Server on remote host
        --hiveconf <property=value>   Use value for given property
        --hivevar <key=value>         Variable subsitution to apply to hive
                                      commands. e.g. --hivevar A=B
     -i <filename>                    Initialization SQL file
     -p <port>                        connecting to Hive Server on port number
     -S,--silent                      Silent mode in interactive shell
     -v,--verbose                     Verbose mode (echo executed SQL to the
                                      console)
    
    
    #使用
    [root@hadoop-senior hive-0.13.1]# bin/hive --hiveconf hive.root.logger=INFO,console    #设置日志级别,console;让日志可以显示在命令行(详细的)
  • 相关阅读:
    幸存者偏差Survivorship Bias
    如何用一月6RMB搭建一个国外服务器
    因果性≠相关性
    三维组态可视化解决方案
    君子生非异也,善假于物也
    机器人制证系统大屏可视化
    C# WPF 嵌入网页版WebGL油田三维可视化监控
    OffscreenCanvas-离屏canvas使用说明
    去掉图片黑背景输出为透明背景
    高清屏下canvas重置尺寸引发的问题
  • 原文地址:https://www.cnblogs.com/weiyiming007/p/10735562.html
Copyright © 2011-2022 走看看