if (userJobDir.exists()) {
final String msg = "User staging directory already exists";
this.jobService.setJobStatus(this.job.getId(), JobStatus.FAILED, msg);
LOG.error(this.job.getStatusMsg() + ": "
+ userJobDir.getAbsolutePath());
throw new GenieServerException(msg);
}
// create the working directory
final boolean resMkDir = userJobDir.mkdirs();
if (!resMkDir) {
String msg = "User staging directory can't be created";
this.jobService.setJobStatus(this.job.getId(), JobStatus.FAILED, msg);
LOG.error(this.job.getStatusMsg() + ": "
+ userJobDir.getAbsolutePath());
throw new GenieServerException(msg);
}
return userJobDir;
}