String methodName = "startService";
logger.trace(methodName, null, messages.fetch("enter"));
try {
OrchestratorHelper.assignDefaults(duccEvent);
JobRequestProperties properties = (JobRequestProperties) duccEvent.getProperties();
NodeIdentity nodeIdentity = hostManager.getNode();
if(!isSignatureValid(properties)) {
String error_message = messages.fetch(" type=authentication error, text=signature not valid.");
logger.error(methodName, null, error_message);
submitError(properties, error_message);
}
else if(nodeIdentity == null) {
String error_message = messages.fetch(" type=system error, text=job driver node unavailable.");
logger.error(methodName, null, error_message);
submitError(properties, error_message);
}
else if(!SystemState.getInstance().isAcceptJobs()) {
String error_message = messages.fetch(" type=system error, text=system is not accepting new work at this time.");
logger.error(methodName, null, error_message);
submitError(properties, error_message);
}
else {
logger.debug(methodName, null, messages.fetch("job driver host")+" "+messages.fetchLabel("IP")+nodeIdentity.getIp()+" "+messages.fetchLabel("name")+nodeIdentity.getName());
if(Validate.request(duccEvent)) {
DuccWorkJob duccWorkJob = jobFactory.create(common,properties);
long t0 = System.currentTimeMillis();
workMap.addDuccWork(duccWorkJob);
long t1 = System.currentTimeMillis();