You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sn...@apache.org on 2021/03/31 14:14:33 UTC
[hadoop] branch trunk updated: YARN-10597. CSMappingPlacementRule
should not create new instance of Groups. Contributed by Gergely Pollak
This is an automated email from the ASF dual-hosted git repository.
snemeth pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 6fd0c66 YARN-10597. CSMappingPlacementRule should not create new instance of Groups. Contributed by Gergely Pollak
6fd0c66 is described below
commit 6fd0c661b64c78e865d8328f31326eab8eb58de4
Author: Szilard Nemeth <sn...@apache.org>
AuthorDate: Wed Mar 31 16:14:03 2021 +0200
YARN-10597. CSMappingPlacementRule should not create new instance of Groups. Contributed by Gergely Pollak
---
.../server/resourcemanager/placement/CSMappingPlacementRule.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/CSMappingPlacementRule.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/CSMappingPlacementRule.java
index 07aeb12..894bc82 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/CSMappingPlacementRule.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/CSMappingPlacementRule.java
@@ -132,11 +132,7 @@ public class CSMappingPlacementRule extends PlacementRule {
overrideWithQueueMappings = conf.getOverrideWithQueueMappings();
if (groups == null) {
- //We cannot use Groups#getUserToGroupsMappingService here, because when
- //tests change the HADOOP_SECURITY_GROUP_MAPPING, Groups won't refresh its
- //cached instance of groups, so we might get a Group instance which
- //ignores the HADOOP_SECURITY_GROUP_MAPPING settings.
- groups = new Groups(conf);
+ groups = Groups.getUserToGroupsMappingService(conf);
}
MappingRuleValidationContext validationContext = buildValidationContext();
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org