brumi1024 commented on code in PR #8800:
URL: https://github.com/apache/hadoop/pull/8800#discussion_r4240850299


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfiguration.java:
##########
@@ -719,9 +720,14 @@ public <S extends SchedulableEntity> OrderingPolicy<S> 
getAppOrderingPolicy(
 
     Map<String, String> config = new HashMap<String, String>();
     String confPrefix = getQueuePrefix(queue) + ORDERING_POLICY + ".";
-    for (Map.Entry<String, String> kv : this) {
-      if (kv.getKey().startsWith(confPrefix)) {
-         config.put(kv.getKey().substring(confPrefix.length()), kv.getValue());
+    Properties props = getProps();
+    synchronized (props) {
+      for (Map.Entry<Object, Object> kv : props.entrySet()) {

Review Comment:
   Agreed that one pass is the right shape, and that is what YARN-12016 does: 
the configuration is indexed by key prefix once, and every queue's ordering 
policy parameters come from that index.
   I'd rather not add a second mechanism like ConfiguredNodeLabels here only 
for it to be replaced later on. This patch is meant to stay minimal so it also 
works as the benchmark baseline for the series.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to