PHILO-HE commented on code in PR #8197:
URL: https://github.com/apache/incubator-gluten/pull/8197#discussion_r1877752826


##########
shims/common/src/main/scala/org/apache/gluten/GlutenConfig.scala:
##########
@@ -2097,13 +2097,12 @@ object GlutenConfig {
       .intConf
       .createWithDefault(1)
 
-  // Velox currently only support up to 8MB load quantum size on SSD.
   val LOAD_QUANTUM =
     buildStaticConf("spark.gluten.sql.columnar.backend.velox.loadQuantum")
       .internal()
       .doc("Set the load quantum for velox file scan")

Review Comment:
   It is worth adding more comments here. E.g., "Recommend to use the default 
value (256MB) for performance consideration. If Velox cache is enabled, it can 
be 8MB at most."



##########
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:
   I note this is a static config, Can it be really reset?



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