Skip to content

Commit

Permalink
rename to hadoop.conf.dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Balogh committed Sep 3, 2018
1 parent bed3f44 commit f8e828c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,11 @@ private[deploy] class SparkSubmitArguments(args: Seq[String], env: Map[String, S

if (master.startsWith("yarn")) {
val hasHadoopEnv = env.contains("HADOOP_CONF_DIR") || env.contains("YARN_CONF_DIR")
val hasHadoopProp = sparkProperties.contains("spark.yarn.conf.dir")
val hasHadoopProp = sparkProperties.contains("spark.hadoop.conf.dir")
if (!hasHadoopEnv && !hasHadoopProp && !Utils.isTesting) {
error(s"When running with master '$master' " +
"either HADOOP_CONF_DIR or YARN_CONF_DIR must be set in the environment, +" +
"or spark.yarn.conf.dir in the spark properties.")
"or spark.hadoop.conf.dir in the spark properties.")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ List<String> buildClassPath(String appClassPath) throws IOException {

addToClassPath(cp, getenv("HADOOP_CONF_DIR"));
addToClassPath(cp, getenv("YARN_CONF_DIR"));
addToClassPath(cp, getEffectiveConfig().get("spark.yarn.conf.dir"));
addToClassPath(cp, getEffectiveConfig().get("spark.hadoop.conf.dir"));
addToClassPath(cp, getenv("SPARK_DIST_CLASSPATH"));
return new ArrayList<>(cp);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ private[spark] class Client(
}

val confDirsEnvKeys = Seq("HADOOP_CONF_DIR", "YARN_CONF_DIR")
val configDirProp = sparkConf.getOption("spark.yarn.conf.dir")
val configDirProp = sparkConf.getOption("spark.hadoop.conf.dir")

val confDirPaths = (confDirsEnvKeys.map(sys.env.get) :+ configDirProp).flatMap(_.toList)
confDirPaths.foreach { path =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class YarnClusterSuite extends BaseYarnClusterSuite {
appArgs = Seq("key=value", "spark.test.key=testvalue", result.getAbsolutePath()),
extraConf = Map(
"spark.hadoop.key" -> "value",
"spark.yarn.conf.dir" -> customConf.getAbsolutePath))
"spark.hadoop.conf.dir" -> customConf.getAbsolutePath))
checkResult(finalState, result)
}

Expand Down

0 comments on commit f8e828c

Please sign in to comment.