mridulm commented on code in PR #41821:
URL: https://github.com/apache/spark/pull/41821#discussion_r1267538335
##########
resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientDistributedCacheManagerSuite.scala:
##########
@@ -44,6 +45,70 @@ class ClientDistributedCacheManagerSuite extends
SparkFunSuite with MockitoSugar
}
}
+ class CustomizedClientDistributedCacheManager extends
ClientDistributedCacheManager {
+ override private[yarn] def getFileStatus(fs: FileSystem, uri: URI,
+ statCache: mutable.Map[URI, FileStatus]): FileStatus = {
+ val stat = statCache.get(uri) match {
+ case Some(existstat) => existstat
+ case None =>
+ val newStat = new FileStatus()
+ statCache.put(uri, newStat)
+ newStat
+ }
+ new FileStatus()
Review Comment:
```suggestion
statCache.getOrElseUpdate(uri, new FileStatus())
```
--
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]