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

ASF GitHub Bot commented on YARN-3768:
--------------------------------------

Github user bellemare commented on the issue:

    https://github.com/apache/incubator-predictionio/issues/337
  
    Ah geez, I realize now that I may have made a mistake. 
    ```
    "SPARK_YARN_USER_ENV" -> sys.env.filter(kv => kv._1.startsWith("PIO_")).
    map(kv => s"${kv._1}=${kv._2}").mkString(",")).run())
    
    Note the map: kv => s"${kv._1}=${kv._2}"
    ```
    This indicates that it does INDEED create a key=value pair.... so I must 
have an empty parameter that I am setting, which is a known Yarn bug 
(https://issues.apache.org/jira/browse/YARN-3768). That being said, I could not 
find an empty parameter in my debug logging. Weird.
    
    I'll close this for now, since it does not seem to be the case that my 
reported issue is a bug.


> 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
>             Fix For: 2.8.0, 3.0.0-alpha1
>
>         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)

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

Reply via email to