Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
better handling of local:// protocol URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
lgfa29 committed Oct 29, 2019
1 parent b349efa commit 7ad9b8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private[spark] object DriverTask extends SparkNomadTaskType("driver", "driver",
.map(_.split(",").filter(_.nonEmpty))
.filter(_.nonEmpty)
.foreach { files =>
conf.set("spark.files", files.map(asFileIn(jobConf, task)).map(f => f.stripPrefix("local://")).mkString(","))
conf.set("spark.files", files.map(asFileIn(jobConf, task)).mkString(","))
}

val driverConf: Seq[(String, String)] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ private[spark] abstract class SparkNomadTaskType(
protected def asFileIn(jobConf: SparkNomadJob.CommonConf, task: Task)(url: String): String = {
val (file, artifact) = asFileAndArtifact(jobConf, new URI(url), false)
artifact.foreach(task.addArtifacts(_))
file.toString
file.getScheme match {
case "local" => file.getPath
case _ => file.toString
}
}

protected def jvmMemory(conf: SparkConf, task: Task): String = {
Expand Down

0 comments on commit 7ad9b8d

Please sign in to comment.