[
https://issues.apache.org/jira/browse/YARN-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13727561#comment-13727561
]
Devaraj K commented on YARN-1007:
---------------------------------
We need to display the containers for an application in web
UI(AppContainersBlock w.r.t YARN-954) and through CLI. As per the History
Reader interface, I don't see any provision to get all the containers for an
application as of now. We also need to display the containers for app
attempt(AppAttemptContainersBlock) in UI.
And I don't understand why we need return Map for these API's. Here Collection
would be enough I feel as ApplicationHistoryData contains ApplicationId. Could
you help me to understand in which case Map is needed?
{code:xml}
/**
* This method returns all Application {@link ApplicationHistoryData}s
*
* @return map {@link ApplicationId, @link ApplicationHistoryData}s.
*/
Map<ApplicationId, ApplicationHistoryData> getAllApplications();
/**
* Application can have multiple application attempts
* {@link ApplicationAttemptHistoryData}. This method returns the all
* {@link ApplicationAttemptHistoryData}s for the Application.
*
* @return all {@link ApplicationAttemptHistoryData}s for the Application.
*/
Map<ApplicationAttemptId, ApplicationAttemptHistoryData>
getApplicationAttempts(
ApplicationId appId);
{code}
> [YARN-321] Enhance History Reader interface for Containers
> ----------------------------------------------------------
>
> Key: YARN-1007
> URL: https://issues.apache.org/jira/browse/YARN-1007
> Project: Hadoop YARN
> Issue Type: Sub-task
> Affects Versions: YARN-321
> Reporter: Devaraj K
> Assignee: Mayank Bansal
>
> If we want to show the containers used by application/app attempt, We need to
> have two more API's which returns collection of ContainerHistoryData for
> application id and applcation attempt id something like below.
> {code:xml}
> Collection<ContainerHistoryData> getContainers(
> ApplicationAttemptId appAttemptId);
> Collection<ContainerHistoryData> getContainers(ApplicationId appId);
> {code}
> {code:xml}
> /**
> * This method returns {@link Container} for specified {@link ContainerId}.
> *
> * @param {@link ContainerId}
> * @return {@link Container} for ContainerId
> */
> ContainerHistoryData getAMContainer(ContainerId containerId);
> {code}
> In the above API, we need to change the argument to application attempt id or
> we can remove this API because every attempt history data has master
> container id field, using master container id, history data can get using
> this below API if it takes argument as container id.
> {code:xml}
> /**
> * This method returns {@link ContainerHistoryData} for specified
> * {@link ApplicationAttemptId}.
> *
> * @param {@link ApplicationAttemptId}
> * @return {@link ContainerHistoryData} for ApplicationAttemptId
> */
> ContainerHistoryData getContainer(ApplicationAttemptId appAttemptId);
> {code}
> Here application attempt can use numbers of containers but we cannot choose
> which container history data to return. This API argument also need to be
> changed to take container id instead of app attempt 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