cbList[index].append("<td>");
cbList[index].append(process.getResourceState());
cbList[index].append("</td>");
// Reason:scheduler
index++; // jp.06
IDuccProcess jp = process;
switch(jp.getProcessState()) {
case Starting:
case Initializing:
case Running:
cbList[index].append("<td>");
cbList[index].append("</td>");
break;
default:
switch(sType) {
default:
ProcessDeallocationType deallocationType = process.getProcessDeallocationType();
cbList[index].append("<td>");
switch(deallocationType) {
case Undefined:
break;
default:
cbList[index].append(process.getProcessDeallocationType());
break;
}
cbList[index].append("</td>");
break;
}
break;
}
// State:agent
index++; // jp.07
cbList[index].append("<td>");
cbList[index].append(process.getProcessState());
cbList[index].append("</td>");
// Reason:agent
index++; // jp.08
cbList[index].append("<td>");
String agentReason = process.getReasonForStoppingProcess();
if(agentReason != null) {
if(agentReason.equalsIgnoreCase(ReasonForStoppingProcess.KilledByDucc.toString())) {
agentReason = "<div title=\""+ReasonForStoppingProcess.KilledByDucc.toString()+"\">Discontinued</div>";
}
else if(agentReason.equalsIgnoreCase(ReasonForStoppingProcess.Other.toString())) {
agentReason = "<div title=\""+ReasonForStoppingProcess.Other.toString()+"\">Discontinued</div>";
}
cbList[index].append(agentReason);
}
cbList[index].append("</td>");
// Exit
index++; // jp.09
cbList[index].append("<td>");
switch(process.getProcessState()) {
case Stopped:
case Failed:
case FailedInitialization:
case InitializationTimeout:
case Killed:
int code = process.getProcessExitCode();
if(LinuxSignals.isSignal(code)) {
Signal signal = LinuxSignals.lookup(code);
if(signal != null) {
cbList[index].append(signal.name()+"("+signal.number()+")");
}
else {
cbList[index].append("UnknownSignal"+"("+LinuxSignals.getValue(code)+")");
}
}
else {
cbList[index].append("ExitCode"+"="+code);
}
break;
default:
break;
}
cbList[index].append("</td>");
// Time:init
index++; // jp.10
switch(sType) {
case MR:
break;
default:
StringBuffer loadme = new StringBuffer();
String initTime = "00";
String itd0 = "<td align=\"right\">";
String itd1 = "</td>";
String isp0 = "<span>";
String isp1 = "</span>";
try {
TimeWindow t = (TimeWindow) process.getTimeWindowInit();
if(t != null) {
long now = System.currentTimeMillis();
String tS = t.getStart(""+now);
String tE = t.getEnd(""+now);
initTime = getDuration(jobid,tE,tS);
if(t.isEstimated()) {
isp0 = "<span title=\"estimated\" class=\"health_green\">";
}
else {
isp0 = "<span class=\"health_black\">";
}
}
boolean cluetips_disabled = true;
if(cluetips_disabled) {
if(!initTime.equals("00")) {
String p_idJob = pname_idJob+"="+job.getDuccId().getFriendly();
String p_idPro = pname_idPro+"="+process.getDuccId().getFriendly();
initTime = "<a href=\""+duccUimaInitializationReport+"?"+p_idJob+"&"+p_idPro+"\" onclick=\"var newWin = window.open(this.href,'child','height=600,width=475,scrollbars'); newWin.focus(); return false;\">"+initTime+"</a>";
loadme.append("");
}
}
else {
List<IUimaPipelineAEComponent> upcList = jp.getUimaPipelineComponents();
if(upcList != null) {
if(!upcList.isEmpty()) {
String id = ""+process.getDuccId().getFriendly();
initTime = "<a class=\"classLoad\" title=\""+id+"\" href=\"#loadme"+id+"\" rel=\"#loadme"+id+"\">"+initTime+"</a>";
loadme.append("<div id=\"loadme"+id+"\">");