You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2015/04/17 19:55:34 UTC
svn commit: r1674368 -
/uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/ProcessAccounting.java
Author: degenaro
Date: Fri Apr 17 17:55:34 2015
New Revision: 1674368
URL: http://svn.apache.org/r1674368
Log:
UIMA-4353 DUCC Orchestrator (OR) should disregard inventory for Stopped processes
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/ProcessAccounting.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/ProcessAccounting.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/ProcessAccounting.java?rev=1674368&r1=1674367&r2=1674368&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/ProcessAccounting.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/ProcessAccounting.java Fri Apr 17 17:55:34 2015
@@ -433,6 +433,7 @@ public class ProcessAccounting {
public void copyInventoryProcessState(IDuccWorkJob job, IDuccProcess inventoryProcess, IDuccProcess process) {
String methodName = "copyInventoryProcessState";
logger.trace(methodName, job.getDuccId(), messages.fetch("enter"));
+
if(!compare(inventoryProcess.getProcessState().toString(),process.getProcessState().toString())) {
switch((JobState)job.getStateObject()) {
//case Initializing:
@@ -666,46 +667,52 @@ public class ProcessAccounting {
}
}
if(process != null) {
- // PID
- copyInventoryPID(job, inventoryProcess, process);
- // Scheduler State
- setResourceStateAndReason(job, inventoryProcess, process);
- // Process State
- copyInventoryProcessState(job, inventoryProcess, process);
- // Process Reason
- copyReasonForStoppingProcess(job, inventoryProcess, process);
- // Process Exit code
- copyProcessExitCode(job, inventoryProcess, process);
- // Process Init & Run times
- updateProcessTime(job, inventoryProcess, process);
- // Process Initialization State
- switch(inventoryProcess.getProcessState()) {
- case Running:
- process.setInitialized();
- if(job != null) {
- switch(job.getDuccType()) {
- case Service:
- switch(job.getJobState()) {
- case Initializing:
- stateJobAccounting.stateChange(job, JobState.Running);
+ if(process.isComplete()) {
+ logger.trace(methodName, jobId, process.getDuccId(), "finalized");
+ }
+ else {
+ logger.trace(methodName, jobId, process.getDuccId(), "active");
+ // PID
+ copyInventoryPID(job, inventoryProcess, process);
+ // Scheduler State
+ setResourceStateAndReason(job, inventoryProcess, process);
+ // Process State
+ copyInventoryProcessState(job, inventoryProcess, process);
+ // Process Reason
+ copyReasonForStoppingProcess(job, inventoryProcess, process);
+ // Process Exit code
+ copyProcessExitCode(job, inventoryProcess, process);
+ // Process Init & Run times
+ updateProcessTime(job, inventoryProcess, process);
+ // Process Initialization State
+ switch(inventoryProcess.getProcessState()) {
+ case Running:
+ process.setInitialized();
+ if(job != null) {
+ switch(job.getDuccType()) {
+ case Service:
+ switch(job.getJobState()) {
+ case Initializing:
+ stateJobAccounting.stateChange(job, JobState.Running);
+ break;
+ }
break;
}
- break;
}
}
+ // Process Pipeline Components State
+ copyUimaPipelineComponentsState(job, inventoryProcess, process);
+ // Process Swap Usage
+ copyInventorySwapUsage(job, inventoryProcess, process);
+ // Process Major Faults
+ copyInventoryMajorFaults(job, inventoryProcess, process);
+ // Process Rss
+ copyInventoryRss(job, inventoryProcess, process);
+ // Process GC Stats
+ copyInventoryGCStats(job, inventoryProcess, process);
+ // Process CPU Time
+ copyInventoryCpuTime(job, inventoryProcess, process);
}
- // Process Pipeline Components State
- copyUimaPipelineComponentsState(job, inventoryProcess, process);
- // Process Swap Usage
- copyInventorySwapUsage(job, inventoryProcess, process);
- // Process Major Faults
- copyInventoryMajorFaults(job, inventoryProcess, process);
- // Process Rss
- copyInventoryRss(job, inventoryProcess, process);
- // Process GC Stats
- copyInventoryGCStats(job, inventoryProcess, process);
- // Process CPU Time
- copyInventoryCpuTime(job, inventoryProcess, process);
}
else {
logger.warn(methodName, jobId, processId, messages.fetch("process not found job's process table"));