kerwin-zk commented on code in PR #2070:
URL: 
https://github.com/apache/incubator-celeborn/pull/2070#discussion_r1382903697


##########
client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala:
##########
@@ -76,6 +79,16 @@ class LifecycleManager(val appUniqueId: String, val conf: 
CelebornConf) extends
     JavaUtils.newConcurrentHashMap[Int, ConcurrentHashMap[Int, 
PartitionLocation]]()
   private val userIdentifier: UserIdentifier = 
IdentityProvider.instantiate(conf).provide()
 
+  private val rpcCacheSize = conf.clientRpcCacheSize
+  private val rpcCacheConcurrencyLevel = conf.clientRpcCacheConcurrencyLevel
+  private val rpcCacheExpireTime = conf.clientRpcCacheExpireTime
+
+  private val getRegisterShuffleResponseRpcCache: Cache[Int, ByteBuffer] = 
CacheBuilder.newBuilder()
+    .concurrencyLevel(rpcCacheConcurrencyLevel)
+    .expireAfterAccess(rpcCacheExpireTime, TimeUnit.MILLISECONDS)
+    .maximumSize(rpcCacheSize)
+    .build().asInstanceOf[Cache[Int, ByteBuffer]]

Review Comment:
   @mridulm ```flatMap(_.getAllPrimaryLocationsWithMinEpoch())```  the minimum 
value of epoch will be taken here, so changes to workersnapshot will not affect 
the cache.



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

Reply via email to