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 2016/01/29 20:02:43 UTC
svn commit: r1727623 -
/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java
Author: degenaro
Date: Fri Jan 29 19:02:43 2016
New Revision: 1727623
URL: http://svn.apache.org/viewvc?rev=1727623&view=rev
Log:
UIMA-4775 DUCC Resource Manager (RM) NPE in JobManagerConverter (during mega test)
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java?rev=1727623&r1=1727622&r2=1727623&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java Fri Jan 29 19:02:43 2016
@@ -725,21 +725,26 @@ public class JobManagerConverter
Share s = scheduler.getShare(p.getDuccId());
- long mem = p.getResidentMemory();
- long investment = p.getWiMillisInvestment();
- ProcessState state = p.getProcessState();
- String pid = p.getPID();
-
- logger.info(methodName, jobid, "New process ", s.toString(), mem, state, pid);
- if ( ! s.update(jobid, mem, investment, state, p.getTimeWindowInit(), pid) ) {
- // TODO: probably change to just a warning and cancel the job - for now I want an attention-getter
- throw new SchedulingException(jobid, "Process assignemnt arrives for share " + s.toString() +
- " but jobid " + jobid + " does not match share " + s.getJob().getId());
+ if(s != null) {
+ long mem = p.getResidentMemory();
+ long investment = p.getWiMillisInvestment();
+ ProcessState state = p.getProcessState();
+ String pid = p.getPID();
+
+ logger.info(methodName, jobid, "New process ", s.toString(), mem, state, pid);
+ if ( ! s.update(jobid, mem, investment, state, p.getTimeWindowInit(), pid) ) {
+ // TODO: probably change to just a warning and cancel the job - for now I want an attention-getter
+ throw new SchedulingException(jobid, "Process assignemnt arrives for share " + s.toString() +
+ " but jobid " + jobid + " does not match share " + s.getJob().getId());
+ }
+ //scheduler.signalGrowth(jobid, s);
+ // sadly, the pid is almost always null here
+ //logger.info(methodName, jobid,
+ // "New process arrives for share", s.toString(), "PID", pid);
+ }
+ else {
+ logger.warn(methodName, jobid, p.getDuccId(), "share not found?");
}
- //scheduler.signalGrowth(jobid, s);
- // sadly, the pid is almost always null here
- //logger.info(methodName, jobid,
- // "New process arrives for share", s.toString(), "PID", pid);
}
// gone stuff in in the right side of the map
@@ -809,7 +814,7 @@ public class JobManagerConverter
}
if ( pl.getProcessState() != pr.getProcessState() ) {
logger.info(methodName, jobid,
- String.format("Process %5s", pl.getPID()), sl.toString(),
+ String.format("Process %5s", pl.getPID()), shareL,
"State:", pr.getProcessState(), "->", pl.getProcessState(),
getElapsedTime(pr.getTimeWindowInit()), getElapsedTime(pr.getTimeWindowRun()));
}