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

Rohith Sharma K S commented on MAPREDUCE-6889:
----------------------------------------------

Pseudo code to use this API would be 
{code}
// Create a new Job
Job job = Job.getInstance();
job.setJarByClass(MyJob.class);

// Specify various job-specific parameters     
job.setJobName("myjob");

job.setInputPath(new Path("in"));
job.setOutputPath(new Path("out"));

job.setMapperClass(MyJob.MyMapper.class);
job.setReducerClass(MyJob.MyReducer.class);

// Submit the job, then poll for progress until the job is complete
job.waitForCompletion(true);

// Close the Job
job.close();
{code} 

> FileSystem leak when Job#submit() used when ATS1.5 enabled
> ----------------------------------------------------------
>
>                 Key: MAPREDUCE-6889
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6889
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Rohith Sharma K S
>            Assignee: Rohith Sharma K S
>         Attachments: MAPREDUCE-6889.0001.patch
>
>
> ATS1.5 uses FileSystemTimelineWriter which creates FS object on every writer 
> initialization. If writer is not closed, then there is possibility of OOM see 
> YARN-5438 fixes closing FS object. 
> TimelineClient is used by YarnClient. So all the user who uses YarnClient 
> with ATS1.5 need to stop service properly. Otherwise there is big chance of 
> FS object leak. 
> Of course MR uses YARN client submit job. If MR do not stop YarnClient then 
> there is FS object leak. 
> JobClient provides a API to stop all these service using *JobClient#close*. 
> But many MR clients uses *Job* object to submit a job. But  do not stop 
> started services by default. So, Job class should provide a API to close the 
> services very similar to JobClient#close. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to