You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by nezih yigitbasi <ne...@gmail.com> on 2013/10/08 11:16:52 UTC

error handling in Python UDFs with Pig 0.11

Hi everyone,
When an exception is thrown in a Python UDF the execution just stops. What
I want is to continue processing even when exceptions are thrown from my
Python UDFs. The trivial solution is to catch the exceptions in the UDF
code, but what I want is a more elegant solution, something like the
@MonitoredUDF(errorCallback = MyErrorHandler.class) annotation that's
available with Java UDFs, where I can register a generic error handler. How
can I achieve something similar with Python UDFs?

Thanks,
Nezih