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/03/16 20:28:15 UTC
svn commit: r1667110 -
/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/JobProcessComponent.java
Author: cwiklik
Date: Mon Mar 16 19:28:15 2015
New Revision: 1667110
URL: http://svn.apache.org/r1667110
Log:
UIMA-4291 Shutdown polling thread when AEs initialize. The AEs transitioned from Initializing to Running and the Agent was notified. No need to poll anymore.
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/JobProcessComponent.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/JobProcessComponent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/JobProcessComponent.java?rev=1667110&r1=1667109&r2=1667110&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/JobProcessComponent.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/JobProcessComponent.java Mon Mar 16 19:28:15 2015
@@ -238,9 +238,9 @@ implements IJobProcessor{
// Setup Thread Factory
UimaServiceThreadFactory tf = new UimaServiceThreadFactory(Thread
.currentThread().getThreadGroup());
- workerThreadCount = new CountDownLatch(scaleout); //uimaProcessor.getScaleout());
+ workerThreadCount = new CountDownLatch(scaleout);
// Setup Thread pool with thread count = scaleout
- tpe = Executors.newFixedThreadPool(scaleout, tf); //uimaProcessor.getScaleout(), tf);
+ tpe = Executors.newFixedThreadPool(scaleout, tf);
// initialize http client's timeout
httpClient.setTimeout(timeout);
@@ -262,6 +262,13 @@ implements IJobProcessor{
// Update agent with the most up-to-date state of the pipeline
// all is well, so notify agent that this process is in Running state
agent.notify(currentState, processJmxUrl);
+ // Stop polling for AE state. All AEs have initialized. No need
+ // to poll.
+ try {
+ executor.shutdown();
+ } catch( Exception ee) {
+ ee.printStackTrace();
+ }
}
for( Future<?> future : threadHandles ) {
future.get(); // wait for each worker thread to exit run()