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 2016/08/12 16:34:23 UTC
svn commit: r1756190 -
/uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java
Author: cwiklik
Date: Fri Aug 12 16:34:23 2016
New Revision: 1756190
URL: http://svn.apache.org/viewvc?rev=1756190&view=rev
Log:
UIMA-5048 Updated code to deal with missing command line
Modified:
uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java
Modified: uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java?rev=1756190&r1=1756189&r2=1756190&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java (original)
+++ uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java Fri Aug 12 16:34:23 2016
@@ -40,6 +40,7 @@ import org.apache.uima.ducc.transport.ev
import org.apache.uima.ducc.transport.event.common.IDuccJobDeployment;
import org.apache.uima.ducc.transport.event.common.IDuccProcess;
import org.apache.uima.ducc.transport.event.common.IDuccProcessType.ProcessType;
+import org.apache.uima.ducc.transport.event.common.IProcessState.ProcessState;
import org.apache.uima.ducc.transport.event.delegate.DuccEventDelegateListener;
import org.springframework.beans.factory.annotation.Qualifier;
@@ -134,7 +135,10 @@ public class AgentEventListener implemen
// check if this node is a target for this job's JD
if ( isTargetNodeForProcess(jobDeployment.getJdProcess()) ) {
// agent will check the state of JD process and either start, stop, or take no action
- ICommandLine jdCommandLine = jobDeployment.getJdCmdLine();
+// ICommandLine jdCommandLine = jobDeployment.getJdCmdLine();
+ agent.reconcileProcessStateAndTakeAction(lifecycleController, jobDeployment.getJdProcess(), jobDeployment.getJdCmdLine(),
+ jobDeployment.getStandardInfo(), jobDeployment.getProcessMemoryAssignment(), jobDeployment.getJobId());
+/*
if(jdCommandLine != null) {
agent.reconcileProcessStateAndTakeAction(lifecycleController, jobDeployment.getJdProcess(), jobDeployment.getJdCmdLine(),
jobDeployment.getStandardInfo(), jobDeployment.getProcessMemoryAssignment(), jobDeployment.getJobId());
@@ -142,13 +146,17 @@ public class AgentEventListener implemen
else {
logger.error("onDuccJobsStateEvent", null, "job is service");
}
+*/
}
- // check JPs
- for( IDuccProcess process : jobDeployment.getJpProcessList() ) {
- if ( isTargetNodeForProcess(process) ) {
- // agent will check the state of JP process and either start, stop, or take no action
- agent.reconcileProcessStateAndTakeAction(lifecycleController, process, jobDeployment.getJpCmdLine(),
- jobDeployment.getStandardInfo(), jobDeployment.getProcessMemoryAssignment(), jobDeployment.getJobId());
+ // reconcile JP procees only if JD is OK
+ if ( !jobDeployment.getJdProcess().getProcessState().equals(ProcessState.Failed) ) {
+ // check JPs
+ for( IDuccProcess process : jobDeployment.getJpProcessList() ) {
+ if ( isTargetNodeForProcess(process) ) {
+ // agent will check the state of JP process and either start, stop, or take no action
+ agent.reconcileProcessStateAndTakeAction(lifecycleController, process, jobDeployment.getJpCmdLine(),
+ jobDeployment.getStandardInfo(), jobDeployment.getProcessMemoryAssignment(), jobDeployment.getJobId());
+ }
}
}
}