diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 59d6ee649a3..c98bfe3be82 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -256,6 +256,9 @@ Release 2.8.0 - UNRELEASED YARN-3684. Changed ContainerExecutor's primary lifecycle methods to use a more extensible mechanism of context objects. (Sidharta Seethana via vinodkv) + YARN-3594. WintuilsProcessStubExecutor.startStreamReader leaks streams. + (Lars Francke via junping_du) + OPTIMIZATIONS YARN-3339. TestDockerContainerExecutor should pull a single image and not diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/WindowsSecureContainerExecutor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/WindowsSecureContainerExecutor.java index 0aa9d0357d1..fd2e31b7b48 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/WindowsSecureContainerExecutor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/WindowsSecureContainerExecutor.java @@ -501,17 +501,14 @@ public class WindowsSecureContainerExecutor extends DefaultContainerExecutor { @Override public void run() { - try - { - BufferedReader lines = new BufferedReader( - new InputStreamReader(stream, Charset.forName("UTF-8"))); + try (BufferedReader lines = new BufferedReader( + new InputStreamReader(stream, Charset.forName("UTF-8")))) { char[] buf = new char[512]; int nRead; while ((nRead = lines.read(buf, 0, buf.length)) > 0) { output.append(buf, 0, nRead); } - } - catch(Throwable t) { + } catch (Throwable t) { LOG.error("Error occured reading the process stdout", t); } }