You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Richard Eckart de Castilho (JIRA)" <de...@uima.apache.org> on 2015/01/24 13:45:35 UTC

[jira] [Commented] (UIMA-4199) AnalysisEngineFactory doesn't pass AnalysisEngine.PARAM_NUM_SIMULTANEOUS_REQUESTS parameter correctly to UIMAFactory when creating a new engine

    [ https://issues.apache.org/jira/browse/UIMA-4199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14290577#comment-14290577 ] 

Richard Eckart de Castilho commented on UIMA-4199:
--------------------------------------------------

That is correct. The kind of parameters that uimaFIT passes on are *configuration parameters*. The *additional parameters* you mention are a completely different thing. It is very rare that *additional parameters* need to be set, for this reason, the uimaFIT createEngine calls do not support it. Anyway, I recommend sticking to createEngineDescription calls and leave the instantiation of the engines to SimplePipeline.runPipeline, the CPE engine, or whatever other pipeline execution engine you are using.

If you wish to pass along *additional parameters* as the one you mention, please use this code:

{noformat}
Map<String, Object> additionalParams = new HashMap<>();
additionalParams.put(AnalysisEngine.PARAM_NUM_SIMULTANEOUS_REQUESTS, num);
AnalysisEngineDescription aed = AnalysisEngineFactory.createEngineDescription(...);
UIMAFramework.produceAnalysisEngine(aed, ResourceManagerFactory.newResourceManager(), additionalParams); 
{noformat}


> AnalysisEngineFactory doesn't pass AnalysisEngine.PARAM_NUM_SIMULTANEOUS_REQUESTS parameter correctly to UIMAFactory when creating a new engine
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-4199
>                 URL: https://issues.apache.org/jira/browse/UIMA-4199
>             Project: UIMA
>          Issue Type: Bug
>          Components: uimaFIT
>    Affects Versions: 2.1.0uimaFIT
>            Reporter: Faisal Feroz
>            Priority: Blocker
>
> When {{org.apache.uima.fit.factory.AnalysisEngineFactory.createEngine(Class<? extends AnalysisComponent>, Object...)}} is called for creating a multi-threaded engine instance by passing in AnalysisEngine.PARAM_NUM_SIMULTANEOUS_REQUESTS and some integer value in configurationData. It creates AnalysisEngineDescription object from the data and calls {{org.apache.uima.fit.factory.AnalysisEngineFactory.createEngine(AnalysisEngineDescription, Object...)}} method which passes in null in {{aAdditionalParameters}} when calling {{UIMAFramework.produceAnalysisEngine}}. The respective method looks for {{AnalysisEngine.PARAM_NUM_SIMULTANEOUS_REQUESTS}} as per the following code:
> {code:java}
> boolean multiprocessing = (aAdditionalParams != null)
>             && aAdditionalParams.containsKey(AnalysisEngine.PARAM_NUM_SIMULTANEOUS_REQUESTS);
> {code}
> which is never found and the required {{MultiprocessingAnalysisEngine_impl}} is never created.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)