how to run hive in debug mode

后端 未结 3 511
一整个雨季
一整个雨季 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-05 23:51

    You better start hive shell by switching logger mode to DEBUG as follows, I hope you could find something useful from there.

    hive --hiveconf hive.root.logger=DEBUG,console
    
    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-02-06 00:18

    Hive code can be debugged.This link may help you : https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide#DeveloperGuide-DebuggingHiveCode

    0 讨论(0)
提交回复
热议问题