You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ea...@apache.org on 2008/05/29 21:41:59 UTC
svn commit: r661446 [2/4] - in
/incubator/uima/sandbox/branches/uima-as-post1st:
uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/
uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/
uimaj-as-activemq/src/test/java/o...
Added: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/deployment/Deploy_RemoteCasMultiplierWith10Docs_2.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/deployment/Deploy_RemoteCasMultiplierWith10Docs_2.xml?rev=661446&view=auto
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/deployment/Deploy_RemoteCasMultiplierWith10Docs_2.xml (added)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/deployment/Deploy_RemoteCasMultiplierWith10Docs_2.xml Thu May 29 12:41:58 2008
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+
+<analysisEngineDeploymentDescription
+ xmlns="http://uima.apache.org/resourceSpecifier">
+
+ <name>Simple Cas Multiplier #2</name>
+ <description>Deploys the Second Simple Cas Multiplier</description>
+
+ <deployment protocol="jms" provider="activemq">
+ <casPool numberOfCASes="5"/>
+ <service>
+ <inputQueue endpoint="TestMultiplierQueue2" brokerURL="tcp://localhost:8118" prefetch="0"/>
+ <topDescriptor>
+ <import location="../descriptors/multiplier/SimpleCasGeneratorProducing10Cases.xml"/>
+ </topDescriptor>
+ <analysisEngine>
+ <casMultiplier poolSize="5"/>
+ </analysisEngine>
+
+
+ </service>
+ </deployment>
+
+</analysisEngineDeploymentDescription>
+
Added: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/deployment/Deploy_TopLevelBlueJAggregateCM.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/deployment/Deploy_TopLevelBlueJAggregateCM.xml?rev=661446&view=auto
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/deployment/Deploy_TopLevelBlueJAggregateCM.xml (added)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/deployment/Deploy_TopLevelBlueJAggregateCM.xml Thu May 29 12:41:58 2008
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+<analysisEngineDeploymentDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <name>Top Level TAE</name>
+ <description/>
+ <version/>
+ <vendor/>
+ <deployment protocol="jms" provider="activemq">
+ <casPool numberOfCASes="5" initialFsHeapSize="2000000"/>
+ <service>
+ <inputQueue endpoint="TopLevelTaeQueue" brokerURL="tcp://localhost:8118" prefetch="1"/>
+ <topDescriptor>
+ <import location="../descriptors/analysis_engine/CasMultiplierAggregateWith2Multipliers.xml"/>
+ </topDescriptor>
+ <analysisEngine async="true">
+ <casMultiplier poolSize="5" initialFsHeapSize="2000000"/>
+ <scaleout numberOfInstances="1"/>
+ <delegates>
+
+ <analysisEngine key="BlueJTestMultiplier1" async="false">
+ <scaleout numberOfInstances="1"/>
+ <casMultiplier poolSize="5" initialFsHeapSize="2000000"/>
+ <asyncAggregateErrorConfiguration>
+ <getMetadataErrors maxRetries="0" timeout="0" errorAction="terminate"/>
+ <processCasErrors maxRetries="0" timeout="0" continueOnRetryFailure="false" thresholdCount="0" thresholdWindow="0" thresholdAction="terminate"/>
+ <collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
+ </asyncAggregateErrorConfiguration>
+ </analysisEngine>
+
+ <analysisEngine key="BlueJTestMultiplier2" async="false">
+ <scaleout numberOfInstances="1"/>
+ <casMultiplier poolSize="3" initialFsHeapSize="2000000"/>
+ <asyncAggregateErrorConfiguration>
+ <getMetadataErrors maxRetries="0" timeout="0" errorAction="terminate"/>
+ <processCasErrors maxRetries="0" timeout="0" continueOnRetryFailure="false" thresholdCount="0" thresholdWindow="0" thresholdAction="terminate"/>
+ <collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
+ </asyncAggregateErrorConfiguration>
+ </analysisEngine>
+
+ <remoteAnalysisEngine key="BlueJInnerRemoteCMAggregate">
+ <casMultiplier poolSize="5" initialFsHeapSize="2000000"/>
+ <inputQueue brokerURL="tcp://localhost:8118" endpoint="InnerAggregateQueue"/>
+ <replyQueue location="remote"/>
+ <serializer method="xmi"/>
+ <asyncAggregateErrorConfiguration>
+ <getMetadataErrors maxRetries="0" timeout="0" errorAction="disable"/>
+ <processCasErrors maxRetries="0" timeout="0" continueOnRetryFailure="false" thresholdCount="1" thresholdWindow="0" thresholdAction="terminate"/>
+ <collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
+ </asyncAggregateErrorConfiguration>
+ </remoteAnalysisEngine>
+
+ <analysisEngine key="BlueJNoOpCandidateAnswer" async="false">
+ <asyncAggregateErrorConfiguration>
+ <getMetadataErrors maxRetries="0" timeout="0" errorAction="disable"/>
+ <processCasErrors maxRetries="0" timeout="0" continueOnRetryFailure="false" thresholdCount="1" thresholdWindow="0" thresholdAction="terminate"/>
+ <collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
+ </asyncAggregateErrorConfiguration>
+ </analysisEngine>
+
+ <analysisEngine key="BlueJNoOpCC" async="false">
+ <asyncAggregateErrorConfiguration>
+ <getMetadataErrors maxRetries="0" timeout="0" errorAction="terminate"/>
+ <processCasErrors maxRetries="0" timeout="0" continueOnRetryFailure="false" thresholdCount="0" thresholdWindow="0" thresholdAction="terminate"/>
+ <collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
+ </asyncAggregateErrorConfiguration>
+ </analysisEngine>
+
+ </delegates>
+
+ <asyncPrimitiveErrorConfiguration>
+ <processCasErrors thresholdCount="0" thresholdWindow="0" thresholdAction="terminate"/>
+ <collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
+ </asyncPrimitiveErrorConfiguration>
+ </analysisEngine>
+ </service>
+ </deployment>
+</analysisEngineDeploymentDescription>
Added: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/BlueJNoOpCC.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/BlueJNoOpCC.xml?rev=661446&view=auto
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/BlueJNoOpCC.xml (added)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/BlueJNoOpCC.xml Thu May 29 12:41:58 2008
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>true</primitive>
+ <annotatorImplementationName>org.apache.uima.ae.noop.NoOpAnnotator</annotatorImplementationName>
+ <analysisEngineMetaData>
+ <name>BlueJ NoOp CC</name>
+ <description>Annotator That Does Nothin</description>
+ <version>1.0</version>
+ <vendor>The Apache Software Foundation</vendor>
+
+ <configurationParameters>
+ <configurationParameter>
+ <name>ErrorFrequency</name>
+ <description>Frequency of Generated Errors</description>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>ProcessDelay</name>
+ <description>Process Delay</description>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+
+
+ </configurationParameters>
+
+ <configurationParameterSettings>
+ <nameValuePair>
+ <name>ErrorFrequency</name>
+ <value>
+ <integer>0</integer>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>ProcessDelay</name>
+ <value>
+ <integer>0</integer>
+ </value>
+ </nameValuePair>
+
+ </configurationParameterSettings>
+
+
+
+ <typeSystemDescription>
+ </typeSystemDescription>
+
+ <capabilities>
+ </capabilities>
+
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+</analysisEngineDescription>
Added: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/BlueJNoOpCandidateAnswer.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/BlueJNoOpCandidateAnswer.xml?rev=661446&view=auto
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/BlueJNoOpCandidateAnswer.xml (added)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/BlueJNoOpCandidateAnswer.xml Thu May 29 12:41:58 2008
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>true</primitive>
+ <annotatorImplementationName>org.apache.uima.ae.noop.NoOpAnnotator</annotatorImplementationName>
+ <analysisEngineMetaData>
+ <name>BlueJ NoOp Candidate Answer</name>
+ <description>Annotator That Does Nothin</description>
+ <version>1.0</version>
+ <vendor>The Apache Software Foundation</vendor>
+
+ <configurationParameters>
+ <configurationParameter>
+ <name>ErrorFrequency</name>
+ <description>Frequency of Generated Errors</description>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>ProcessDelay</name>
+ <description>Process Delay</description>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+
+
+ </configurationParameters>
+
+ <configurationParameterSettings>
+ <nameValuePair>
+ <name>ErrorFrequency</name>
+ <value>
+ <integer>0</integer>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>ProcessDelay</name>
+ <value>
+ <integer>0</integer>
+ </value>
+ </nameValuePair>
+
+ </configurationParameterSettings>
+
+
+
+ <typeSystemDescription>
+ </typeSystemDescription>
+
+ <capabilities>
+ </capabilities>
+
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+</analysisEngineDescription>
Added: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/CasMultiplierAggregateWith2Multipliers.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/CasMultiplierAggregateWith2Multipliers.xml?rev=661446&view=auto
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/CasMultiplierAggregateWith2Multipliers.xml (added)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/CasMultiplierAggregateWith2Multipliers.xml Thu May 29 12:41:58 2008
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+
+ <delegateAnalysisEngine key="BlueJTestMultiplier1">
+ <import location="../multiplier/SimpleCasGenerator.xml"/>
+ </delegateAnalysisEngine>
+
+ <delegateAnalysisEngine key="BlueJTestMultiplier2">
+ <import location="../multiplier/SimpleCasGenerator.xml"/>
+ </delegateAnalysisEngine>
+
+
+ <delegateAnalysisEngine key="BlueJInnerRemoteCMAggregate">
+ <import location="SimpleTestCMAggregateWithCollocatedCM.xml"/>
+ </delegateAnalysisEngine>
+
+
+ <delegateAnalysisEngine key="BlueJNoOpCandidateAnswer">
+ <import location="BlueJNoOpCandidateAnswer.xml"/>
+ </delegateAnalysisEngine>
+
+ <delegateAnalysisEngine key="BlueJNoOpCC">
+ <import location="BlueJNoOpCC.xml"/>
+ </delegateAnalysisEngine>
+
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>Test Aggregate TAE</name>
+ <description>Detects Nothing</description>
+ <configurationParameters searchStrategy="language_fallback">
+ <configurationParameter>
+ <name>NumberToGenerate</name>
+ <description>Approximate number of CASes to create.</description>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ <overrides>
+ <parameter>BlueJTestMultiplier1/NumberToGenerate</parameter>
+ <parameter>BlueJTestMultiplier2/NumberToGenerate</parameter>
+ </overrides>
+ </configurationParameter>
+ </configurationParameters>
+ <configurationParameterSettings>
+ <nameValuePair>
+ <name>NumberToGenerate</name>
+ <value>
+ <integer>3</integer>
+ </value>
+ </nameValuePair>
+ </configurationParameterSettings>
+
+ <flowConstraints>
+ <fixedFlow>
+ <node>BlueJTestMultiplier1</node>
+ <node>BlueJTestMultiplier2</node>
+ <node>BlueJInnerRemoteCMAggregate</node>
+ <node>BlueJNoOpCandidateAnswer</node>
+ <node>BlueJNoOpCC</node>
+ </fixedFlow>
+ </flowConstraints>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported>
+ <language>en</language>
+ </languagesSupported>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>true</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+</analysisEngineDescription>
Added: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateCasMultiplier.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateCasMultiplier.xml?rev=661446&view=auto
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateCasMultiplier.xml (added)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateCasMultiplier.xml Thu May 29 12:41:58 2008
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+
+ <delegateAnalysisEngine key="TestMultiplier">
+ <import location="../multiplier/SimpleCasGenerator.xml"/>
+ </delegateAnalysisEngine>
+
+
+ <delegateAnalysisEngine key="NoOp">
+ <import location="NoOpAnnotator.xml"/>
+ </delegateAnalysisEngine>
+
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>Test Aggregate TAE</name>
+ <description>Detects Nothing</description>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+
+ <node>TestMultiplier</node>
+ <node>NoOp</node>
+ </fixedFlow>
+ </flowConstraints>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs>
+ </outputs>
+ <languagesSupported>
+ <language>en</language>
+ </languagesSupported>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>true</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+</analysisEngineDescription>
Added: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWith2RemoteMultipliers.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWith2RemoteMultipliers.xml?rev=661446&view=auto
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWith2RemoteMultipliers.xml (added)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWith2RemoteMultipliers.xml Thu May 29 12:41:58 2008
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="NoOpAnnotator2">
+ <import location="NoOpAnnotator2.xml"/>
+ </delegateAnalysisEngine>
+ <delegateAnalysisEngine key="TestMultiplier">
+ <import location="../multiplier/SimpleCasGenerator.xml"/>
+ </delegateAnalysisEngine>
+ <delegateAnalysisEngine key="NoOp">
+ <import location="NoOpAnnotator.xml"/>
+ </delegateAnalysisEngine>
+ <delegateAnalysisEngine key="SimpleCasGenerator">
+ <import location="../multiplier/SimpleCasGenerator.xml"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>Test Aggregate TAE</name>
+ <description>Detects Nothing</description>
+ <configurationParameters searchStrategy="language_fallback">
+ <configurationParameter>
+ <name>NumberToGenerate</name>
+ <description>Approximate number of CASes to create.</description>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ <overrides>
+ <parameter>TestMultiplier/NumberToGenerate</parameter>
+ <parameter>SimpleCasGenerator/NumberToGenerate</parameter>
+ </overrides>
+ </configurationParameter>
+ </configurationParameters>
+ <configurationParameterSettings>
+ <nameValuePair>
+ <name>NumberToGenerate</name>
+ <value>
+ <integer>10</integer>
+ </value>
+ </nameValuePair>
+ </configurationParameterSettings>
+ <flowConstraints>
+ <fixedFlow>
+ <node>TestMultiplier</node>
+ <node>SimpleCasGenerator</node>
+ <node>NoOp</node>
+ <node>NoOpAnnotator2</node>
+ </fixedFlow>
+ </flowConstraints>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported>
+ <language>en</language>
+ </languagesSupported>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+</analysisEngineDescription>
Added: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestCMAggregateWithCollocatedCM.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestCMAggregateWithCollocatedCM.xml?rev=661446&view=auto
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestCMAggregateWithCollocatedCM.xml (added)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestCMAggregateWithCollocatedCM.xml Thu May 29 12:41:58 2008
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+
+ <delegateAnalysisEngine key="InnerTestMultiplier">
+<!-- <import location="../multiplier/SimpleCasGeneratorProducing10Cases.xml"/> -->
+ <import location="../multiplier/SimpleCasGenerator.xml"/>
+ </delegateAnalysisEngine>
+
+ <delegateAnalysisEngine key="RemoteNoOp">
+ <import location="NoOpAnnotator.xml"/>
+ </delegateAnalysisEngine>
+
+ <delegateAnalysisEngine key="NoOpCC">
+ <import location="NoOpAnnotator.xml"/>
+ </delegateAnalysisEngine>
+
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>Nested Aggregate TAE</name>
+ <description>Detects Nothing</description>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>InnerTestMultiplier</node>
+ <node>RemoteNoOp</node>
+ <node>NoOpCC</node>
+ </fixedFlow>
+ </flowConstraints>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs>
+ </outputs>
+ <languagesSupported>
+ <language>en</language>
+ </languagesSupported>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>true</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+</analysisEngineDescription>
Added: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestCasMultiplierAggregateWithRemoteMultiplier.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestCasMultiplierAggregateWithRemoteMultiplier.xml?rev=661446&view=auto
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestCasMultiplierAggregateWithRemoteMultiplier.xml (added)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestCasMultiplierAggregateWithRemoteMultiplier.xml Thu May 29 12:41:58 2008
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="NoOpAnnotator2">
+ <import location="NoOpAnnotator2.xml"/>
+ </delegateAnalysisEngine>
+ <delegateAnalysisEngine key="SimpleCasGenerator">
+ <import location="../multiplier/SimpleCasGenerator.xml"/>
+ </delegateAnalysisEngine>
+ <delegateAnalysisEngine key="NoOp">
+ <import location="NoOpAnnotator.xml"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>Test Aggregate TAE</name>
+ <description>Detects Nothing</description>
+ <configurationParameters searchStrategy="language_fallback">
+ <configurationParameter>
+ <name>NumberToGenerate</name>
+ <description>Approximate number of CASes to create.</description>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ <overrides>
+ <parameter>SimpleCasGenerator/NumberToGenerate</parameter>
+ </overrides>
+ </configurationParameter>
+ </configurationParameters>
+ <configurationParameterSettings>
+ <nameValuePair>
+ <name>NumberToGenerate</name>
+ <value>
+ <integer>10</integer>
+ </value>
+ </nameValuePair>
+ </configurationParameterSettings>
+ <flowConstraints>
+ <fixedFlow>
+ <node>SimpleCasGenerator</node>
+ <node>NoOp</node>
+ <node>NoOpAnnotator2</node>
+ </fixedFlow>
+ </flowConstraints>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported>
+ <language>en</language>
+ </languagesSupported>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>true</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+</analysisEngineDescription>
Modified: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/AsynchAECasManager_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/AsynchAECasManager_impl.java?rev=661446&r1=661445&r2=661446&view=diff
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/AsynchAECasManager_impl.java (original)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/AsynchAECasManager_impl.java Thu May 29 12:41:58 2008
@@ -96,7 +96,7 @@
contextName = aContextName;
setInitialized(true);
if (aPerformanceTuningSettings != null) {
- System.out.println("CasManager Iniatialized Cas Pool:" + aContextName + ". Cas Pool Size:"
+ System.out.println("CasManager Initialized Cas Pool:" + aContextName + ". Cas Pool Size:"
+ aCasPoolSize + " Initial Cas Heap Size:"
+ aPerformanceTuningSettings.get(UIMAFramework.CAS_INITIAL_HEAP_SIZE) + " cells");
}
Modified: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/InProcessCache.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/InProcessCache.java?rev=661446&r1=661445&r2=661446&view=diff
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/InProcessCache.java (original)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/InProcessCache.java Thu May 29 12:41:58 2008
@@ -33,11 +33,13 @@
import org.apache.uima.aae.controller.Endpoint;
import org.apache.uima.aae.controller.EventSubscriber;
import org.apache.uima.aae.error.AsynchAEException;
+import org.apache.uima.aae.message.AsynchAEMessage;
import org.apache.uima.aae.message.MessageContext;
import org.apache.uima.aae.monitor.statistics.DelegateStats;
import org.apache.uima.cas.CAS;
import org.apache.uima.cas.impl.OutOfTypeSystemData;
import org.apache.uima.cas.impl.XmiSerializationSharedData;
+import org.apache.uima.flow.FinalStep;
import org.apache.uima.flow.Step;
import org.apache.uima.util.Level;
@@ -235,7 +237,14 @@
String key = (String) it.next();
CacheEntry entry = (CacheEntry)cache.get(key);
count++;
- sb.append(key+"\n");
+ if ( entry.isSubordinate())
+ {
+ sb.append(key+ " Number Of Children CASes In Play:"+entry.getSubordinateCasInPlayCount()+" Parent CAS id:"+entry.getInputCasReferenceId()+"\n");
+ }
+ else
+ {
+ sb.append(key+ " *** Input CAS. Number Of Children CASes In Play:"+entry.getSubordinateCasInPlayCount()+"\n");
+ }
}
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
"dumpContents", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_show_cache_entry_key__FINEST",
@@ -414,31 +423,6 @@
CacheEntry casRefEntry = getEntry(aCasReferenceId);
return casRefEntry.getStartTime();
}
- public synchronized String register(String anInputCasRefId, long aCurrentSequence, CAS aCAS, MessageContext aMessageContext, OutOfTypeSystemData otsd)
- throws AsynchAEException
- {
- String casReferenceId = anInputCasRefId+"."+String.valueOf(aCurrentSequence);
-
- register(aCAS, aMessageContext, otsd, casReferenceId);
- return casReferenceId;
- }
- public synchronized String register(CAS aCAS, MessageContext aMessageContext, OutOfTypeSystemData otsd)
- throws AsynchAEException
- {
- //System.out.println("Register");
- String casReferenceId = idGenerator.nextId();
- register(aCAS, aMessageContext, otsd, casReferenceId);
- return casReferenceId;
- }
-
- public synchronized String register(CAS aCAS, MessageContext aMessageContext, XmiSerializationSharedData sharedData)
- throws AsynchAEException
- {
- //System.out.println("Register");
- String casReferenceId = idGenerator.nextId();
- register(aCAS, aMessageContext, sharedData, casReferenceId);
- return casReferenceId;
- }
public boolean entryExists(String aCasReferenceId)
{
try
@@ -455,39 +439,37 @@
}
return true;
}
- public synchronized void register(CAS aCAS, MessageContext aMessageContext, OutOfTypeSystemData otsd, String aCasReferenceId)
+
+ public synchronized CacheEntry register(CAS aCAS, MessageContext aMessageContext, OutOfTypeSystemData otsd)
throws AsynchAEException
{
- cache.put(aCasReferenceId, new CacheEntry(aCAS, aCasReferenceId, aMessageContext, otsd));
+// String casReferenceId = idGenerator.nextId();
+ return register(aCAS, aMessageContext, otsd, idGenerator.nextId());
+// return casReferenceId;
}
-
- public synchronized void register(CAS aCAS, MessageContext aMessageContext, XmiSerializationSharedData sharedData, String aCasReferenceId)
+ public synchronized CacheEntry register(CAS aCAS, MessageContext aMessageContext, XmiSerializationSharedData sharedData)
throws AsynchAEException
{
- cache.put(aCasReferenceId, new CacheEntry(aCAS, aCasReferenceId, aMessageContext, sharedData));
+// String casReferenceId = idGenerator.nextId();
+ return register(aCAS, aMessageContext, sharedData, idGenerator.nextId());
+// return casReferenceId;
}
- public void register(CAS aCAS, OutOfTypeSystemData otsd, String aCasReferenceId )
+ public synchronized CacheEntry register(CAS aCAS, MessageContext aMessageContext, OutOfTypeSystemData otsd, String aCasReferenceId)
throws AsynchAEException
{
- CacheEntry casRefEntry = getEntry(aCasReferenceId);
- if ( casRefEntry == null )
- {
- throw new AsynchAEException("Cas Not Found In CasManager Cache. CasReferenceId::"+aCasReferenceId+" is Invalid");
- }
- casRefEntry.setCas(aCAS, otsd);
+ return registerCacheEntry(aCasReferenceId, new CacheEntry(aCAS, aCasReferenceId, aMessageContext, otsd));
}
- public void register(CAS aCAS, String aCasReferenceId )
+ public synchronized CacheEntry register(CAS aCAS, MessageContext aMessageContext, XmiSerializationSharedData sharedData, String aCasReferenceId)
throws AsynchAEException
{
- CacheEntry casRefEntry = getEntry(aCasReferenceId);
- if ( casRefEntry == null )
- {
- throw new AsynchAEException("Cas Not Found In CasManager Cache. CasReferenceId::"+aCasReferenceId+" is Invalid");
- }
- casRefEntry.setCas(aCAS);
+ return registerCacheEntry(aCasReferenceId, new CacheEntry(aCAS, aCasReferenceId, aMessageContext, sharedData));
+ }
+ private CacheEntry registerCacheEntry( String aCasReferenceId, CacheEntry entry )
+ {
+ cache.put(aCasReferenceId, entry);
+ return entry;
}
-
public int getNumberOfParallelDelegates(String aCasReferenceId)
throws AsynchAEException
{
@@ -593,34 +575,22 @@
private int state = 0;
+ private long sequence = 0;
+
+ private Endpoint freeCasEndpoint;
+
+ private FinalStep step;
+
protected CacheEntry(CAS aCas, String aCasReferenceId, MessageContext aMessageAccessor, OutOfTypeSystemData aotsd)
{
this(aCas, aCasReferenceId, aMessageAccessor);
messageAccessor = aMessageAccessor;
-/*
- cas = aCas;
- otsd = aotsd;
- if ( aMessageAccessor != null )
- {
- messageOrigin = aMessageAccessor.getEndpoint();
- }
- casReferenceId = aCasReferenceId;
-*/
}
protected CacheEntry(CAS aCas, String aCasReferenceId, MessageContext aMessageAccessor, XmiSerializationSharedData sdata)
{
this(aCas, aCasReferenceId, aMessageAccessor);
deserSharedData = sdata;
-/*
- cas = aCas;
- messageAccessor = aMessageAccessor;
- if ( aMessageAccessor != null )
- {
- messageOrigin = aMessageAccessor.getEndpoint();
- }
- casReferenceId = aCasReferenceId;
-*/
}
private CacheEntry(CAS aCas, String aCasReferenceId, MessageContext aMessageAccessor )
{
@@ -631,6 +601,17 @@
messageOrigin = aMessageAccessor.getEndpoint();
}
casReferenceId = aCasReferenceId;
+ try
+ {
+ if ( aMessageAccessor.propertyExists(AsynchAEMessage.CasSequence) )
+ {
+ sequence = aMessageAccessor.getMessageLongProperty(AsynchAEMessage.CasSequence);
+ }
+ }
+ catch( Exception e)
+ {
+ e.printStackTrace();
+ }
}
public String getCasReferenceId()
{
@@ -914,6 +895,32 @@
{
state = aState;
}
+ public long getCasSequence()
+ {
+ return sequence;
+ }
+ public void setCasSequence(long sequence)
+ {
+ this.sequence = sequence;
+ }
+
+ public void setFreeCasEndpoint( Endpoint aFreeCasEndpoint )
+ {
+ freeCasEndpoint = aFreeCasEndpoint;
+ }
+ public Endpoint getFreeCasEndpoint()
+ {
+ return freeCasEndpoint;
+ }
+
+ public void setFinalStep( FinalStep step )
+ {
+ this.step = step;
+ }
+ public FinalStep getFinalStep()
+ {
+ return step;
+ }
}
Modified: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/OutputChannel.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/OutputChannel.java?rev=661446&r1=661445&r2=661446&view=diff
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/OutputChannel.java (original)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/OutputChannel.java Thu May 29 12:41:58 2008
@@ -19,6 +19,7 @@
package org.apache.uima.aae;
+import org.apache.uima.aae.InProcessCache.CacheEntry;
import org.apache.uima.aae.controller.AnalysisEngineController;
import org.apache.uima.aae.controller.Endpoint;
import org.apache.uima.aae.error.AsynchAEException;
@@ -46,7 +47,9 @@
public void sendReply( String aCasReferenceId, Endpoint anEndpoint ) throws AsynchAEException;
-// public void sendReply( AnalysisEngineMetaData anAnalysisEngineMetadata, Endpoint anEndpoint, boolean serialize ) throws AsynchAEException;
+ public void sendReply( CacheEntry entry, Endpoint anEndpoint ) throws AsynchAEException;
+
+ // public void sendReply( AnalysisEngineMetaData anAnalysisEngineMetadata, Endpoint anEndpoint, boolean serialize ) throws AsynchAEException;
public void sendReply( ProcessingResourceMetaData aProcessingResourceMetadata, Endpoint anEndpoint, boolean serialize ) throws AsynchAEException;
public void sendReply(Throwable t, String aCasReferenceId, Endpoint anEndpoint, int aCommand) throws AsynchAEException;
Modified: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaASProcessStatus.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaASProcessStatus.java?rev=661446&r1=661445&r2=661446&view=diff
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaASProcessStatus.java (original)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaASProcessStatus.java Thu May 29 12:41:58 2008
@@ -23,5 +23,5 @@
public interface UimaASProcessStatus extends EntityProcessStatus {
public String getCasReferenceId();
-
+ public String getParentCasReferenceId();
}
Modified: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaASProcessStatusImpl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaASProcessStatusImpl.java?rev=661446&r1=661445&r2=661446&view=diff
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaASProcessStatusImpl.java (original)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaASProcessStatusImpl.java Thu May 29 12:41:58 2008
@@ -47,15 +47,21 @@
public boolean isProcessed = true;
private String casReferenceId;
+
+ private String parentCasId;
public UimaASProcessStatusImpl(ProcessTrace p){
this(p,null);
}
public UimaASProcessStatusImpl(ProcessTrace p, String aCasReferenceId) {
+ this(p,aCasReferenceId,null);
+ }
+
+ public UimaASProcessStatusImpl(ProcessTrace p, String aCasReferenceId, String aParentCasReferenceId) {
prT = p;
casReferenceId = aCasReferenceId;
- }
-
+ parentCasId = aParentCasReferenceId;
+ }
public UimaASProcessStatusImpl(ProcessTrace p, boolean aSkip) {
prT = p;
isSkipped = aSkip;
@@ -143,4 +149,7 @@
public String getCasReferenceId() {
return casReferenceId;
}
+ public String getParentCasReferenceId() {
+ return parentCasId;
+ }
}
Modified: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaAsynchronousEngine.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaAsynchronousEngine.java?rev=661446&r1=661445&r2=661446&view=diff
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaAsynchronousEngine.java (original)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/client/UimaAsynchronousEngine.java Thu May 29 12:41:58 2008
@@ -74,6 +74,7 @@
public final String ServerUri = "ServerURI";
public final String Endpoint = "Endpoint";
public final String CasPoolSize = "CasPoolSize";
+ public final String ShadowCasPoolSize ="ShadowCasPoolSize";
public static final String ReplyWindow = "ReplyWindow";
public static final String Timeout = "Timeout";
public static final String CpcTimeout = "CpcTimeout";
@@ -203,10 +204,10 @@
* It doesn't use call-backs through a registered application listener.
*
* @param aCAS - a CAS to analyze.
- *
+ * @return - a unique id assigned to the CAS
* @throws ResourceProcessException
*/
- public void sendAndReceiveCAS(CAS aCAS) throws ResourceProcessException;
+ public String sendAndReceiveCAS(CAS aCAS) throws ResourceProcessException;
/**
* Deploys a UIMA AS container and all services defined in provided deployment
Modified: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController.java?rev=661446&r1=661445&r2=661446&view=diff
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController.java (original)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController.java Thu May 29 12:41:58 2008
@@ -31,6 +31,7 @@
import org.apache.uima.aae.jmx.ServiceErrors;
import org.apache.uima.aae.jmx.ServiceInfo;
import org.apache.uima.aae.jmx.ServicePerformance;
+import org.apache.uima.flow.FinalStep;
public interface AggregateAnalysisEngineController extends AnalysisEngineController
{
@@ -79,7 +80,7 @@
public String getLastDelegateKeyFromFlow(String anInputCasReferenceId);
- public boolean sendRequestToReleaseCas();
+// public boolean sendRequestToReleaseCas();
public void registerChildController( AnalysisEngineController aChildController, String aDelegateKey) throws Exception;
@@ -105,5 +106,7 @@
public ServicePerformance getServicePerformance(String aDelegateKey );
- public boolean decrementCasSubordinateCount( CacheEntry aParentCasCacheEntry );
+// public boolean decrementCasSubordinateCount( CacheEntry aParentCasCacheEntry );
+
+ public void finalStep( FinalStep aStep, String aCasReferenceId);
}
Modified: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java?rev=661446&r1=661445&r2=661446&view=diff
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java (original)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java Thu May 29 12:41:58 2008
@@ -84,7 +84,8 @@
private Map flowMap = new HashMap();
- protected ConcurrentHashMap destinationMap;
+// protected ConcurrentHashMap destinationMap;
+ private volatile ConcurrentHashMap destinationMap;
private Map destinationToKeyMap;
@@ -114,15 +115,15 @@
private boolean initialized = false;
- private int cmCasPoolSizeDelta = 0;
-
private int counter = 0;
private Object counterMonitor = new Object();
- protected List childControllerList = new ArrayList();
+// protected List childControllerList = new ArrayList();
+ private List childControllerList = new ArrayList();
- protected Map delegateStats = new HashMap();
+// protected Map delegateStats = new HashMap();
+ private Map delegateStats = new HashMap();
private AggregateServiceInfo serviceInfo = null;
@@ -685,7 +686,7 @@
// Save the subordinate Flow Object in a cache. Flow exists in the
// cache until the CAS is fully processed or it is
- // explicitely deleted when processing of this CAS cannot continue
+ // explicitly deleted when processing of this CAS cannot continue
synchronized( flowMap )
{
flowMap.put(aNewCasReferenceId, flow);
@@ -929,11 +930,172 @@
}
}
- private void finalStep(FinalStep aStep, String aCasReferenceId)// throws AsynchAEException
+ public void finalStep(FinalStep aStep, String aCasReferenceId)
+ {
+ Endpoint endpoint=null;
+
+ boolean subordinateCasInPlayCountDecremented=false;
+ CacheEntry cacheEntry = null;
+ Endpoint freeCasEndpoint = null;
+ // If debug level=FINEST dump the entire cache
+ getInProcessCache().dumpContents();
+
+ try
+ {
+ // Get entry from the cache for a given CAS Id. This throws an exception if
+ // an entry doesnt exist in the cache
+ cacheEntry = getInProcessCache().getCacheEntryForCAS(aCasReferenceId);
+ // Mark the entry to indicate that the CAS reached a final step. This CAS
+ // may still have children and will not be returned to the client until
+ // all of them are fully processed. This state info will aid in the
+ // internal bookkeeping when the final child is processed.
+ cacheEntry.setState(CacheEntry.FINAL_STATE);
+
+ }
+ catch(Exception e)
+ {
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "finalStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING", new Object[] { e });
+ return;
+ }
+ // Found the entry in the cache for a given CAS id
+ try
+ {
+ endpoint = getInProcessCache().getEndpoint(null, aCasReferenceId);
+ // Check if this CAS has children (subordinates)
+ if ( cacheEntry.getSubordinateCasInPlayCount() > 0 )
+ {
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
+ "finalStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_final_step_parent_cas_child_count__FINEST", new Object[] { getComponentName(),aCasReferenceId,cacheEntry.getSubordinateCasInPlayCount()});
+ // Leave input CAS in pending state. It will be returned to the client
+ // *only* if the last subordinate CAS is fully processed.
+ cacheEntry.setPendingReply(true);
+ cacheEntry.setFinalStep(aStep);
+ // Done here. There are subordinate CASes still being processed.
+ return;
+ }
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
+ "finalStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_final_step_parent_cas_no_children__FINEST", new Object[] { getComponentName(),aCasReferenceId});
+
+ // If this CAS has a parent, save the destination of a CM that produced it and where we may need to send Free Cas Notification
+ if ( cacheEntry.isSubordinate())
+ {
+ freeCasEndpoint = cacheEntry.getFreeCasEndpoint();
+ }
+
+ CacheEntry parentCASCacheEntry = null;
+ // If this service is not a Cas Multiplier and a given CAS has a parent
+ // decrement a number of children the parent CAS has in play. The child
+ // CAS will be dropped
+// if ( freeCasEndpoint == null && cacheEntry.isSubordinate() )
+ if ( cacheEntry.isSubordinate() && isTopLevelComponent())
+ {
+ // This is a subordinate CAS. First get cache entry for the input (parent) CAS
+ parentCASCacheEntry = getInProcessCache().getCacheEntryForCAS(cacheEntry.getInputCasReferenceId());
+ parentCASCacheEntry.decrementSubordinateCasInPlayCount();
+ // Save this state in case an exception happens below, the error handler will not decrement children again
+ subordinateCasInPlayCountDecremented = true;
+ }
+ Endpoint clientEndpoint = null;
+ boolean casDropped = false;
+ // If the CAS was generated by this component but the Flow Controller wants to drop it OR this component
+ // is not a Cas Multiplier
+ if ( forceToDropTheCas( cacheEntry, aStep ) )
+ {
+ if ( cacheEntry.isReplyReceived())
+ {
+ // Drop the CAS and remove cache entry for it
+ dropCAS(aCasReferenceId, true);
+ casDropped = true;
+ }
+ }
+ else
+ {
+ // Send a reply to the Client. If the CAS is an input CAS it will be dropped
+ clientEndpoint = replyToClient( cacheEntry );
+ }
+ // Now check if the CASes parent CAS is ready for a finalStep. The parent CAS may
+ // have been processed already but it is cached since its children are still
+ // in play.
+ if ( releaseParentCas(casDropped, clientEndpoint, parentCASCacheEntry) )
+ {
+ // All subordinate CASes have been processed. Process the parent CAS recursively.
+ finalStep(parentCASCacheEntry.getFinalStep(), parentCASCacheEntry.getCasReferenceId());
+ }
+ }
+ catch( Exception e)
+ {
+ HashMap map = new HashMap();
+ map.put(AsynchAEMessage.Command, AsynchAEMessage.Process);
+ map.put(AsynchAEMessage.CasReference, aCasReferenceId);
+ // If the subordinate count has been decremented, let the error handler know
+ // so that it doesn't decrement the count again. The default action in the
+ // error handler is to decrement number of subordinates responding. An exception
+ // that is no subject to retry will be counted as a response.
+ if (subordinateCasInPlayCountDecremented)
+ {
+ map.put(AsynchAEMessage.SkipSubordinateCountUpdate, true);
+ }
+ if ( endpoint != null )
+ {
+ map.put(AsynchAEMessage.Endpoint, endpoint);
+ }
+ handleError(map, e);
+ }
+ finally
+ {
+ removeMessageOrigin(aCasReferenceId);
+ dropStats(aCasReferenceId, super.getName());
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
+ "finalStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_final_step_show_internal_stats__FINEST", new Object[] { getName(), flowMap.size(),getInProcessCache().getSize(),originMap.size(), super.statsMap.size()});
+ // freeCasEndpoint is a special endpoint for sending Free CAS Notification.
+ if ( !isCasMultiplier() && freeCasEndpoint != null )
+ {
+ freeCasEndpoint.setReplyEndpoint(true);
+ try
+ {
+ // send Free CAS Notification to a Cas Multiplier
+ getOutputChannel().sendRequest(AsynchAEMessage.ReleaseCAS, aCasReferenceId, freeCasEndpoint);
+ }
+ catch( Exception e)
+ {
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "finalStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING", new Object[] { e });
+ }
+ }
+ }
+ }
+ private boolean releaseParentCas(boolean casDropped, Endpoint clientEndpoint, CacheEntry parentCASCacheEntry)
+ {
+ return (
+ (casDropped || (clientEndpoint != null && !clientEndpoint.isRemote() ))
+ && parentCASCacheEntry != null
+ && parentCASCacheEntry.isReplyReceived()
+ && parentCASCacheEntry.getState() == CacheEntry.FINAL_STATE
+ && parentCASCacheEntry.getSubordinateCasInPlayCount() == 0
+ );
+ }
+
+ private boolean forceToDropTheCas( CacheEntry cacheEntry, FinalStep aStep)
+ {
+ // Get the key of the Cas Producer
+ String casProducer = cacheEntry.getCasProducerAggregateName();
+ // CAS is considered new from the point of view of this service IF it was produced by it
+ boolean isNewCas = (cacheEntry.isNewCas() && casProducer != null && getComponentName().equals(casProducer));
+ // If the CAS was generated by this component but the Flow Controller wants to drop the CAS OR this component
+ // is not a Cas Multiplier
+ if ( isNewCas && ( aStep.getForceCasToBeDropped() || !isCasMultiplier()) )
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ protected void finalStep(FinalStep aStep, String aCasReferenceId)// throws AsynchAEException
{
Endpoint endpoint=null;
boolean subordinateCasInPlayCountDecremented=false;
CacheEntry cacheEntry = null;
+ Endpoint freeCasEndpoint = null;
try
{
cacheEntry = getInProcessCache().getCacheEntryForCAS(aCasReferenceId);
@@ -944,7 +1106,8 @@
}
catch(Exception e)
{
- return;
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "process", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING", new Object[] { e });
+ return;
}
try
@@ -972,26 +1135,26 @@
// Leave input CAS in pending state. It will be returned to the client
// *only* if the last subordinate CAS is fully processed.
cacheEntry.setPendingReply(true);
- // Done here. There are subordinate CASes still being processed.
+ cacheEntry.setFinalStep(aStep);
+ // Done here. There are subordinate CASes still being processed.
return;
}
else
{
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
"finalStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_final_step_parent_cas_no_children__FINEST", new Object[] { getComponentName(),aCasReferenceId});
-
// All subordinates have been fully processed. Set the flag so that
// the input is returned back to the client.
replyWithInputCAS = true;
}
}
}
- else //if ( isTopLevelComponent())
+ else
{
// This is a subordinate CAS. First get cache entry for the input (parent) CAS
parentCASCacheEntry =
getInProcessCache().getCacheEntryForCAS(cacheEntry.getInputCasReferenceId());
- if ( getMessageOrigin(aCasReferenceId) == null )
+ if ( getMessageOrigin(aCasReferenceId) == null && !isCasMultiplier())
{
replyWithInputCAS = decrementCasSubordinateCount( parentCASCacheEntry);
if ( parentCASCacheEntry != null )
@@ -1006,9 +1169,8 @@
{
replyWithInputCAS = true;
}
-
}
-
+ freeCasEndpoint = cacheEntry.getFreeCasEndpoint();
// Cas Processing has been completed. Check if the CAS should be sent to
// the client.
// Any of the two following conditions will prevent this aggregate from
@@ -1024,49 +1186,27 @@
getInProcessCache().dumpContents();
if (aStep.getForceCasToBeDropped() || (isNewCas && aggregateMetadata.getOperationalProperties().getOutputsNewCASes() == false))
{
+
endpoint = getInProcessCache().getEndpoint(null, aCasReferenceId);
if ( cacheEntry.isReplyReceived())
{
dropCAS(aCasReferenceId, true);
}
-
- if ( parentCASCacheEntry != null //&& parentCASCacheEntry.isSubordinate()
- && parentCASCacheEntry.isReplyReceived()
- && parentCASCacheEntry.getState() == CacheEntry.FINAL_STATE
- && parentCASCacheEntry.getSubordinateCasInPlayCount() == 0)
- {
- // All subordinate CASes have been processed. Process the parent
- // CAS recursively.
- finalStep(aStep, parentCASCacheEntry.getCasReferenceId());
- }
- }
-/*
- if ( replyWithInputCAS && parentCASCacheEntry != null )
- {
- // Reply with the input CAS
- replyToClient( parentCASCacheEntry.getCasReferenceId() );
- }
- else
- {
- replyToClient( aCasReferenceId );
- }
-*/
- if ( replyWithInputCAS && getMessageOrigin(aCasReferenceId) != null)
- {
- // Reply with the input CAS
- replyToClient( aCasReferenceId );
- }
-
- String casMultiplierKey = cacheEntry.getCasMultiplierKey();
- if ( isNewCas && casMultiplierKey != null ) //&& cacheEntry.shouldSendRequestToFreeCas())
- {
- endpoint = lookUpEndpoint(casMultiplierKey, true);
- if ( endpoint != null && endpoint.isRemote() && endpoint.isCasMultiplier() ) //&& cacheEntry.shouldSendRequestToFreeCas() )
- {
- endpoint.setEndpoint(endpoint.getEndpoint()+"__CasSync");
- getOutputChannel().sendRequest(AsynchAEMessage.ReleaseCAS, endpoint );
- }
- endpoint = null;
+ }
+ else if (aggregateMetadata.getOperationalProperties().getOutputsNewCASes() ||
+ ( replyWithInputCAS && getMessageOrigin(aCasReferenceId) != null) )
+ {
+ // Send a reply to the Client. If the CAS is an input CAS it will be dropped
+ replyToClient( aCasReferenceId, cacheEntry );
+ }
+ if ( parentCASCacheEntry != null
+ && parentCASCacheEntry.isReplyReceived()
+ && parentCASCacheEntry.getState() == CacheEntry.FINAL_STATE
+ && parentCASCacheEntry.getSubordinateCasInPlayCount() == 0)
+ {
+ // All subordinate CASes have been processed. Process the parent
+ // CAS recursively.
+ finalStep(aStep, parentCASCacheEntry.getCasReferenceId());
}
removeMessageOrigin(aCasReferenceId);
dropStats(aCasReferenceId, super.getName());
@@ -1093,16 +1233,27 @@
}
handleError(map, e);
}
-/*
finally
{
- if ( aCasReferenceId != null && originMap.containsKey(aCasReferenceId))
+ // freeCasEndpoint is a special endpoint for sending Free CAS Notification.
+ // This endpoint will be set for each CAS generated in a Cas Multiplier.
+ if ( !isCasMultiplier() && freeCasEndpoint != null )
{
- originMap.remove(aCasReferenceId);
+ freeCasEndpoint.setReplyEndpoint(true);
+ try
+ {
+ // send Free CAS Notification to a Cas Multiplier
+ getOutputChannel().sendRequest(AsynchAEMessage.ReleaseCAS, aCasReferenceId, freeCasEndpoint);
+ }
+ catch( Exception e)
+ {
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "process", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING", new Object[] { e });
+ }
}
}
-*/
}
+ */
+/*
public boolean decrementCasSubordinateCount( CacheEntry aParentCasCacheEntry )
{
if ( aParentCasCacheEntry != null )
@@ -1127,33 +1278,42 @@
}
return false;
}
- private void replyToClient(String aCasReferenceId ) throws Exception
+*/
+// private void replyToClient(String aCasReferenceId, CacheEntry cacheEntry ) throws Exception
+ private Endpoint replyToClient(CacheEntry cacheEntry ) throws Exception
{
- Endpoint endpoint;
+ Endpoint endpoint = null;
// Get the endpoint that represents a client that send the request
// to this service. If the first arg to getEndpoint() is null, the method
// should return the origin.
if (isTopLevelComponent())
{
- endpoint = getInProcessCache().getEndpoint(null, aCasReferenceId);
+ if ( cacheEntry.isSubordinate()) //getCasSequence() > 0 )
+ {
+ endpoint = getInProcessCache().getEndpoint(null, cacheEntry.getInputCasReferenceId());
+ }
+ else
+ {
+ endpoint = getInProcessCache().getEndpoint(null, cacheEntry.getCasReferenceId());
+ }
}
else
{
- endpoint = getMessageOrigin(aCasReferenceId);
- dropFlow(aCasReferenceId, false);
+ endpoint = getMessageOrigin(cacheEntry.getCasReferenceId());
+ dropFlow(cacheEntry.getCasReferenceId(), false);
}
if ( endpoint != null )
{
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
- "finalStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_final_step__FINEST", new Object[] { aCasReferenceId, (double) (System.nanoTime() - endpoint.getEntryTime()) / (double) 1000000 });
+ "replyToClient", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_final_step__FINEST", new Object[] { cacheEntry.getCasReferenceId(), (double) (System.nanoTime() - endpoint.getEntryTime()) / (double) 1000000 });
if (endpoint.getEndpoint() == null)
{
- UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "finalStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_no_reply_destination__INFO", new Object[] { aCasReferenceId });
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "replyToClient", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_no_reply_destination__INFO", new Object[] { cacheEntry.getCasReferenceId() });
HashMap map = new HashMap();
map.put(AsynchAEMessage.Command, AsynchAEMessage.Process);
- map.put(AsynchAEMessage.CasReference, aCasReferenceId);
+ map.put(AsynchAEMessage.CasReference, cacheEntry.getCasReferenceId());
handleError(map, new UnknownDestinationException());
}
@@ -1163,23 +1323,35 @@
if ( !isStopped() )
{
- // Send response to the given endpoint
- getOutputChannel().sendReply(aCasReferenceId, endpoint);
+ // Check if this CAS is new, meaning it has a parent and this component is a Cas Multiplier
+ if ( cacheEntry.isSubordinate() && isCasMultiplier())
+ {
+ // Add the generated CAS to the outstanding CAS Map. Client notification will release
+ // this CAS back to its pool
+ synchronized(syncObject)
+ {
+ cmOutstandingCASes.put(cacheEntry.getCasReferenceId(),cacheEntry.getCasReferenceId());
+ }
+
+ // Send response to a given endpoint
+ //getOutputChannel().sendReply(cacheEntry.getCas(), cacheEntry.getInputCasReferenceId(), aCasReferenceId, endpoint, cacheEntry.getCasSequence());
+ getOutputChannel().sendReply(cacheEntry, endpoint);
+ }
+ else
+ {
+ // Send response to a given endpoint
+ getOutputChannel().sendReply(cacheEntry.getCasReferenceId(), endpoint);
+ }
}
}
- // If the destination for the reply is in the same jvm dont remove
- // the entry from the cache. The client may need to retrive CAS by reference
- // to do some post-processing. The client will remove the entry when done
- // post-processing CAS.
- if ( !endpoint.getServerURI().startsWith("vm:"))
+ // Drop the CAS only if the client is remote and the CAS is an input CAS.
+ // If this CAS has a parent the client will send Realease CAS notification to release the CAS.
+ if ( endpoint.isRemote() && !cacheEntry.isSubordinate())
{
- // Message was fully processed, remove state info related to the
- // previous CAS from the cache
- InProcessCache cache = getInProcessCache();
-
- dropCAS(aCasReferenceId, true);
+ dropCAS(cacheEntry.getCasReferenceId(), true);
}
}
+ return endpoint;
}
private void executeFlowStep(FlowContainer aFlow, String aCasReferenceId, boolean newCAS) throws AsynchAEException
{
@@ -1361,6 +1533,7 @@
String key = findKeyForValue(fromDestination);
Endpoint_impl endpoint = (Endpoint_impl) destinationMap.get(key);
+
if (endpoint == null)
{
// Log invalid reply and move on
@@ -1394,25 +1567,7 @@
{
endpoint.setIsCasMultiplier(true);
remoteCasMultiplierList.add(key);
- if ( endpoint.isRemote())
- {
- int remoteCasPoolSize = 0;
- Object o = null;
- if ( ( o = ((ProcessingResourceMetaData) resource).getConfigurationParameterSettings().getParameterValue(AnalysisEngineController.CasPoolSize)) != null )
- {
- remoteCasPoolSize = ((Integer)o).intValue();
- System.out.println(">>>>>>>>>>>>>> Remote CAS Pool Size:::"+remoteCasPoolSize);
- if ( remoteCasPoolSize > endpoint.getShadowPoolSize() )
- {
- System.out.println(">>>>> Remote Cas Multiplier Cas Pool Size Exceeds the Size of the Local Cas Pool Size <<<<<<");
- UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(), "mergeTypeSystem", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_invalid_cp_size__CONFIG", new Object[] {getName(), fromDestination, remoteCasPoolSize, endpoint.getShadowPoolSize() });
- throw new ResourceConfigurationException(UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,"UIMAEE_invalid_cp_size__CONFIG", new Object[] {getName(), fromDestination, remoteCasPoolSize, endpoint.getShadowPoolSize()});
- }
- cmCasPoolSizeDelta = endpoint.getShadowPoolSize()-remoteCasPoolSize;
- }
- }
}
-
if ( endpoint.isRemote())
{
Object o = null;
@@ -1431,7 +1586,6 @@
}
endpoint.setInitialized(true);
-
// If getMeta request not yet sent, send meta request to all remote delegate
// Special case when all delegates are remote is handled in the setInputChannel
@@ -1446,15 +1600,6 @@
unregisteredDelegateList.remove(i);
}
}
-/*
- // When all collocated delegates reply with metadata send request for meta to
- // remote delegates.
- if ( unregisteredDelegateList.size() == 0 )
- {
- requestForMetaSentToRemotes = true;
- sendRequestForMetadataToRemoteDelegates();
- }
- */
}
@@ -1734,20 +1879,6 @@
}
}
-
- public boolean sendRequestToReleaseCas()
- {
-
- synchronized( counterMonitor )
- {
- if ( cmCasPoolSizeDelta > 0 && counter < cmCasPoolSizeDelta )
- {
- counter++;
- return true;
- }
- return false;
- }
- }
public ServiceErrors getServiceErrors(String aDelegateKey)
{
if ( !serviceErrorMap.containsKey(aDelegateKey ))
@@ -1859,22 +1990,8 @@
super.stop();
cleanUp();
}
-/*
- public ServicePerformance getCasStatistics( String aCasReferenceId )
+ protected List getChildControllerList()
{
- ServicePerformance casStats = null;
- if ( perCasStatistics.containsKey(aCasReferenceId) )
- {
- casStats = (ServicePerformance)perCasStatistics.get(aCasReferenceId);
- }
- else
- {
- casStats = new ServicePerformance();
- perCasStatistics.put( aCasReferenceId, casStats);
- System.out.println("########## AggregateController.getCasStatistics()-Controller:"+getComponentName()+" Creating New ServicePerformance Object for Cas:"+aCasReferenceId+" Map HashCode:"+perCasStatistics.hashCode()+" Map Size:"+perCasStatistics.size());
- }
- return casStats;
+ return childControllerList;
}
-*/
-
}
Modified: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AnalysisEngineController.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AnalysisEngineController.java?rev=661446&r1=661445&r2=661446&view=diff
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AnalysisEngineController.java (original)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AnalysisEngineController.java Thu May 29 12:41:58 2008
@@ -162,5 +162,9 @@
public void notifyListenersWithInitializationStatus(Exception e);
public ServicePerformance getCasStatistics( String aCasReferenceId );
+
+ public boolean isCasMultiplier();
+
+ public void releaseNextCas(String aCasReferenceId);
}