how to run hive in debug mode

后端 未结 3 512
一整个雨季
一整个雨季 2021-02-05 23:28

i took example from cloudera website to write a custom SerDe for parsing a file

http://blog.cloudera.com/blog/2012/12/how-to-use-a-serde-in-apache-hive/

it seems

3条回答
  •  失恋的感觉
    2021-02-06 00:11

    Setting hive --hiveconf hive.root.logger=DEBUG,console may not always work because of company specific setup.

    I ended up creating a hive-log4j.properties file in my home directory with following settings:

    log4j.rootCategory=DEBUG,console
    log4j.appender.console=org.apache.log4j.ConsoleAppender
    log4j.appender.console.target=System.err
    log4j.appender.console.layout=org.apache.log4j.PatternLayout
    log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n
    

    and started hive shell using CLASSPATH=$HOME hive which adds your home directory having hive-log4j.properties in front of the classpath and so is picked up.

提交回复
热议问题