FAQ
Author: jvs
Date: Tue Oct 4 19:10:10 2011
New Revision: 1178911

URL: http://svn.apache.org/viewvc?rev=1178911&view=rev
Log:
HIVE-619. Improve the error messages for missing/incorrect UDF/UDAF class
(Marek Sapota via jvs)


Added:
hive/trunk/ql/src/test/queries/clientnegative/udf_function_does_not_implement_udf.q
hive/trunk/ql/src/test/results/clientnegative/udf_function_does_not_implement_udf.q.out
Modified:
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java
hive/trunk/ql/src/test/results/clientnegative/create_unknown_genericudf.q.out
hive/trunk/ql/src/test/results/clientnegative/create_unknown_udf_udaf.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java?rev=1178911&r1=1178910&r2=1178911&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java Tue Oct 4 19:10:10 2011
@@ -95,9 +95,12 @@ public class FunctionTask extends Task<F
.newInstance(udfClass, null));
return 0;
}
+ console.printError("FAILED: Class " + createFunctionDesc.getClassName()
+ + " does not implement UDF, GenericUDF, or UDAF");
return 1;

} catch (ClassNotFoundException e) {
+ console.printError("FAILED: Class " + createFunctionDesc.getClassName() + " not found");
LOG.info("create function: " + StringUtils.stringifyException(e));
return 1;
}

Added: hive/trunk/ql/src/test/queries/clientnegative/udf_function_does_not_implement_udf.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/udf_function_does_not_implement_udf.q?rev=1178911&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/udf_function_does_not_implement_udf.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/udf_function_does_not_implement_udf.q Tue Oct 4 19:10:10 2011
@@ -0,0 +1 @@
+CREATE TEMPORARY FUNCTION moo AS 'org.apache.hadoop.hive.ql.Driver';

Modified: hive/trunk/ql/src/test/results/clientnegative/create_unknown_genericudf.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_unknown_genericudf.q.out?rev=1178911&r1=1178910&r2=1178911&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_unknown_genericudf.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_unknown_genericudf.q.out Tue Oct 4 19:10:10 2011
@@ -1,3 +1,4 @@
PREHOOK: query: CREATE TEMPORARY FUNCTION dummy_genericudf AS 'org.apache.hadoop.hive.ql.udf.generic.DummyGenericUDF'
PREHOOK: type: CREATEFUNCTION
+FAILED: Class org.apache.hadoop.hive.ql.udf.generic.DummyGenericUDF not found
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask

Modified: hive/trunk/ql/src/test/results/clientnegative/create_unknown_udf_udaf.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_unknown_udf_udaf.q.out?rev=1178911&r1=1178910&r2=1178911&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_unknown_udf_udaf.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_unknown_udf_udaf.q.out Tue Oct 4 19:10:10 2011
@@ -1,3 +1,4 @@
PREHOOK: query: CREATE TEMPORARY FUNCTION dummy_function AS 'org.apache.hadoop.hive.ql.udf.DummyFunction'
PREHOOK: type: CREATEFUNCTION
+FAILED: Class org.apache.hadoop.hive.ql.udf.DummyFunction not found
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask

Added: hive/trunk/ql/src/test/results/clientnegative/udf_function_does_not_implement_udf.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/udf_function_does_not_implement_udf.q.out?rev=1178911&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/udf_function_does_not_implement_udf.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/udf_function_does_not_implement_udf.q.out Tue Oct 4 19:10:10 2011
@@ -0,0 +1,4 @@
+PREHOOK: query: CREATE TEMPORARY FUNCTION moo AS 'org.apache.hadoop.hive.ql.Driver'
+PREHOOK: type: CREATEFUNCTION
+FAILED: Class org.apache.hadoop.hive.ql.Driver does not implement UDF, GenericUDF, or UDAF
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedOct 4, '11 at 7:10p
activeOct 4, '11 at 7:10p
posts1
users1
websitehive.apache.org

1 user in discussion

Jvs: 1 post

People

Translate

site design / logo © 2021 Grokbase