Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on:
description: Hadoop version to run with. HADOOP_PROFILE environment variable should accept it.
required: false
type: string
default: hadoop3
default: hadoop2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for test hadoop-2, will revert after confirmation takes effect

envs:
description: Additional environment variables to set when running the tests. Should be in JSON format.
required: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,12 @@ private[spark] class Client(
pySparkArchives: Seq[String]): HashMap[String, String] = {
logInfo("Setting up the launch environment for our AM container")
val env = new HashMap[String, String]()
populateClasspath(args, hadoopConf, sparkConf, env, sparkConf.get(DRIVER_CLASS_PATH))
val driverClassPath = sparkConf.get(DRIVER_CLASS_PATH).map { s =>
val strings = s.split(":")
val ret = strings.filter(v => !v.contains("selenium") && !v.contains("opentelemetry"))
ret.mkString(":")
}
populateClasspath(args, hadoopConf, sparkConf, env, driverClassPath)
env("SPARK_YARN_STAGING_DIR") = stagingDirPath.toString
env("SPARK_USER") = UserGroupInformation.getCurrentUser().getShortUserName()
env("SPARK_PREFER_IPV6") = Utils.preferIPv6.toString
Expand Down Expand Up @@ -1512,7 +1517,11 @@ private[spark] object Client extends Logging {
populateHadoopClasspath(conf, env)
}

sys.env.get(ENV_DIST_CLASSPATH).foreach { cp =>
sys.env.get(ENV_DIST_CLASSPATH).map { s =>
val strings = s.split(":")
val ret = strings.filter(v => !v.contains("selenium") && !v.contains("opentelemetry"))
ret.mkString(":")
}.foreach { cp =>
addClasspathEntry(getClusterPath(sparkConf, cp), env)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ private[yarn] class ExecutorRunnable(

private def prepareEnvironment(): HashMap[String, String] = {
val env = new HashMap[String, String]()
Client.populateClasspath(null, conf, sparkConf, env, sparkConf.get(EXECUTOR_CLASS_PATH))
val executorClassPath = sparkConf.get(EXECUTOR_CLASS_PATH).map { s =>
val strings = s.split(":")
val ret = strings.filter(v => !v.contains("selenium") && !v.contains("opentelemetry"))
ret.mkString(":")
}
Client.populateClasspath(null, conf, sparkConf, env, executorClassPath)

System.getenv().asScala.filterKeys(_.startsWith("SPARK"))
.foreach { case (k, v) => env(k) = v }
Expand Down