在Hive中使用UDF调试信息

pri*_*stc 3 java hive

我正在努力让GeoIP与蜂巢一起工作.我发现了这个:http://www.jointhegrid.com/hive-udf-geo-ip-jtg/index.jsp,这似乎正是我想要的.

我建了罐子(我没有java经验,所以我只希望我做了这个部分),将它们添加到我的查询中并得到:

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
Run Code Online (Sandbox Code Playgroud)

有没有办法找出到底出了什么问题?return code 1并没有告诉我多少......某处有日志文件吗?

yhu*_*uai 7

如果你想查看hive的日志,你可以使用$HIVE_HOME/bin/hive -hiveconf hive.root.logger=INFO,console.您还可以更改级别(DEBUG,INFO,WARN,ERROR或FATAL)以查看是否可以获得足够的信息.