[ 
https://issues.apache.org/jira/browse/MAPREDUCE-5351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13698228#comment-13698228
 ] 

Sandy Ryza commented on MAPREDUCE-5351:
---------------------------------------

In JIP.cleanupJob:
{code}
        Path tempDir = jobtracker.getSystemDirectoryForJob(getJobID());
        CleanupQueue.getInstance().addToQueue(
            new PathDeletionContext(tempDir, conf));

        // delete the staging area for the job and cancel delegation token
        String jobTempDir = conf.get("mapreduce.job.dir");
        if (jobTempDir != null && conf.getKeepTaskFilesPattern() == null &&
            !conf.getKeepFailedTaskFiles()) {
          Path jobTempDirPath = new Path(jobTempDir);
          tempDirFs = jobTempDirPath.getFileSystem(conf);
          CleanupQueue.getInstance().addToQueue(
              new PathDeletionContext(jobTempDirPath, conf, userUGI, jobId));
        }
{code}
The CleanupQueue is used twice, once with the UGI set and once without.
                
> JobTracker memory leak caused by CleanupQueue reopening FileSystem
> ------------------------------------------------------------------
>
>                 Key: MAPREDUCE-5351
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5351
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: jobtracker
>    Affects Versions: 1.1.2
>            Reporter: Sandy Ryza
>            Assignee: Sandy Ryza
>            Priority: Critical
>             Fix For: 1.2.1
>
>         Attachments: MAPREDUCE-5351-1.patch, MAPREDUCE-5351-2.patch, 
> MAPREDUCE-5351-addendum.patch, MAPREDUCE-5351.patch
>
>
> When a job is completed, closeAllForUGI is called to close all the cached 
> FileSystems in the FileSystem cache.  However, the CleanupQueue may run after 
> this occurs and call FileSystem.get() to delete the staging directory, adding 
> a FileSystem to the cache that will never be closed.
> People on the user-list have reported this causing their JobTrackers to OOME 
> every two weeks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to