You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by James Newhaven <ja...@gmail.com> on 2013/04/13 18:24:17 UTC

Debugging UDFs

I have defined a pig UDF want to track problems using warnings like this:

warn("My warning", PigWarning.UDF_WARNING_1);

I'm testing this in local mode first, but I never see this warning anywhere.

Any help/ideas would be appreciated.


Thanks,

James

Re: Debugging UDFs

Posted by Ruslan Al-Fakikh <me...@gmail.com>.
James,

Try to execute in mapreduce mode at least on a pseudo-distributed cluster
and try to find them in specific tasks logs. Also you can try to throw an
exception, just to make sure your code is actually getting there, something
like
if (true) throw new RuntimeException("My warning");

Best Regards


On Sat, Apr 13, 2013 at 8:24 PM, James Newhaven <ja...@gmail.com>wrote:

> I have defined a pig UDF want to track problems using warnings like this:
>
> warn("My warning", PigWarning.UDF_WARNING_1);
>
> I'm testing this in local mode first, but I never see this warning
> anywhere.
>
> Any help/ideas would be appreciated.
>
>
> Thanks,
>
> James
>