Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions gluten-core/src/main/scala/org/apache/gluten/GlutenPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ trait SubstraitBackend extends Backend with Logging {
}

postBuildInfoEvent(sc)
setBuildInfoConfig(conf)

setPredefinedConfigs(conf)

Expand Down Expand Up @@ -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)
Expand Down
Loading