You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Rene Boucheron <re...@googlemail.com> on 2011/11/10 14:06:05 UTC

AnalysisEngine processing timeouts

Hello,

Is there a timeout function to monitor AE-processing progress included in
UIMA somewhere?

I build some AnalysisEngines like this
UIMAFramework.produceAnalysisEngine()... Then I call
AnalysisEngine.process(cas).

Now, I would like this call to not take longer than some amount of time. If
it passes a threshold, just kill it.

The only idea I have is to dispatch the process() in a separate Thread and
periodically check if AnalysisEngineManagement.getNumberOfCASesProcessed
has increased. Not sure if threading just like this introduces some issues?

Opinions on this problem are very much appreciated.

Kind regards,
Rene

Re: AnalysisEngine processing timeouts

Posted by Eddie Epstein <ea...@gmail.com>.
The only way I know to do this would be to launch the AE as a UIMA-AS
service (as a separate process), call process via the UIMA-AS client
API with a timeout specified, and if a timeout fires then kill the
service.

I don't know of any way to kill a CPU bound java thread and still
leave the rest of the java process running.

Eddie

On Thu, Nov 10, 2011 at 8:06 AM, Rene Boucheron
<re...@googlemail.com> wrote:
> Hello,
>
> Is there a timeout function to monitor AE-processing progress included in
> UIMA somewhere?
>
> I build some AnalysisEngines like this
> UIMAFramework.produceAnalysisEngine()... Then I call
> AnalysisEngine.process(cas).
>
> Now, I would like this call to not take longer than some amount of time. If
> it passes a threshold, just kill it.
>
> The only idea I have is to dispatch the process() in a separate Thread and
> periodically check if AnalysisEngineManagement.getNumberOfCASesProcessed
> has increased. Not sure if threading just like this introduces some issues?
>
> Opinions on this problem are very much appreciated.
>
> Kind regards,
> Rene
>