[ https://issues.apache.org/jira/browse/YARN-1942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14524026#comment-14524026 ]
Xuan Gong commented on YARN-1942: --------------------------------- Thanks for the patch, [~leftnoteasy] Some comments: * can we remove those from ConverterUtils.java {code} public static final String APPLICATION_PREFIX = "application"; public static final String CONTAINER_PREFIX = "container"; public static final String APPLICATION_ATTEMPT_PREFIX = "appattempt"; {code} * can we change the variable to all capital case ? such does for ApplicationId and containerId {code} public static final String appAttemptIdStrPrefix = "appattempt_"; {code} * Could we add some testcases for it ? > Many of ConverterUtils methods need to have public interfaces > ------------------------------------------------------------- > > Key: YARN-1942 > URL: https://issues.apache.org/jira/browse/YARN-1942 > Project: Hadoop YARN > Issue Type: Sub-task > Components: api > Affects Versions: 2.4.0 > Reporter: Thomas Graves > Assignee: Wangda Tan > Priority: Critical > Attachments: YARN-1942.1.patch, YARN-1942.2.patch > > > ConverterUtils has a bunch of functions that are useful to application > masters. It should either be made public or we make some of the utilities > in it public or we provide other external apis for application masters to > use. Note that distributedshell and MR are both using these interfaces. > For instance the main use case I see right now is for getting the application > attempt id within the appmaster: > String containerIdStr = > System.getenv(Environment.CONTAINER_ID.name()); > ConverterUtils.toContainerId > ContainerId containerId = ConverterUtils.toContainerId(containerIdStr); > ApplicationAttemptId applicationAttemptId = > containerId.getApplicationAttemptId(); > I don't see any other way for the application master to get this information. > If there is please let me know. -- This message was sent by Atlassian JIRA (v6.3.4#6332)