Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive, mail # user - Where is exception stacktrace and root cause for UDF


+
Marc Limotte 2013-03-20, 20:01
+
Harsh J 2013-03-20, 23:06
Copy link to this message
-
Re: Where is exception stacktrace and root cause for UDF
FangKun Cao 2013-03-21, 08:16
Hi  you can find the Exception log at map or reduce task logs .
http://your_task_tracker:50060/tasklog?taskid=attempt_20130*********_*********_r_000000_0&all=true
2013/3/21 Harsh J <[EMAIL PROTECTED]>

> They should be viewable if you enable the DEBUG mode.
>
> hive -hiveconf hive.root.logger=DEBUG,console
>
> On Thu, Mar 21, 2013 at 1:31 AM, Marc Limotte <[EMAIL PROTECTED]> wrote:
> > Hi.
> >
> > 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...
> > arguments)
> >       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.
> >
> >
> > Marc
> >
>
>
>
> --
> Harsh J
>

--
Best wishs!
Fangkun.Cao