[
https://issues.apache.org/jira/browse/YARN-4976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15250767#comment-15250767
]
Daniel Templeton commented on YARN-4976:
----------------------------------------
Thanks, [~giovanni.fumarola]. I should have taken a closer look the first
time. Can we make
{code}
String value =
(environment.get(key) == null) ? "" : environment.get(key);
{code}
be
{code}
String value = environment.get(key);
if (value == null) {
value = "";
}
{code}
It saves a method call in the common case and avoids the ternary operator,
which is cute but not as easy to read.
Did you actually see this issue in live cluster? I just ran through the code
and couldn't find anywhere that an env map was passed to the CLC without
scrubbing it. A wayward YARN app could do it, but I'm curious how you tripped
over the issue.
> Missing NullPointer check in ContainerLaunchContextPBImpl causes RM to die
> --------------------------------------------------------------------------
>
> Key: YARN-4976
> URL: https://issues.apache.org/jira/browse/YARN-4976
> Project: Hadoop YARN
> Issue Type: Bug
> Components: resourcemanager
> Reporter: Giovanni Matteo Fumarola
> Assignee: Giovanni Matteo Fumarola
> Attachments: YARN-4976.v0.patch
>
>
> The client can set a null value for any env variable.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)