Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug information with UDF's in Hive

Tags:

java

hive

I'm trying to get GeoIP working with hive. I found this: http://www.jointhegrid.com/hive-udf-geo-ip-jtg/index.jsp, which seems to be exactly what I want.

I built the jars (I have no java experience, so I only hope I did this part right), added them to my query and get this:

hive> ADD jar hive-udf-geo-ip-jtg.jar;
Added hive-udf-geo-ip-jtg.jar to class path
Added resource: hive-udf-geo-ip-jtg.jar
hive> ADD jar geo-ip-java.jar;
Added geo-ip-java.jar to class path
Added resource: geo-ip-java.jar
hive> ADD file GeoIPCity.dat;
Added resource: GeoIPCity.dat
hive> create temporary function geoip as 'com.jointhegrid.hive.udf.GenericUDFGeoIP';
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask

Is there a way to find out what exactly is going wrong? return code 1 doesn't tell me much... Is there a log file somewhere?

like image 378
priestc Avatar asked Dec 02 '25 13:12

priestc


1 Answers

if you want to see the log of hive, you can use $HIVE_HOME/bin/hive -hiveconf hive.root.logger=INFO,console. You can also change levels (DEBUG, INFO, WARN, ERROR or FATAL) to see if you can get enough information.

like image 200
yhuai Avatar answered Dec 04 '25 03:12

yhuai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!