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

Jason Lowe commented on YARN-1424:
----------------------------------

-1 was chosen to explicitly mark the field as having an invalid value to note 
that the true value is unknown or inaccessible.  For example, having no 
reserved containers is a valid state, so how would a client distinguish between 
an application having no reservations and the case where we cannot report the 
proper value?  Similarly unmanaged AMs don't have resource utilization on the 
cluster for the AM itself, so an unmanaged AM without any other containers 
could show up with zero resource consumption.

I could see it either way -- either clients will blindly sum and assume they 
won't need to differentiate apps they can't see details from apps they can, or 
clients will want to differentiate and then we need a way to convey that.  If 
we do change to using zeroes then technically this would be an incompatible 
change since we would no longer be flagging unreportable/inaccessible values 
via the -1 value.

> RMAppAttemptImpl should precompute a zeroed ApplicationResourceUsageReport to 
> return when attempt not active
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-1424
>                 URL: https://issues.apache.org/jira/browse/YARN-1424
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: resourcemanager
>    Affects Versions: 2.4.0
>            Reporter: Sandy Ryza
>            Assignee: Ray Chiang
>            Priority: Minor
>              Labels: newbie
>         Attachments: YARN1424-01.patch, YARN1424-02.patch
>
>
> RMAppImpl has a DUMMY_APPLICATION_RESOURCE_USAGE_REPORT to return when the 
> caller of createAndGetApplicationReport doesn't have access.
> RMAppAttemptImpl should have something similar for 
> getApplicationResourceUsageReport.
> It also might make sense to put the dummy report into 
> ApplicationResourceUsageReport and allow both to use it.
> A test would also be useful to verify that 
> RMAppAttemptImpl#getApplicationResourceUsageReport doesn't return null if the 
> scheduler doesn't have a report to return.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to