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

Wangda Tan commented on YARN-3284:
----------------------------------

Hi [~xgong],
Thanks for working on this, It's very helpful! I reviewed part of the patch, 
majorly for API definition and RM internal changes:

1) RMAppAttemptMetrics.convertToApplicationAttemptMetrics(..): readLock needed?

2) Comment of ApplicationAttemptMetrics#getResourceRequests: "a list of ...this 
attempt has made" -> "a list of outstanding ResourceRequest of this attempt".

3) ApplicationAttemptMetrics#getLocalityStatistics seems not very proper to me, 
transfering 2d int array to string discards information. Instead, I suggest to 
keep such information and format it in CLI only, my proposal here is:
- Add a LocalityType PB enum message, which contains "node-local", 
"rack-local", "offswitch".
- Add a PB message named "LocalityStatisticProto", contains (LocalityType 
request, LocalityType container, int numberOfContainers)
- repeat LocalityStatisticProto is a part of ApplicationAttemptMetrics

4) headroom of attempt metrics:
I noticed FiCaSchedulerApp and schedulers will set the headroom when 
getAllocation/assignContainers are invoked. I suggest you can use 
SchedulerApplicationAttempt#getHeadroom to get up-to-date headroom of an app.

Will include CLI changes in next round.

> Expose more ApplicationMetrics and ApplicationAttemptMetrics through YARN 
> command
> ---------------------------------------------------------------------------------
>
>                 Key: YARN-3284
>                 URL: https://issues.apache.org/jira/browse/YARN-3284
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Xuan Gong
>            Assignee: Xuan Gong
>         Attachments: YARN-3284.1.patch, YARN-3284.1.patch, YARN-3284.2.patch, 
> YARN-3284.3.patch, YARN-3284.3.rebase.patch, YARN-3284.4.patch
>
>
> Current, we have some extra metrics about the application and current attempt 
> in RM Web UI. We should expose that information through YARN Command, too.
> 1. Preemption metrics
> 2. application outstanding resource requests
> 3. container locality info



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to