Yohahaha commented on code in PR #8197:
URL: https://github.com/apache/incubator-gluten/pull/8197#discussion_r1879196623


##########
gluten-core/src/main/scala/org/apache/gluten/GlutenPlugin.scala:
##########
@@ -249,6 +249,18 @@ private[gluten] class GlutenDriverPlugin extends 
DriverPlugin with Logging {
         s"${COLUMNAR_VELOX_CACHE_ENABLED.key} and " +
           s"${COLUMNAR_VELOX_FILE_HANDLE_CACHE_ENABLED.key} should be enabled 
together.")
     }
+
+    val maxLoadQuantumOfVeloxCache = 8 * 1024 * 1024
+    val loadQuantum = conf.getSizeAsBytes(LOAD_QUANTUM.key, 
LOAD_QUANTUM.defaultValueString)
+    if (
+      conf.getBoolean(COLUMNAR_VELOX_CACHE_ENABLED.key, false) &&
+      loadQuantum > maxLoadQuantumOfVeloxCache
+    ) {
+      logWarning(
+        s"Velox currently only support up to 8MB load quantum size on SSD 
cache, change config " +
+          s"{$LOAD_QUANTUM.key} value from loadQuantum to 
$maxLoadQuantumOfVeloxCache")
+      conf.set(LOAD_QUANTUM.key, maxLoadQuantumOfVeloxCache.toString)

Review Comment:
   > When users use the default values and enable velox cache, throws directly 
may not be a good choice.
   
   it's a good choice, not all default values are fit velox cache.
   
   Keep check in GlutenPlugin is ok, but modify config does not make sense to 
me, we could add load quantum check like 
`spark.gluten.sql.columnar.backend.velox.fileHandleCacheEnabled`.



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