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


##########
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) {

Review Comment:
   Agreed that a raw prefix accessor in Configuration would be cleaner, but I'd 
rather keep this patch YARN-only. Later in the series the queue build path 
reads from ConfigSnapshot instead, so this loop stops being the hot path.



-- 
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