hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From junping...@apache.org
Subject hadoop git commit: YARN-3594. WintuilsProcessStubExecutor.startStreamReader leaks streams. Contributed by Lars Francke. (cherry picked from commit 132d909d4a6509af9e63e24cbb719be10006b6cd)
Date Fri, 22 May 2015 11:04:46 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 658f5cf98 -> 5fb61d71b


YARN-3594. WintuilsProcessStubExecutor.startStreamReader leaks streams. Contributed by Lars
Francke.
(cherry picked from commit 132d909d4a6509af9e63e24cbb719be10006b6cd)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5fb61d71
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5fb61d71
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5fb61d71

Branch: refs/heads/branch-2
Commit: 5fb61d71b1b20af6013461ce7ac38d39367a5346
Parents: 658f5cf
Author: Junping Du <junping_du@apache.org>
Authored: Fri May 22 04:23:25 2015 -0700
Committer: Junping Du <junping_du@apache.org>
Committed: Fri May 22 04:25:18 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                             | 3 +++
 .../server/nodemanager/WindowsSecureContainerExecutor.java  | 9 +++------
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/5fb61d71/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 6924d8a..7ac80ef 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -211,6 +211,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

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5fb61d71/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/WindowsSecureContainerExecutor.java
----------------------------------------------------------------------
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 0aa9d03..fd2e31b 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);
           }
         }


Mime
View raw message