Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/15009#discussion_r106236076 --- Diff: resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala --- @@ -46,32 +46,49 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration import org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException import org.apache.hadoop.yarn.util.Records -import org.apache.spark.{SecurityManager, SparkConf, SparkException} +import org.apache.spark.{SecurityManager, SparkApp, SparkConf, SparkException} import org.apache.spark.deploy.SparkHadoopUtil import org.apache.spark.deploy.yarn.config._ import org.apache.spark.deploy.yarn.security.ConfigurableCredentialManager import org.apache.spark.internal.Logging import org.apache.spark.internal.config._ -import org.apache.spark.launcher.{LauncherBackend, SparkAppHandle, YarnCommandBuilderUtils} +import org.apache.spark.launcher.{LauncherBackend, SparkAppHandle, SparkLauncher, YarnCommandBuilderUtils} import org.apache.spark.util.{CallerContext, Utils} + private[spark] class Client( val args: ClientArguments, val hadoopConf: Configuration, - val sparkConf: SparkConf) + val sparkConf: SparkConf, + val sysEnvironment: scala.collection.immutable.Map[String, String]) extends Logging { import Client._ import YarnSparkHadoopUtil._ + def this( + clientArgs: ClientArguments, + spConf: SparkConf, + sysEnv: scala.collection.immutable.Map[String, String]) = + this(clientArgs, SparkHadoopUtil.get.newConfiguration(spConf), spConf, sysEnv) + + def this(clientArgs: ClientArguments, hadoopConf: Configuration, spConf: SparkConf) = + this(clientArgs, hadoopConf, spConf, sys.env.toMap) + def this(clientArgs: ClientArguments, spConf: SparkConf) = - this(clientArgs, SparkHadoopUtil.get.newConfiguration(spConf), spConf) + this(clientArgs, spConf, sys.env.toMap) private val yarnClient = YarnClient.createYarnClient private val yarnConf = new YarnConfiguration(hadoopConf) private val isClusterMode = sparkConf.get("spark.submit.deployMode", "client") == "cluster" + private val launcherServerPort : Int = --- End diff -- These are only needed inside `submitApplication`, no?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org