public void releaseJob(JobID jobId, ExecutionAttemptID executionId) { checkNotNull(jobId); synchronized (lock) { Set<ExecutionAttemptID> jobRefCounter = jobRefHolders.get(jobId); if (jobRefCounter == null || jobRefCounter.isEmpty()) { LOG.warn("improper use of releaseJob() without a matching number of createTmpFiles() calls for jobId " + jobId); return; } jobRefCounter.remove(executionId); if (jobRefCounter.isEmpty()) { executorService.schedule(new DeleteProcess(jobId), cleanupInterval, TimeUnit.MILLISECONDS); } } }
public void releaseJob(JobID jobId, ExecutionAttemptID executionId) { checkNotNull(jobId); synchronized (lock) { Set<ExecutionAttemptID> jobRefCounter = jobRefHolders.get(jobId); if (jobRefCounter == null || jobRefCounter.isEmpty()) { return; } jobRefCounter.remove(executionId); if (jobRefCounter.isEmpty()) { executorService.schedule(new DeleteProcess(jobId), cleanupInterval, TimeUnit.MILLISECONDS); } } }
public void releaseJob(JobID jobId, ExecutionAttemptID executionId) { checkNotNull(jobId); synchronized (lock) { Set<ExecutionAttemptID> jobRefCounter = jobRefHolders.get(jobId); if (jobRefCounter == null || jobRefCounter.isEmpty()) { return; } jobRefCounter.remove(executionId); if (jobRefCounter.isEmpty()) { executorService.schedule(new DeleteProcess(jobId), cleanupInterval, TimeUnit.MILLISECONDS); } } }
/** * Deletes the local file after a 5 second delay. * * @param name The name under which the file is registered. * @param jobID The ID of the job for which the file is copied. */ public void deleteTmpFile(String name, JobID jobID) { DeleteProcess dp = new DeleteProcess(lock, entries, name, jobID); executorService.schedule(dp, 5000L, TimeUnit.MILLISECONDS); }