bibinchundatt commented on a change in pull request #3717:
URL: https://github.com/apache/hadoop/pull/3717#discussion_r763651332



##########
File path: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/distributed/NodeQueueLoadMonitor.java
##########
@@ -295,11 +428,14 @@ protected void onExistingNodeUpdated(
 
     if (rmNode.getState() != NodeState.DECOMMISSIONING &&
         (estimatedQueueWaitTime != -1 ||
-            comparator == LoadComparator.QUEUE_LENGTH)) {
+            comparator == LoadComparator.QUEUE_LENGTH ||
+            comparator == LoadComparator.QUEUE_LENGTH_THEN_RESOURCES)) {
       clusterNode
           .setQueueWaitTime(estimatedQueueWaitTime)

Review comment:
       Every second we are taking too many write locks of ClusterNode. IIUC 
that not the best optimized option. We should probably take the write lock once 
and update all the values like waitTime,SetQueueLength,labels etc .




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