0
我从教程中创建了自己的UDTF函数,并将jar加载到配置单元中。现在我想创建自己的函数来调用UDTF。Hive:我如何构建UDTF?
statement.executeUpdate("ADD JAR /home/hfu/myjar.jar;");
statement.executeUpdate("CREATE TEMPORARY FUNCTION my_function AS 'com.effectivemeasure.hive.UDFT'");
我得到一个例外,当我运行最后CodeSnippet:
Exception in thread "main" java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:296)
at org.apache.hive.jdbc.HiveStatement.executeUpdate(HiveStatement.java:406)
at connectToHiveServer2.main(connectToHiveServer2.java:74)
我做了什么错?
下面是我使用的教程:
http://beekeeperdata.com/posts/hadoop/2015/07/26/Hive-UDTF-Tutorial.html和 http://www.ericlin.me/hive-user-defined-aggregation-function-udaf