*/
public OrchestratorStateDuccEvent getState() {
String methodName = "getState";
logger.trace(methodName, null, messages.fetch("enter"));
OrchestratorStateDuccEvent orchestratorStateDuccEvent = new OrchestratorStateDuccEvent();
try {
long t0 = System.currentTimeMillis();
DuccWorkMap workMapCopy = workMap.deepCopy();
long t1 = System.currentTimeMillis();
long elapsed = t1 - t0;
if(elapsed > Constants.SYNC_LIMIT) {
logger.debug(methodName, null, "elapsed msecs: "+elapsed);
}
int activeJobs = workMapCopy.getJobCount();
int activeReservations = workMapCopy.getReservationCount();
int activeServices = workMapCopy.getServiceCount();
logger.debug(methodName, null, messages.fetch("publishing state")+" "+
messages.fetchLabel("active job count")+activeJobs
+" "+
messages.fetchLabel("active reservation count")+activeReservations
+" "+
messages.fetchLabel("active service count")+activeServices
);
int jobDriverNodeCount = hostManager.nodes();
workMapCopy.setJobDriverNodeCount(jobDriverNodeCount);
orchestratorStateDuccEvent.setWorkMap(workMapCopy);
//stateManager.prune(workMapCopy);
//healthMonitor.cancelNonViableJobs();
//mqReaper.removeUnusedJdQueues(workMapCopy);
}
catch(Throwable t) {