throw new IOException(e);
}
String queue = job.getProfile().getQueueName();
if (!(queueManager.getQueues().contains(queue))) {
new CleanupQueue().addToQueue(new PathDeletionContext(
FileSystem.get(conf),
getSystemDirectoryForJob(jobId).toUri().getPath()));
job.fail();
if (userFileForJob != null) {
userFileForJob.delete();
}
throw new IOException("Queue \"" + queue + "\" does not exist");
}
// The task scheduler should validate the job configuration
taskScheduler.checkJob(job);
// check for access
try {
checkAccess(job, QueueManager.QueueOperation.SUBMIT_JOB);
} catch (IOException ioe) {
LOG.warn("Access denied for user " + job.getJobConf().getUser() +
". Ignoring job " + jobId, ioe);
job.fail();
if (userFileForJob != null) {
userFileForJob.delete();
}
new CleanupQueue().addToQueue(new PathDeletionContext(
FileSystem.get(conf),
getSystemDirectoryForJob(jobId).toUri().getPath()));
throw ioe;
}
// Check the job if it cannot run in the cluster because of invalid memory
// requirements.
try {
checkMemoryRequirements(job);
} catch (IOException ioe) {
new CleanupQueue().addToQueue(new PathDeletionContext(
FileSystem.get(conf),
getSystemDirectoryForJob(jobId).toUri().getPath()));
throw ioe;
}