}
private void updateLocations(IJobDriver jobDriver) {
String location = "updateLocations";
try {
IDuccWorkJob job = jobDriver.getJob();
DuccId jobDuccId = job.getDuccId();
ArrayList<WorkItem> removeList = new ArrayList<WorkItem>();
duccOut.trace(location, jobDuccId, "pending map size:"+casLocationPendingMap.size());
Iterator<Entry<String, NP>> iterator = casLocationPendingMap.entrySet().iterator();
duccOut.trace(location, jobDuccId, iterator.hasNext());
while(iterator.hasNext()) {
Entry<String, NP> entry = iterator.next();
String casId = entry.getKey();
WorkItem workItem = casWorkItemMap.get(casId);
String seqNo = null;
if(workItem != null) {
seqNo = ""+workItem.getSeqNo();
}
String nodeIP = entry.getValue().getNodeIP();
if(nodeIP == null) {
DuccId processDuccId = null;
duccOut.trace(location, jobDuccId, processDuccId, "seqNo:"+seqNo+" "+"casId:"+casId);
continue;
}
String PID = entry.getValue().getPID();
if(PID == null) {
DuccId processDuccId = null;
duccOut.trace(location, jobDuccId, processDuccId, "seqNo:"+seqNo+" "+"casId:"+casId+" "+"node:"+nodeIP);
continue;
}
DuccId processDuccId = null;
IDuccProcess process = job.getProcessMap().findProcess(nodeIP, PID);
if(process != null) {
processDuccId = process.getDuccId();
jobDriver.accountingWorkItemIsDispatch(processDuccId);
workItem.setProcessId(processDuccId);
removeList.add(workItem);