[ 
https://issues.apache.org/jira/browse/YARN-3768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gera Shegalov updated YARN-3768:
--------------------------------
    Description: 
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.

{code}
java.lang.ArrayIndexOutOfBoundsException: 1
        at org.apache.hadoop.yarn.util.Apps.setEnvFromInputString(Apps.java:80)
{code}

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

  was:
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


> ArrayIndexOutOfBoundsException with empty environment variables
> ---------------------------------------------------------------
>
>                 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, 
> YARN-3768.002.patch, YARN-3768.003.patch, YARN-3768.004.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.
> {code}
> java.lang.ArrayIndexOutOfBoundsException: 1
>       at org.apache.hadoop.yarn.util.Apps.setEnvFromInputString(Apps.java:80)
> {code}
> 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