Author: burn
Date: Tue Mar 13 14:51:53 2018
New Revision: 1826646

URL: http://svn.apache.org/viewvc?rev=1826646&view=rev
Log:
UIMA-5746 Add a service and job that reproduce the problem when 2 jobs launched

Added:
    
uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.jms.job
    
uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/FixedSleep.service
Modified:
    uima/uima-ducc/trunk/src/main/assembly/bin.xml
    
uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/randomsleep/FixedSleepAE.java

Modified: uima/uima-ducc/trunk/src/main/assembly/bin.xml
URL: 
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/assembly/bin.xml?rev=1826646&r1=1826645&r2=1826646&view=diff
==============================================================================
--- uima/uima-ducc/trunk/src/main/assembly/bin.xml (original)
+++ uima/uima-ducc/trunk/src/main/assembly/bin.xml Tue Mar 13 14:51:53 2018
@@ -516,14 +516,6 @@ under the License.
       <outputDirectory>examples/simple</outputDirectory>
       <fileMode>644</fileMode>
       <directoryMode>755</directoryMode>        
-      <includes>
-        <include>1.dd.job</include>
-        <include>1.dd.sync.job</include>
-        <include>1.job</include>
-        <include>1-error.job</include>
-        <include>1.inputs</include>
-        <include>1.service</include>
-      </includes>
     </fileSet>
 
     <fileSet>

Modified: 
uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/randomsleep/FixedSleepAE.java
URL: 
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/randomsleep/FixedSleepAE.java?rev=1826646&r1=1826645&r2=1826646&view=diff
==============================================================================
--- 
uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/randomsleep/FixedSleepAE.java
 (original)
+++ 
uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/randomsleep/FixedSleepAE.java
 Tue Mar 13 14:51:53 2018
@@ -37,9 +37,11 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.CASException;
 import org.apache.uima.examples.SourceDocumentInformation;
+import org.apache.uima.resource.ResourceConfigurationException;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.util.Level;
 import org.apache.uima.util.Logger;
+import org.apache.uima.util.Settings;
 
 /**
  * Simple AE for the system test.  It does no computation, instead sleeping to 
simulate computation.  It
@@ -74,6 +76,17 @@ public class FixedSleepAE extends CasAnn
             System.out.println("Is this nuts or what, no logger!");
         }
 
+        logger.log(Level.INFO, "UIMA version: 
"+UIMAFramework.getVersionString());
+        String[] keys = {"filesystem", "classpath", "datapath"};
+        Settings settings = uimaContext.getExternalOverrides();
+        for (String key : keys) {
+          try {
+            logger.log(Level.INFO, "External override setting '"+key+"' = 
'"+settings.getSetting(key)+"'");
+          } catch (ResourceConfigurationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+          }
+        }
         
         if ( initComplete ) {
             logger.log(Level.INFO, "Init bypassed in PID:TID " + pid + ":" + 
tid + ", already completed. ");
@@ -88,13 +101,13 @@ public class FixedSleepAE extends CasAnn
             File workingdir = new File(System.getProperty("user.dir"));
             File[] files = workingdir.listFiles();
             if ( logger != null )
-               logger.log(Level.INFO, "Working directory is " + 
workingdir.toString());
-            if ( files != null ) {
+               logger.log(Level.INFO, "Working directory " + 
workingdir.toString() + " has " + files.length + " files.");
+/*            if ( files != null ) {
                 for ( File f : files ) {
                        if ( logger != null )
                           logger.log(Level.INFO, "File: " + f.toString());
                 }
-            }
+            }*/
         }
 
         long sleep;
@@ -370,7 +383,7 @@ public class FixedSleepAE extends CasAnn
     @Override
     public void process(CAS cas) throws AnalysisEngineProcessException 
     {
-
+       System.out.println("!! FixedSleepAE:process");new 
Throwable().printStackTrace();
         forceCpuUsage();
 
        String data = cas.getSofaDataString();

Added: 
uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.jms.job
URL: 
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.jms.job?rev=1826646&view=auto
==============================================================================
--- 
uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.jms.job 
(added)
+++ 
uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.jms.job 
Tue Mar 13 14:51:53 2018
@@ -0,0 +1,38 @@
+# 
+# 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.
+# 
+description                    Test JMS job 1
+
+driver_descriptor_CR           
org.apache.uima.ducc.test.randomsleep.FixedSleepCR
+driver_descriptor_CR_overrides jobfile=${DUCC_HOME}/examples/simple/1.inputs 
compression=10 error_rate=0.0
+driver_jvm_args                -Xmx500M
+
+process_descriptor_AE          org.apache.uima.ducc.test.service.UimaAsRemote
+process_memory_size            2
+classpath                      ${DUCC_HOME}/lib/uima-ducc/examples/*:\
+                                                          
${DUCC_HOME}/apache-uima/lib/*:\
+                                                          
${DUCC_HOME}/apache-uima/apache-activemq/lib/*:\
+                                                          
${DUCC_HOME}/apache-uima/apache-activemq/lib/optional/*
+process_jvm_args               -Xmx100M -DdefaultBrokerURL=${defaultBrokerURL}
+process_pipeline_count         2
+process_per_item_time_max      5
+process_deployments_max        999
+
+scheduling_class               normal
+
+

Added: 
uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/FixedSleep.service
URL: 
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/FixedSleep.service?rev=1826646&view=auto
==============================================================================
--- 
uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/FixedSleep.service
 (added)
+++ 
uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/FixedSleep.service
 Tue Mar 13 14:51:53 2018
@@ -0,0 +1,31 @@
+# 
+# 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.
+# 
+
+service_request_endpoint       UIMA-AS:FixedSleepAE:${defaultBrokerURL}
+description                    Test service 1
+
+process_DD                                    
${DUCC_HOME}/examples/simple/resources/service/Deploy_RandomSleepAE.xml
+
+classpath                      
${DUCC_HOME}/lib/uima-ducc/examples/*:${DUCC_HOME}/apache-uima/lib/*:${DUCC_HOME}/apache-uima/apache-activemq/lib/*:${DUCC_HOME}/apache-uima/apache-activemq/lib/optional/*
+
+process_jvm_args               -Xmx100M -DdefaultBrokerURL=${defaultBrokerURL}
+process_memory_size            2
+environment                    AE_INIT_TIME=5 AE_INIT_RANGE=5 INIT_ERROR=0 
LD_LIBRARY_PATH=/yet/a/nother/dumb/path
+instances                      1
+autostart                                         true


Reply via email to