This is an automated email from the ASF dual-hosted git repository.
philo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 705026dc2f [MINOR] Expose Gluten and component build information to
SparkConf (#11838)
705026dc2f is described below
commit 705026dc2f66a804969590f0c88cc866916893f0
Author: jiangjiangtian <[email protected]>
AuthorDate: Tue Apr 7 14:26:01 2026 +0800
[MINOR] Expose Gluten and component build information to SparkConf (#11838)
---
.../src/main/scala/org/apache/gluten/GlutenPlugin.scala | 11 +++++++++++
.../org/apache/gluten/backendsapi/SubstraitBackend.scala | 8 ++++++++
2 files changed, 19 insertions(+)
diff --git a/gluten-core/src/main/scala/org/apache/gluten/GlutenPlugin.scala
b/gluten-core/src/main/scala/org/apache/gluten/GlutenPlugin.scala
index c9d4d5b146..c95ddbe5b8 100644
--- a/gluten-core/src/main/scala/org/apache/gluten/GlutenPlugin.scala
+++ b/gluten-core/src/main/scala/org/apache/gluten/GlutenPlugin.scala
@@ -62,6 +62,7 @@ private[gluten] class GlutenDriverPlugin extends DriverPlugin
with Logging {
val components = Component.sorted()
printComponentInfo(components)
+ setComponentInfoConfig(conf, components)
components.foreach(_.onDriverStart(sc, pluginContext))
Collections.emptyMap()
}
@@ -170,6 +171,16 @@ private object GlutenDriverPlugin extends Logging {
)
logInfo(loggingInfo)
}
+
+ private def setComponentInfoConfig(conf: SparkConf, components:
Seq[Component]): Unit = {
+ components.foreach {
+ c =>
+ c.info().foreach {
+ case (k, v) =>
+ conf.set(s"spark.gluten.component.$k", v)
+ }
+ }
+ }
}
private[gluten] class GlutenExecutorPlugin extends ExecutorPlugin {
diff --git
a/gluten-substrait/src/main/scala/org/apache/gluten/backendsapi/SubstraitBackend.scala
b/gluten-substrait/src/main/scala/org/apache/gluten/backendsapi/SubstraitBackend.scala
index 89b90af91f..618210bbf0 100644
---
a/gluten-substrait/src/main/scala/org/apache/gluten/backendsapi/SubstraitBackend.scala
+++
b/gluten-substrait/src/main/scala/org/apache/gluten/backendsapi/SubstraitBackend.scala
@@ -50,6 +50,7 @@ trait SubstraitBackend extends Backend with Logging {
}
postBuildInfoEvent(sc)
+ setBuildInfoConfig(conf)
setPredefinedConfigs(conf)
@@ -125,6 +126,13 @@ object SubstraitBackend extends Logging {
}
}
+ private def setBuildInfoConfig(conf: SparkConf): Unit = {
+ conf.set("spark.gluten.branch", GlutenBuildInfo.BRANCH)
+ conf.set("spark.gluten.revision", GlutenBuildInfo.REVISION)
+ conf.set("spark.gluten.revisionTime", GlutenBuildInfo.REVISION_TIME)
+ conf.set("spark.gluten.buildTime", GlutenBuildInfo.BUILD_DATE)
+ }
+
private def setPredefinedConfigs(conf: SparkConf): Unit = {
// adaptive custom cost evaluator class
val enableGlutenCostEvaluator =
conf.get(GlutenConfig.COST_EVALUATOR_ENABLED)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]