Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Timeout for an EvalFunc UDF


Copy link to this message
-
Re: Timeout for an EvalFunc UDF
Hm, sorry about that. Throw a runtime exception?

On Jun 4, 2012, at 8:58 AM, Ahmed Sobhi <[EMAIL PROTECTED]> wrote:

> I have a further question regarding the MonitoredUDF
> I see that its default behavior is that it will make the udf return null
> and it will report the count of error
> To change the default behavior, one has to implement an error callback
> class. But this class handles timeouts and any error from the UDF. I would
> like to override that behavior somehow where I only want the callback to
> handle the timeout but not other errors; I want other errors to mke the job
> fail. And the thing is, I cannot rethrow the exception because it violates
> the method signature. Any ideas?
>
> On Fri, Jun 1, 2012 at 1:24 PM, Ahmed Sobhi <[EMAIL PROTECTED]> wrote:
>
>> Thnx Alan... it seems like what I exactly need... gonna give it a try :)
>>
>>
>> On Thu, May 31, 2012 at 7:12 PM, Alan Gates <[EMAIL PROTECTED]> wrote:
>>
>>> Take a look at MonitoredUDF, http://pig.apache.org/docs/r0.9.2/udf.htmlsearch on MonitoredUDF.
>>>
>>> Alan.
>>>
>>> On May 31, 2012, at 6:46 AM, Ahmed Sobhi wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to write an EvalFunc UDF... I know that in some rare cases my
>>>> data will cause my udf to take forever... for such cases, I want the
>>> udf to
>>>> just ignore these cases so I was thinking about having my logic timeout
>>>> somehow.
>>>>
>>>> Is there any easy way I can do this?
>>>>
>>>> I know that timeouts would require the use of threads so I'm not sure if
>>>> that would be ok or not. Can anyone provide more info on that?
>>>>
>>>> --
>>>> Best Regards,
>>>> Ahmed Sobhi
>>>> http://about.me/humanzz/bio
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Ahmed Sobhi
>> http://about.me/humanzz/bio
>>
>>
>
>
> --
> Best Regards,
> Ahmed Sobhi
> http://about.me/humanzz/bio
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB