YARN-4047. ClientRMService getApplications has high scheduler lock contention. Contributed by Jason Lowe
This commit is contained in:
parent
38aed1a94e
commit
7a445fcfab
|
@ -766,6 +766,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
YARN-4005. Completed container whose app is finished is possibly not
|
YARN-4005. Completed container whose app is finished is possibly not
|
||||||
removed from NMStateStore. (Jun Gong via jianhe)
|
removed from NMStateStore. (Jun Gong via jianhe)
|
||||||
|
|
||||||
|
YARN-4047. ClientRMService getApplications has high scheduler lock contention.
|
||||||
|
(Jason Lowe via jianhe)
|
||||||
|
|
||||||
Release 2.7.2 - UNRELEASED
|
Release 2.7.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -752,13 +752,9 @@ public class ClientRMService extends AbstractService implements
|
||||||
RMApp application = appsIter.next();
|
RMApp application = appsIter.next();
|
||||||
|
|
||||||
// Check if current application falls under the specified scope
|
// Check if current application falls under the specified scope
|
||||||
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
|
|
||||||
ApplicationAccessType.VIEW_APP, application);
|
|
||||||
if (scope == ApplicationsRequestScope.OWN &&
|
if (scope == ApplicationsRequestScope.OWN &&
|
||||||
!callerUGI.getUserName().equals(application.getUser())) {
|
!callerUGI.getUserName().equals(application.getUser())) {
|
||||||
continue;
|
continue;
|
||||||
} else if (scope == ApplicationsRequestScope.VIEWABLE && !allowAccess) {
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (applicationTypes != null && !applicationTypes.isEmpty()) {
|
if (applicationTypes != null && !applicationTypes.isEmpty()) {
|
||||||
|
@ -807,6 +803,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(
|
reports.add(application.createAndGetApplicationReport(
|
||||||
callerUGI.getUserName(), allowAccess));
|
callerUGI.getUserName(), allowAccess));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue