Skip to content

Commit

Permalink
LIVY-205. sparkr.zip is unzipped on executor side
Browse files Browse the repository at this point in the history
This PR is to unzipped sparkr.zip on executor side.

Closes apache#181
  • Loading branch information
zjffdu authored and Marcelo Vanzin committed Sep 7, 2016
1 parent 2d6e026 commit 0284148
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,13 @@ object SparkRInterpreter {
try {
// Wait for RBackend initialization to finish
initialized.tryAcquire(backendTimeout, TimeUnit.SECONDS)
val rExec = conf.getOption("spark.r.driver.command")
.orElse(sys.env.get("DRIVER_R"))
.orElse(conf.getOption("spark.r.command"))
.orElse(conf.getOption("spark.sparkr.r.command"))
val rExec = conf.getOption("spark.r.shell.command")
.orElse(sys.env.get("SPARKR_DRIVER_R"))
.getOrElse("R")

var packageDir = ""
if (sys.env.getOrElse("SPARK_YARN_MODE", "") == "true") {
packageDir = "./sparkr.zip"
packageDir = "./sparkr"
} else {
// local mode
val rLibPath = new File(sys.env.getOrElse("SPARKR_PACKAGE_DIR",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class InteractiveSession(
case SparkR() =>
val sparkRArchive = if (!LivyConf.TEST_MODE) findSparkRArchive() else None
sparkRArchive.foreach { archive =>
builderProperties.put(RSCConf.Entry.SPARKR_PACKAGE.key(), archive)
builderProperties.put(RSCConf.Entry.SPARKR_PACKAGE.key(), archive + "#sparkr")
}
case _ =>
}
Expand Down

0 comments on commit 0284148

Please sign in to comment.