CavemanIV commented on code in PR #38790:
URL: https://github.com/apache/spark/pull/38790#discussion_r1033494847
##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala:
##########
@@ -298,7 +298,7 @@ private[yarn] class YarnAllocator(
// if a ResourceProfile hasn't been seen yet, create the corresponding YARN
Resource for it
private def createYarnResourceForResourceProfile(rp: ResourceProfile): Unit
= synchronized {
- if (!rpIdToYarnResource.contains(rp.id)) {
+ if (!rpIdToYarnResource.containsKey(rp.id)) {
Review Comment:
Sorry for late reply. I don't think there is a UT for this repeating case,
it looks like map rpIdToYarnResource only serves as a cache for (increment_id
-> YarnResource) in YarnAllocator, and DefaultProfile 0 is used in most cases,
so the consequence should be limited.
I did test this patch on our internal cluster, the repeated logs
> [main] INFO YarnAllocator: Resource profile 0 doesn't exist, adding it
are gone
--
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]