[
https://issues.apache.org/jira/browse/MAPREDUCE-2243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082057#comment-13082057
]
Hudson commented on MAPREDUCE-2243:
-----------------------------------
Integrated in Hadoop-Mapreduce-trunk-Commit #760 (See
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/760/])
MAPREDUCE-2243. Close streams propely in a finally-block to avoid leakage
in CompletedJobStatusStore, TaskLog, EventWriter and TotalOrderPartitioner.
Contributed by Devaraj K
szetszwo :
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152787
Files :
* /hadoop/common/trunk/mapreduce/CHANGES.txt
*
/hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/lib/partition/TotalOrderPartitioner.java
* /hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/TaskLog.java
*
/hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapred/CompletedJobStatusStore.java
*
/hadoop/common/trunk/mapreduce/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java
> Close all the file streams propely in a finally block to avoid their leakage.
> -----------------------------------------------------------------------------
>
> Key: MAPREDUCE-2243
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-2243
> Project: Hadoop Map/Reduce
> Issue Type: Improvement
> Components: jobtracker, tasktracker
> Affects Versions: 0.22.0, 0.23.0
> Environment: NA
> Reporter: Bhallamudi Venkata Siva Kamesh
> Assignee: Devaraj K
> Priority: Minor
> Fix For: 0.23.0
>
> Attachments: MAPREDUCE-2243-1.patch, MAPREDUCE-2243-2.patch,
> MAPREDUCE-2243-3.patch, MAPREDUCE-2243-4.patch, MAPREDUCE-2243.patch
>
> Original Estimate: 72h
> Remaining Estimate: 72h
>
> In the following classes streams should be closed in finally block to avoid
> their leakage in the exceptional cases.
> CompletedJobStatusStore.java
> ------------------------------------------
> dataOut.writeInt(events.length);
> for (TaskCompletionEvent event : events) {
> event.write(dataOut);
> }
> dataOut.close() ;
> EventWriter.java
> ----------------------
> encoder.flush();
> out.close();
> MapTask.java
> -------------------
> splitMetaInfo.write(out);
> out.close();
> TaskLog
> ------------
> 1) str = fis.readLine();
> fis.close();
> 2) dos.writeBytes(Long.toString(new File(logLocation, LogName.SYSLOG
> .toString()).length() - prevLogLength) + "\n");
> dos.close();
> TotalOrderPartitioner.java
> -----------------------------------
> while (reader.next(key, value)) {
> parts.add(key);
> key = ReflectionUtils.newInstance(keyClass, conf);
> }
> reader.close();
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira