Package org.apache.hadoop.mapred.CleanupQueue

Examples of org.apache.hadoop.mapred.CleanupQueue.PathDeletionContext


      // JobClient always creates a new directory with job files
      // so we remove that directory to cleanup
      // Delete temp dfs dirs created if any, like in case of
      // speculative exn of reduces.
      Path tempDir = jobtracker.getSystemDirectoryForJob(getJobID());
      new CleanupQueue().addToQueue(new PathDeletionContext(
          FileSystem.get(conf), tempDir.toUri().getPath()));
    } catch (IOException e) {
      LOG.warn("Error cleaning up "+profile.getJobID()+": "+e);
    }
View Full Code Here


        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;
      }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapred.CleanupQueue.PathDeletionContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.