[
https://issues.apache.org/jira/browse/YARN-10070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17012122#comment-17012122
]
Prabhu Joseph commented on YARN-10070:
--------------------------------------
[~kmarton] There are two issues
1. RMAppManager#getUserNameForPlacement() checks the queue mapping for the
proxy user and then validates if the end user has SUBMIT_APPLICATIONS access to
the mapped queue of proxy user. If yes, returns the end user for placement.
{code:java}
String userNameFromAppTag = getUserNameFromApplicationTag(applicationTags);
if (userNameFromAppTag != null) {
LOG.debug("Found 'userid' '{}' in application tag", userNameFromAppTag);
UserGroupInformation callerUGI = UserGroupInformation
.createRemoteUser(userNameFromAppTag);
// check if the actual user has rights to submit application to the
// user's queue from the application tag
String queue = placementManager
.placeApplication(context, usernameUsedForPlacement).getQueue();
if (callerUGI != null && scheduler
.checkAccess(callerUGI, QueueACL.SUBMIT_APPLICATIONS, queue)) {
usernameUsedForPlacement = userNameFromAppTag;
} else {
LOG.warn("User '{}' from application tag does not have access to " +
" queue '{}'. " + "The placement is done for user '{}'",
userNameFromAppTag, queue, user);
}
} else {
LOG.warn("'userid' was not found in application tags");
}
{code}
For Example:
yarn.scheduler.capacity.queue-mappings=u:hive:default,u:ambari-qa:tezq
Assume hive is proxy user and ambari-qa is end user. The above logic gets queue
mapping of proxy user hive which is default queue, then validates if end user
ambari-qa has access to default queue, if so returns the user ambari-qa for
placement. The placement for ambari-qa maps to tezq queue. This logic of
checking access on default queue and then placing to tezq does not look correct
2. It expects to configure queue mapping for both proxy and end user. If not
configured for proxy user, NPE happens.
{code:java}
String queue = placementManager
.placeApplication(context, usernameUsedForPlacement).getQueue();
{code}
> NPE if no rule is defined and application-tag-based-placement is enabled
> ------------------------------------------------------------------------
>
> Key: YARN-10070
> URL: https://issues.apache.org/jira/browse/YARN-10070
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Kinga Marton
> Assignee: Kinga Marton
> Priority: Major
>
> If there is no rule defined for a user NPE is thrown by the following line.
> {code:java}
> String queue = placementManager
> .placeApplication(context, usernameUsedForPlacement).getQueue();{code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]