You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ch...@apache.org on 2015/02/11 20:25:52 UTC
svn commit: r1659048 - in
/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main:
resources/sleepjobs/1.dd.job scripts/runducc
Author: challngr
Date: Wed Feb 11 19:25:52 2015
New Revision: 1659048
URL: http://svn.apache.org/r1659048
Log:
UIMA-4195 Test handling of CR leakage.
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.dd.job
uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/runducc
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.dd.job
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.dd.job?rev=1659048&r1=1659047&r2=1659048&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.dd.job (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.dd.job Wed Feb 11 19:25:52 2015
@@ -16,18 +16,23 @@
# specific language governing permissions and limitations
# under the License.
#
-description Test DD Job 1
-classpath ${DUCC_HOME}/lib/uima-ducc/examples/*
-driver_descriptor_CR org.apache.uima.ducc.test.randomsleep.FixedSleepCR
+description Test job 1 - DD
+
+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
+driver_jvm_args -Xmx500M
+
+process_descriptor_DD org.apache.uima.ducc.test.randomsleep.DDSleepDescriptor
+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
+process_thread_count 2
+process_per_item_time_max 5
+environment AE_INIT_TIME=5 AE_INIT_RANGE=5 INIT_ERROR=0 LD_LIBRARY_PATH=/yet/a/nother/dumb/path
+process_deployments_max 999
-process_DD org.apache.uima.ducc.test.ddjob.DDSleepDescriptor
-environment AE_INIT_TIME=10000 AE_INIT_RANGE=1000 INIT_ERROR=0 LD_LIBRARY_PATH=/a/bogus/path DUCC_LD_LIBRARY_PATH=/a/bogus/path
-process_jvm_args -Xmx100M
+scheduling_class normal
-scheduling_class normal
-process_memory_size 2
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/runducc
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/runducc?rev=1659048&r1=1659047&r2=1659048&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/runducc (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/runducc Wed Feb 11 19:25:52 2015
@@ -38,6 +38,7 @@ import shutil
import signal
from threading import *
import Queue
+import random
DUCC_HOME = os.path.abspath(__file__ + '/../../..')
sys.path.append(DUCC_HOME + '/admin')
@@ -142,6 +143,16 @@ class DuccProcess(Thread):
self.runner.queue.get() # remove marker so main() can eventually exit
self.runner.queue.task_done()
+ def jdbloat(self):
+ if ( self.runner.cr_getnext_bloat == 0 ):
+ return '0'
+
+ toss = random.randint(0, 100)
+ if ( toss < self.runner.cr_getnext_bloat ):
+ return str(self.runner.cr_getnext_bloat)
+
+ return '0'
+
def calculate_bloat(self, memory):
# if we're testing our ability to contan bloat, we'll set xmx to double the
# requested memory. the JP will start to allocate stuff in an infinite loop.
@@ -261,6 +272,7 @@ class DuccProcess(Thread):
+ ' CR_RUNTIME_EXIT=' + str(self.runner.cr_runtime_exit) \
+ ' CR_RUNTIME_ERROR=' + str(self.runner.cr_runtime_error) \
+ bloat_parms \
+ + ' CR_GETNEXT_BLOAT=' + self.jdbloat() \
+ ' LD_LIBRARY_PATH=/a/bogus/path' \
+ '"'
@@ -567,6 +579,8 @@ class RunDucc(DuccUtil):
print ' --jp_uima_log log-properties'
print ' If specified, use the indicated properties file for JP UIMA/UIMA-AS logging. Default:', self.jp_uima_log
print ''
+ print ' -q CR Probality it will leak on each getNext. Default', self.cr_getnext_bloat
+ print ''
print ' -s'
print ' AE Probability that a JP will spontaneously exit during initialization. Default:', self.ae_init_exit
print ''
@@ -607,6 +621,7 @@ class RunDucc(DuccUtil):
self.cr_init_error = 0 # -x int 0-100
self.cr_runtime_exit = 0.0 # -y float
self.cr_runtime_error = 0.0 # -z float
+ self.cr_getnext_bloat = 0 # -q jd leakage
self.init_fail_cap = '99'
self.memory_override = None
self.init_time = 10000
@@ -626,7 +641,7 @@ class RunDucc(DuccUtil):
self.descriptor_as_file = False
try:
- opts, args = getopt.getopt(argv, 'b:d:fi:r:m:nop:s:t:u:v:w:x:y:z:?h', ['AE', 'DD', 'file', 'SE=', 'IB=', 'PB=', 'directory=', 'batchfile=', 'init_time=',
+ opts, args = getopt.getopt(argv, 'b:d:fi:m:nop:q:r:s:t:u:v:w:x:y:z:?h', ['AE', 'DD', 'file', 'SE=', 'IB=', 'PB=', 'directory=', 'batchfile=', 'init_time=',
'init_fail_cap=', 'range=', 'memory_override=', 'nmachines=', 'process_timeout=',
'init_timeout=', 'observe'
'jd_uima_log=', 'jp_uima_log=',
@@ -678,6 +693,8 @@ class RunDucc(DuccUtil):
self.init_bloat = a
elif o in ('--PB'):
self.process_bloat = a
+ elif ( o == '-q'):
+ self.cr_getnext_bloat = int(a)
elif ( o == '-s'):
self.ae_init_exit = int(a)
elif ( o == '-t'):
@@ -723,6 +740,7 @@ class RunDucc(DuccUtil):
print ' cr_init_error :', self.cr_init_error
print ' cr_runtime_exit :', self.cr_runtime_exit
print ' cr_runtime_error :', self.cr_runtime_error
+ print ' cr_getnext_bloat :', self.cr_getnext_bloat
print ' process_timeout :', self.process_timeout
print ' memory_override :', self.memory_override
print ' max_machines :', self.max_machines