YARN-4047. ClientRMService getApplications has high scheduler lock contention. Contributed by Jason Lowe
(cherry picked from commit7a445fcfab
) (cherry picked from commit703fa1b141
)
This commit is contained in:
parent
d59bf81e08
commit
2b526ba757
|
@ -202,6 +202,9 @@ Release 2.6.1 - UNRELEASED
|
|||
|
||||
YARN-3999. RM hangs on draing events. (Jian He via xgong)
|
||||
|
||||
YARN-4047. ClientRMService getApplications has high scheduler lock contention.
|
||||
(Jason Lowe via jianhe)
|
||||
|
||||
Release 2.6.0 - 2014-11-18
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -738,13 +738,9 @@ public class ClientRMService extends AbstractService implements
|
|||
RMApp application = appsIter.next();
|
||||
|
||||
// Check if current application falls under the specified scope
|
||||
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
|
||||
ApplicationAccessType.VIEW_APP, application);
|
||||
if (scope == ApplicationsRequestScope.OWN &&
|
||||
!callerUGI.getUserName().equals(application.getUser())) {
|
||||
continue;
|
||||
} else if (scope == ApplicationsRequestScope.VIEWABLE && !allowAccess) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (applicationTypes != null && !applicationTypes.isEmpty()) {
|
||||
|
@ -793,6 +789,13 @@ public class ClientRMService extends AbstractService implements
|
|||
}
|
||||
}
|
||||
|
||||
// checkAccess can grab the scheduler lock so call it last
|
||||
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
|
||||
ApplicationAccessType.VIEW_APP, application);
|
||||
if (scope == ApplicationsRequestScope.VIEWABLE && !allowAccess) {
|
||||
continue;
|
||||
}
|
||||
|
||||
reports.add(application.createAndGetApplicationReport(
|
||||
callerUGI.getUserName(), allowAccess));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue