yikf commented on code in PR #8197:
URL: https://github.com/apache/incubator-gluten/pull/8197#discussion_r1877994040
##########
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:
@Yohahaha When users use the default values and enable velox cache, throws
directly may not be a good choice.
VeloxBackend::initCache modifying the load quantum fundamentally also
involves checking and modifying the backendConf_, which seems to make
backendConf_ read-only for safety purposes.
I am fine with either approach.
--
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]