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
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
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.
Hive code can be debugged.This link may help you : https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide#DeveloperGuide-DebuggingHiveCode