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 6a8fd73 YARN-10279. Avoid unnecessary QueueMappingEntity creations. Contributed by Marton Hudaky 6a8fd73 is described below commit 6a8fd73b273629d0c7c071cf4d090f67d9b96fe4 Author: Szilard Nemeth <snem...@apache.org> AuthorDate: Thu Jun 25 17:27:58 2020 +0200 YARN-10279. Avoid unnecessary QueueMappingEntity creations. Contributed by Marton Hudaky --- .../resourcemanager/placement/QueuePlacementRuleUtils.java | 7 +------ .../placement/UserGroupMappingPlacementRule.java | 14 ++------------ 2 files changed, 3 insertions(+), 18 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/QueuePlacementRuleUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/QueuePlacementRuleUtils.java index 15c8fd8..76e3e27 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/QueuePlacementRuleUtils.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/QueuePlacementRuleUtils.java @@ -74,12 +74,7 @@ public final class QueuePlacementRuleUtils { validateQueueMappingUnderParentQueue(queueManager.getQueue( mapping.getParentQueue()), mapping.getParentQueue(), mapping.getFullPath()); - return QueueMapping.QueueMappingBuilder.create() - .type(mapping.getType()) - .source(mapping.getSource()) - .parentQueue(mapping.getParentQueue()) - .queue(mapping.getQueue()) - .build(); + return mapping; } return null; 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/UserGroupMappingPlacementRule.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/UserGroupMappingPlacementRule.java index a68f3c6..71d9bb7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/UserGroupMappingPlacementRule.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/UserGroupMappingPlacementRule.java @@ -485,24 +485,14 @@ public class UserGroupMappingPlacementRule extends PlacementRule { && (mapping.getParentQueue().equals(PRIMARY_GROUP_MAPPING) || mapping.getParentQueue().equals(SECONDARY_GROUP_MAPPING))) { // dynamic parent queue - return QueueMappingBuilder.create() - .type(mapping.getType()) - .source(mapping.getSource()) - .queue(mapping.getQueue()) - .parentQueue(mapping.getParentQueue()) - .build(); + return mapping; } else if (mapping.hasParentQueue()) { //if parent queue is specified, // then it should exist and be an instance of ManagedParentQueue QueuePlacementRuleUtils.validateQueueMappingUnderParentQueue( queueManager.getQueue(mapping.getParentQueue()), mapping.getParentQueue(), mapping.getQueue()); - return QueueMappingBuilder.create() - .type(mapping.getType()) - .source(mapping.getSource()) - .queue(mapping.getQueue()) - .parentQueue(mapping.getParentQueue()) - .build(); + return mapping; } return null; --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org