Skip to content

Commit

Permalink
also try to find SPARK_HOME under testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngone51 committed Jul 26, 2019
1 parent 95111b0 commit aec8cd5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,9 @@ private[spark] object ResourceUtils extends Logging {
private def getOrCreateResourcesDir(conf: SparkConf): File = {
val coordinateDir = new File(conf.get(SPARK_RESOURCES_DIR).getOrElse {
val sparkHome = if (Utils.isTesting) {
assert(sys.props.contains("spark.test.home"), "spark.test.home is not set!")
sys.props("spark.test.home")
assert(sys.props.contains("spark.test.home") ||
sys.env.contains("SPARK_HOME"), "spark.test.home or SPARK_HOME is not set.")
sys.props.getOrElse("spark.test.home", sys.env("SPARK_HOME"))
} else {
sys.env.getOrElse("SPARK_HOME", ".")
}
Expand Down

0 comments on commit aec8cd5

Please sign in to comment.