venkata91 commented on a change in pull request #32754:
URL: https://github.com/apache/spark/pull/32754#discussion_r645006644



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala
##########
@@ -91,6 +93,16 @@ object SQLMetrics {
 
   private val baseForAvgMetric: Int = 10
 
+  val cachedSQLAccumIdentifier = Some(AccumulatorContext.SQL_ACCUM_IDENTIFIER)
+
+  private val metricsCache: LoadingCache[String, Option[String]] =
+    CacheBuilder.newBuilder().maximumSize(10000)

Review comment:
       Do you think we wouldn't need to cache more than the top 128 metric 
names. It does makes sense. Just to be on the safer side, I set it to 10k. I 
don't think this should consume a lot of memory though. I am fine either way. 
Let me know your thoughts.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to