[
https://issues.apache.org/jira/browse/YARN-10908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17413426#comment-17413426
]
Szilard Nemeth commented on YARN-10908:
---------------------------------------
Well, seems to have overlooked the fact that the
YarnAuthorizationProvider#getInstance is a singleton-based implementation.
Code is here:
https://github.com/apache/hadoop/blob/03cfc852791c14fad39db4e5b14104a276c08e59/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/YarnAuthorizationProvider.java#L49-L63
Therefore, the authorization provider only constructed once and it's not a big
deal that all queues has a reference for the same singleton.
Closing the jira then.
> Investigate: Why AbstractCSQueue#authorizer is constructed for each queue
> -------------------------------------------------------------------------
>
> Key: YARN-10908
> URL: https://issues.apache.org/jira/browse/YARN-10908
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Szilard Nemeth
> Assignee: Szilard Nemeth
> Priority: Minor
>
> AbstractCSQueue#hasAccess checks if a certain user with an ACL has permission
> to submit an app to the queue.
> Checking the permission itself is performed by calling
> ConfiguredYarnAuthorizer#checkPermission.
> Interestingly, all queue objects have a reference to a
> YarnAuthorizationProvider instance.
> What looks weird is how the authorizer is initialized:
> https://github.com/apache/hadoop/blob/ac0a4e7f589e7280268013c56339b3b257d332a0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java#L428
> It just calls YarnAuthorizationProvider.getInstance with the Configuration
> object as an argument so actually, all queue objects have an instance
> constructed with the same configuration, and the getInstance method does not
> gather any queue-specific configuration value from the object so this is a
> waste of memory.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]