public void run() { if (LOG.isDebugEnabled()) { LOG.debug(getName() + " started."); } PathDeletionContext context = null; while (true) { try { context = queue.take(); // delete the path. if (!deletePath(context)) { LOG.warn("CleanupThread:Unable to delete path " + context.fullPath); } else if (LOG.isDebugEnabled()) { LOG.debug("DELETED " + context.fullPath); } } catch (InterruptedException t) { LOG.warn("Interrupted deletion of " + context.fullPath); return; } catch (Exception e) { LOG.warn("Error deleting path " + context.fullPath + ": " + e); } } } }
protected void startCleanupThreads() throws IOException { taskCleanupThread.setDaemon(true); taskCleanupThread.start(); logCleanupThread.setDaemon(true); logCleanupThread.start(); directoryCleanupThread = new CleanupQueue(); }
/** * This job's files are no longer needed on this TT, remove them. * * @param rjob * @throws IOException */ void removeJobFiles(String user, JobID jobId) throws IOException { PathDeletionContext[] contexts = buildTaskControllerJobPathDeletionContexts(localFs, getLocalFiles(fConf, ""), jobId, user, taskController); directoryCleanupThread.addToQueue(contexts); }
new CleanupQueue().addToQueue(new PathDeletionContext( FileSystem.get(conf), getSystemDirectoryForJob(jobId).toUri().getPath())); userFileForJob.delete(); new CleanupQueue().addToQueue(new PathDeletionContext( FileSystem.get(conf), getSystemDirectoryForJob(jobId).toUri().getPath())); checkMemoryRequirements(job); } catch (IOException ioe) { new CleanupQueue().addToQueue(new PathDeletionContext( FileSystem.get(conf), getSystemDirectoryForJob(jobId).toUri().getPath()));
new CleanupQueue().addToQueue(new PathDeletionContext( FileSystem.get(conf), tempDir.toUri().getPath())); } catch (IOException e) {
public void run() { if (LOG.isDebugEnabled()) { LOG.debug(getName() + " started."); } PathDeletionContext context = null; while (true) { try { context = queue.take(); // delete the path. if (!deletePath(context)) { LOG.warn("CleanupThread:Unable to delete path " + context.fullPath); } else if (LOG.isDebugEnabled()) { LOG.debug("DELETED " + context.fullPath); } } catch (InterruptedException t) { LOG.warn("Interrupted deletion of " + context.fullPath); return; } catch (Exception e) { LOG.warn("Error deleting path " + context.fullPath + ": " + e); } } } }
new CleanupQueue().addToQueue(new PathDeletionContext( jobtracker.getFileSystem(), tempDir.toUri().getPath())); } catch (IOException e) {
/** * Adds the task's work dir to the cleanup queue of taskTracker for * asynchronous deletion of work dir. * @param tracker taskTracker * @param task the task whose work dir needs to be deleted * @throws IOException */ static void deleteWorkDir(TaskTracker tracker, Task task) throws IOException { tracker.getCleanupThread().addToQueue( TaskTracker.buildTaskControllerTaskPathDeletionContexts( tracker.getLocalFileSystem(), tracker.getLocalFiles(tracker.getJobConf(), ""), task, true /* workDir */, tracker.getTaskController())); }
private void startCleanupThreads() throws IOException { taskCleanupThread.setDaemon(true); taskCleanupThread.start(); directoryCleanupThread = new CleanupQueue(); // start tasklog cleanup thread taskLogCleanupThread.setDaemon(true); taskLogCleanupThread.start(); }
public void run() { if (LOG.isDebugEnabled()) { LOG.debug(getName() + " started."); } PathDeletionContext context = null; while (true) { try { context = queue.take(); // delete the path. if (!deletePath(context)) { LOG.warn("CleanupThread:Unable to delete path " + context.fullPath); } else if (LOG.isDebugEnabled()) { LOG.debug("DELETED " + context.fullPath); } } catch (InterruptedException t) { LOG.warn("Interrupted deletion of " + context.fullPath); return; } catch (Exception e) { LOG.warn("Error deleting path " + context.fullPath + ": " + e); } } } }
getLocalFiles(fConf, ""), task, false/* not workDir */, taskController); directoryCleanupThread.addToQueue(contexts); } else { localFs, getLocalFiles(defaultJobConf, localTaskDir + Path.SEPARATOR + TaskTracker.JOBFILE)); directoryCleanupThread.addToQueue(contexts); getLocalFiles(fConf, ""), task, true /* workDir */, taskController); directoryCleanupThread.addToQueue(contexts);
public void run() { if (LOG.isDebugEnabled()) { LOG.debug(getName() + " started."); } PathDeletionContext context = null; while (true) { try { context = queue.take(); // delete the path. if (!deletePath(context)) { LOG.warn("CleanupThread:Unable to delete path " + context.fullPath); } else if (LOG.isDebugEnabled()) { LOG.debug("DELETED " + context.fullPath); } } catch (InterruptedException t) { LOG.warn("Interrupted deletion of " + context.fullPath); return; } catch (Exception e) { LOG.warn("Error deleting path " + context.fullPath + ": " + e); } } } }
PathDeletionContext[] contexts = buildPathDeletionContexts(localFs, getLocalFiles(fConf, getLocalJobDir(rjob.getJobID().toString()))); directoryCleanupThread.addToQueue(contexts);
public void run() { if (LOG.isDebugEnabled()) { LOG.debug(getName() + " started."); } PathDeletionContext context = null; while (true) { try { context = queue.take(); // delete the path. if (!deletePath(context)) { LOG.warn("CleanupThread:Unable to delete path " + context.fullPath); } else if (LOG.isDebugEnabled()) { LOG.debug("DELETED " + context.fullPath); } } catch (InterruptedException t) { LOG.warn("Interrupted deletion of " + context.fullPath); return; } catch (Exception e) { LOG.warn("Error deleting path " + context.fullPath + ": " + e); } } } }
buildTaskControllerPathDeletionContexts(localFs, getLocalDirs(), task, false/* not workDir */, taskController); directoryCleanupThread.addToQueue(contexts); directoryCleanupThread.addToQueue(contexts); task, true /* workDir */, taskController); directoryCleanupThread.addToQueue(contexts);
public void run() { if (LOG.isDebugEnabled()) { LOG.debug(getName() + " started."); } PathDeletionContext context = null; while (true) { try { context = queue.take(); // delete the path. if (!deletePath(context)) { LOG.warn("CleanupThread:Unable to delete path " + context.fullPath); } else if (LOG.isDebugEnabled()) { LOG.debug("DELETED " + context.fullPath); } } catch (InterruptedException t) { LOG.warn("Interrupted deletion of " + context.fullPath); return; } catch (Exception e) { LOG.warn("Error deleting path " + context.fullPath + ": " + e); } } } }
tracker.directoryCleanupThread.addToQueue( TaskTracker.buildTaskControllerPathDeletionContexts( tracker.getLocalFileSystem(), tracker.getLocalDirs(),