You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2015/01/13 23:14:08 UTC
svn commit: r1651518 -
/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configurator/jp/HttpWorkerThread.java
Author: cwiklik
Date: Tue Jan 13 22:14:08 2015
New Revision: 1651518
URL: http://svn.apache.org/r1651518
Log:
UIMA-4066 dont exit worker threads when JD says no more WIs left. Instead sleep awhile and do a GET again in case JD changes its mind
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configurator/jp/HttpWorkerThread.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configurator/jp/HttpWorkerThread.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configurator/jp/HttpWorkerThread.java?rev=1651518&r1=1651517&r2=1651518&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configurator/jp/HttpWorkerThread.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configurator/jp/HttpWorkerThread.java Tue Jan 13 22:14:08 2015
@@ -152,19 +152,19 @@ public class HttpWorkerThread implements
// if the JD state is Ended, exit this thread as all work has
// been processed and accounted for
if ( transaction.getJdState().equals(JdState.Ended) ) {
- duccComponent.getLogger().warn("run", null, "Exiting Thread "+Thread.currentThread().getId()+" JD Finished Processing");
- System.out.println("Exiting Thread DriverState=Ended");
- break; // the JD completed. Exit the thread
- }
- // There is no CAS. It looks like the JD CR is done but there
- // are still WIs being processed. Slow down the rate of requests
- synchronized (monitor) {
- try {
- monitor.wait(duccComponent.getThreadSleepTime());
- } catch (InterruptedException e) {
+ // the JD says there are no more WIs. Sleep awhile
+ // do a GET in case JD changes its mind. The JP will
+ // eventually be stopped by the agent
+ synchronized (monitor) {
+ try {
+ monitor.wait(duccComponent.getThreadSleepTime());
+ } catch (InterruptedException e) {
+ }
}
}
+ // There is no CAS. It looks like the JD CR is done but there
+ // are still WIs being processed. Slow down the rate of requests
} else {
// process the CAS
try {