YARN-1870. FileInputStream is not closed in ProcfsBasedProcessTree#constructProcessSMAPInfo. (Fengdong Yu via junping_du)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1588324 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ad9edb02b9
commit
36ed8c74ea
|
@ -53,6 +53,9 @@ Release 2.5.0 - UNRELEASED
|
|||
YARN-1923. Make Fair Scheduler resource ratio calculations terminate faster
|
||||
(Anubhav Dhoot via Sandy Ryza)
|
||||
|
||||
YARN-1870. FileInputStream is not closed in ProcfsBasedProcessTree#constructProcessSMAPInfo.
|
||||
(Fengdong Yu via junping_du)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.hadoop.yarn.util;
|
|||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
@ -736,7 +735,7 @@ public class ProcfsBasedProcessTree extends ResourceCalculatorProcessTree {
|
|||
fReader = new FileReader(file);
|
||||
in = new BufferedReader(fReader);
|
||||
ProcessSmapMemoryInfo memoryMappingInfo = null;
|
||||
List<String> lines = IOUtils.readLines(new FileInputStream(file));
|
||||
List<String> lines = IOUtils.readLines(in);
|
||||
for (String line : lines) {
|
||||
line = line.trim();
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue