YARN-3594. WintuilsProcessStubExecutor.startStreamReader leaks streams. Contributed by Lars Francke.
This commit is contained in:
parent
0c6638c2ea
commit
132d909d4a
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue