YARN-2662. TestCgroupsLCEResourcesHandler leaks file descriptors. Contributed by Chris Nauroth.
(cherry picked from commitd3afd730ac
) (cherry picked from commitb81641a310
)
This commit is contained in:
parent
308e336853
commit
281041a57e
|
@ -541,6 +541,8 @@ Release 2.6.0 - UNRELEASED
|
||||||
|
|
||||||
YARN-2649. Fixed TestAMRMRPCNodeUpdates test failure. (Ming Ma via jianhe)
|
YARN-2649. Fixed TestAMRMRPCNodeUpdates test failure. (Ming Ma via jianhe)
|
||||||
|
|
||||||
|
YARN-2662. TestCgroupsLCEResourcesHandler leaks file descriptors. (cnauroth)
|
||||||
|
|
||||||
BREAKDOWN OF YARN-913 SUBTASKS AND RELATED JIRAS
|
BREAKDOWN OF YARN-913 SUBTASKS AND RELATED JIRAS
|
||||||
|
|
||||||
YARN-2652 Add hadoop-yarn-registry package under hadoop-yarn. (stevel)
|
YARN-2652 Add hadoop-yarn-registry package under hadoop-yarn. (stevel)
|
||||||
|
|
|
@ -165,10 +165,11 @@ public class TestCgroupsLCEResourcesHandler {
|
||||||
|
|
||||||
private int readIntFromFile(File targetFile) throws IOException {
|
private int readIntFromFile(File targetFile) throws IOException {
|
||||||
Scanner scanner = new Scanner(targetFile);
|
Scanner scanner = new Scanner(targetFile);
|
||||||
if (scanner.hasNextInt()) {
|
try {
|
||||||
return scanner.nextInt();
|
return scanner.hasNextInt() ? scanner.nextInt() : -1;
|
||||||
|
} finally {
|
||||||
|
scanner.close();
|
||||||
}
|
}
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue