zhli1142015 commented on code in PR #7003:
URL: https://github.com/apache/incubator-gluten/pull/7003#discussion_r1730587308


##########
gluten-core/src/main/scala/org/apache/gluten/softaffinity/SoftAffinityManager.scala:
##########
@@ -56,18 +55,34 @@ abstract class AffinityManager extends LogLevelUtil with 
Logging {
 
   lazy val detectDuplicateReading = true
 
-  lazy val maxDuplicateReadingRecords =
-    
GlutenConfig.GLUTEN_SOFT_AFFINITY_MAX_DUPLICATE_READING_RECORDS_DEFAULT_VALUE
+  lazy val duplicateReadingMaxCacheItems =
+    
GlutenConfig.GLUTEN_SOFT_AFFINITY_DUPLICATE_READING_MAX_CACHE_ITEMS_DEFAULT_VALUE
 
   // rdd id -> patition id, file path, start, length
-  val rddPartitionInfoMap = new ConcurrentHashMap[Int, Array[(Int, String, 
Long, Long)]]()
+  val rddPartitionInfoMap: LoadingCache[Integer, Array[(Int, String, Long, 
Long)]] =
+    CacheBuilder
+      .newBuilder()
+      .maximumSize(duplicateReadingMaxCacheItems)

Review Comment:
   I thinkt this setting is not suitable here, as it assume the task need to 
finish in the duration we set here.



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