[ https://issues.apache.org/jira/browse/YARN-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14019541#comment-14019541 ]
Karthik Kambatla commented on YARN-1424: ---------------------------------------- In my opinion, DUMMY_APPLICATION_RESOURCE_USAGE_REPORT should have zeroes for all resource-related values as opposed to -1. In case, people fetch these reports and try to accumulate statistics, -1 would through their math off. The app_id itself has -1 in it, so I don't see a risk of it being misconstrued. > 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 > > > 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)