[ 
https://issues.apache.org/jira/browse/YARN-6805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16085658#comment-16085658
 ] 

Shane Kumpf commented on YARN-6805:
-----------------------------------

Thanks for addressing this, [~jlowe].

LGTM less one very minor nit: Missing a space in the not null check below.
{code}
+        String output = e.getOutput();
+        if (output!= null && !e.getOutput().isEmpty()) {
+          builder.append("Shell output: " + output + "\n");
         }
{code}

> NPE in LinuxContainerExecutor due to null PrivilegedOperationException exit 
> code
> --------------------------------------------------------------------------------
>
>                 Key: YARN-6805
>                 URL: https://issues.apache.org/jira/browse/YARN-6805
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 2.8.1
>            Reporter: Jason Lowe
>            Assignee: Jason Lowe
>         Attachments: YARN-6805.001.patch
>
>
> The LinuxContainerExecutor contains a number of code snippets like this:
> {code}
>     } catch (PrivilegedOperationException e) {
>       int exitCode = e.getExitCode();
> {code}
> PrivilegedOperationException#getExitCode can return null if the operation was 
> interrupted, so when the JVM does auto-unboxing on that last line it can NPE 
> if there was no exit code.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to