Runtime Parameters to Annotators Running as Services

2018-05-29 Thread Osborne, John D
What is the best practice for passing runtime meta-data about the analysis to 
individual annotators when running UIMA-AS or UIMA-DUCC services? An example 
would be  a database identifier for an analysis of many documents. I can't pass 
this in as parameters to the aggregate analysis engine running as a service, 
because I don't know what that identifier is until runtime (when the 
application calls the service).

I used to put such information in the JCas, having the CollectionReader 
implementation do all this work. But I am striving to have a more lightweight 
CollectionReader... The application can obviously write metadata to a database 
or other shared resource, but then it becomes incumbent on the AnalysisEngine 
to access that shared resources over the network (slow).

Any advice appreciated,

 -John


Re: UIMA AS deploy: get MessageTimeoutException object

2018-05-29 Thread Jaroslaw Cwiklik
Daniel, looks like UIMA-AS client receives just the
ResourceInitializationException
and MessageTimeoutException is not available. I will create JIRA for this
soon.
As a workaround you can try changing delegate's error handling thresholds:


  
  
  


  
 

specifically maxRetries and timeout ( may need to adjust client
getMetaTimeout as well).


On Mon, May 28, 2018 at 3:29 PM, Daniel Baumartz <
bauma...@stud.uni-frankfurt.de> wrote:

> Hi,
>
> I can see an MessageTimeoutException in the log when calling
> BaseUIMAAsynchronousEngine_impl.deploy():
>
>
> org.apache.uima.aae.error.MessageTimeoutException: Delegate
> Service:ServiceName Has Timed Out While Processing CAS:null
> at org.apache.uima.aae.delegate.Delegate$2.run(Delegate.java:827)
> at java.util.TimerThread.mainLoop(Timer.java:555)
> at java.util.TimerThread.run(Timer.java:505)
>
>
> The timeout is actually expected because the service is not running, but I
> can only catch an exception like this, without the details:
>
>
> org.apache.uima.resource.ResourceInitializationException
> at org.apache.uima.adapter.jms.activemq.SpringContainerDeployer
> .waitForServiceNotification(SpringContainerDeployer.java:530)
> at org.apache.uima.adapter.jms.activemq.SpringContainerDeployer
> .initializeContainer(SpringContainerDeployer.java:314)
> at org.apache.uima.adapter.jms.activemq.SpringContainerDeployer
> .deploy(SpringContainerDeployer.java:434)
> at org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngin
> e_impl.deploy(BaseUIMAAsynchronousEngine_impl.java:916)
> ...
> Caused by: org.apache.uima.resource.ResourceInitializationException
> at org.apache.uima.aae.controller.BaseAnalysisEngineController.
> stop(BaseAnalysisEngineController.java:2001)
> at org.apache.uima.aae.controller.BaseAnalysisEngineController.
> stop(BaseAnalysisEngineController.java:1898)
> at org.apache.uima.aae.controller.AggregateAnalysisEngineContro
> ller_impl.stop(AggregateAnalysisEngineController_impl.java:3272)
> at org.apache.uima.aae.controller.BaseAnalysisEngineController.
> terminate(BaseAnalysisEngineController.java:2184)
> at org.apache.uima.aae.controller.BaseAnalysisEngineController.
> terminate(BaseAnalysisEngineController.java:2150)
> at org.apache.uima.aae.error.handler.GetMetaErrorHandler.handle
> Error(GetMetaErrorHandler.java:104)
> at org.apache.uima.aae.error.ErrorHandlerChain.handle(ErrorHand
> lerChain.java:57)
> at org.apache.uima.aae.delegate.ControllerDelegate.handleError(
> ControllerDelegate.java:61)
> at org.apache.uima.aae.delegate.Delegate$2.run(Delegate.java:839)
> at java.util.TimerThread.mainLoop(Timer.java:555)
> at java.util.TimerThread.run(Timer.java:505)
>
>
> I tried to use the callback listeners, but they do not seem to get called,
> am I doing something wrong here? Or is there another way to get the
> MessageTimeoutException object during deploy?
>
> Thanks,
> Daniel
>