switch ( w.getDuccType() ) {
case Job:
case Service:
{
IDuccWorkExecutable de = (IDuccWorkExecutable) w;
IDuccProcessMap pm = de.getProcessMap();
logger.info(methodName, w.getDuccId(), "Receive:", prefix, w.getDuccType(), w.getStateObject(), "processes[", pm.size(), "] Completed:", w.isCompleted());
for ( IDuccProcess proc : pm.values() ) {
String pid = proc.getPID();
ProcessState state = proc.getProcessState();
Node n = proc.getNode();
if ( n == null ) {
logger.info(methodName, w.getDuccId(), " Process[", pid, "] state [", state, "] is complete[", proc.isComplete(), "] Node [N/A] mem[N/A");
} else {
long mem = n .getNodeMetrics().getNodeMemory().getMemTotal();
logger.info(methodName, w.getDuccId(),
" Process[", pid,
"] state [", state,
"] is complete [", proc.isComplete(),
"] Node [", n.getNodeIdentity().getName() + "." + proc.getDuccId(),
"] mem [", mem, "]");
logger.info(methodName, w.getDuccId(), " Recover node[", n.getNodeIdentity().getName());
//
// Note, not ignoring dead processes belonging to live jobs. Is this best or should we be
// more conservative and not use nodes that we don't know 100% for sure are ok?
//
nodes.put(n, n);
}
}
}
break;
// case Service:
// {
// IDuccWorkExecutable de = (IDuccWorkExecutable) w;
// IDuccProcessMap pm = de.getProcessMap();
// logger.info(methodName, w.getDuccId(), prefix, w.getDuccType(), "processes[", pm.size(), "].");
// }
// break;
case Reservation:
{
IDuccWorkReservation de = (IDuccWorkReservation) w;
IDuccReservationMap rm = de.getReservationMap();
logger.info(methodName, w.getDuccId(), "Receive:", prefix, w.getDuccType(), w.getStateObject(), "processes[", rm.size(), "] Completed:", w.isCompleted());
for ( IDuccReservation r: rm.values()) {
Node n = r.getNode();