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

Zhijie Shen commented on YARN-475:
----------------------------------

ApplicationConstants.AM_APP_ATTEMPT_ID_ENV seems to be still used by unmanaged 
AM. See the following code in UnmanagedAMLauncher.

{code}
    if(!setClasspath && classpath!=null) {
      envAMList.add("CLASSPATH="+classpath);
    }
        
    envAMList.add(ApplicationConstants.AM_APP_ATTEMPT_ID_ENV + "=" + attemptId);

    String[] envAM = new String[envAMList.size()];
    Process amProc = Runtime.getRuntime().exec(amCmd, envAMList.toArray(envAM));
{code}

Also, it is still checked in the AM of distributed shell.

{code}
    if (envs.containsKey(ApplicationConstants.AM_APP_ATTEMPT_ID_ENV)) {
      appAttemptID = ConverterUtils.toApplicationAttemptId(envs
          .get(ApplicationConstants.AM_APP_ATTEMPT_ID_ENV));
    }
{code}
                
> Remove ApplicationConstants.AM_APP_ATTEMPT_ID_ENV as it is no longer set in 
> an AM's environment
> -----------------------------------------------------------------------------------------------
>
>                 Key: YARN-475
>                 URL: https://issues.apache.org/jira/browse/YARN-475
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Hitesh Shah
>
> AMs are expected to use ApplicationConstants.AM_CONTAINER_ID_ENV and derive 
> the application attempt id from the container id. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to