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

zhihai xu commented on YARN-3768:
---------------------------------

Hi [~xgong], thanks for the review. I uploaded a new patch YARN-3768.001.patch, 
in which I add a test case to verify bad environment variables are skipped.
About keeping trailing empty strings, it will depend on whether an Environment 
Variable with empty value is a valid use case.
MAPREDUCE-5965 adds option to configure Environment Variable with empty value 
if stream.jobconf.truncate.limit is 0.
It looks like an Environment Variable with empty value may be a valid use case.

> Index out of range exception with environment variables without values
> ----------------------------------------------------------------------
>
>                 Key: YARN-3768
>                 URL: https://issues.apache.org/jira/browse/YARN-3768
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: yarn
>    Affects Versions: 2.5.0
>            Reporter: Joe Ferner
>            Assignee: zhihai xu
>         Attachments: YARN-3768.000.patch, YARN-3768.001.patch
>
>
> Looking at line 80 of org.apache.hadoop.yarn.util.Apps an index out of range 
> exception occurs if an environment variable is encountered without a value.
> I believe this occurs because java will not return empty strings from the 
> split method. Similar to this 
> http://stackoverflow.com/questions/14602062/java-string-split-removed-empty-values



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to