You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "peacewong (via GitHub)" <gi...@apache.org> on 2023/09/04 13:34:01 UTC
[GitHub] [linkis] peacewong commented on a diff in pull request #4896: Spark once task supports engingeConnRuntimeMode label
peacewong commented on code in PR #4896:
URL: https://github.com/apache/linkis/pull/4896#discussion_r1314955685
##########
linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/factory/SparkEngineConnFactory.scala:
##########
@@ -86,12 +87,22 @@ class SparkEngineConnFactory extends MultiExecutorEngineConnFactory with Logging
val hadoopConfDir = EnvConfiguration.HADOOP_CONF_DIR.getValue(options)
val sparkHome = SPARK_HOME.getValue(options)
val sparkConfDir = SPARK_CONF_DIR.getValue(options)
- val sparkConfig: SparkConfig = getSparkConfig(options)
+ val sparkConfig: SparkConfig =
+ getSparkConfig(options, isYarnClusterMode(engineCreationContext.getLabels()))
val context = new EnvironmentContext(sparkConfig, hadoopConfDir, sparkConfDir, sparkHome, null)
context
}
- def getSparkConfig(options: util.Map[String, String]): SparkConfig = {
+ def isYarnClusterMode(labels: util.List[Label[_]]): Boolean = {
+ val label = LabelUtil.getEngingeConnRuntimeModeLabel(labels)
Review Comment:
This method is recommended to be placed in utils class
--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org