hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Limotte <>
Subject Where is exception stacktrace and root cause for UDF
Date Wed, 20 Mar 2013 20:01:36 GMT

I'm trying to understand what happens to Exceptions that are thrown by
custom UDFs.  I have a UDF that throws a RuntimeException with useful
debugging information, but I don't see it in any logs.  I'm running my
commands using the hive cli (Hive 0.9.0).  Instead I see:

FAILED: Error in semantic analysis: Line 3:7 Wrong arguments '600':
> org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method
> … evaluate(...) on object ...
> Command exited with non-zero status 10

Despite the "semantic analysis" error, I know it's getting to the
evaluate(…) method because of other log messages.

Looking in org.apache.hadoop.hive.ql.exec.FunctionRegistry, I find the
invoke method, which contains:

 public static Object invoke(Method m, Object thisObject, Object...
      throws HiveException {
    Object o;
    try {
      o = m.invoke(thisObject, arguments);
    } catch (Exception e) {
      throw new HiveException("Unable to execute method " + m + " "
          + " on object " + thisObjectString + " with arguments "
          + argumentString.toString(), e);
    return o;

So it appears that my RuntimeException is wrapped in HiveException.  But
then it looks like only the Exception message is printed by the hive cli.
 Does the stack trace and root cause get printed in some log?  I didn't
find it anywhere.


View raw message