aboutsummaryrefslogtreecommitdiff
path: root/R/install-dev.sh
diff options
context:
space:
mode:
authorSun Rui <rui.sun@intel.com>2015-11-15 19:29:09 -0800
committerShivaram Venkataraman <shivaram@cs.berkeley.edu>2015-11-15 19:29:09 -0800
commit835a79d78ee879a3c36dde85e5b3591243bf3957 (patch)
tree62c0880c7b9740e008508607665f15b285897013 /R/install-dev.sh
parentd7d9fa0b8750166f8b74f9bc321df26908683a8b (diff)
downloadspark-835a79d78ee879a3c36dde85e5b3591243bf3957.tar.gz
spark-835a79d78ee879a3c36dde85e5b3591243bf3957.tar.bz2
spark-835a79d78ee879a3c36dde85e5b3591243bf3957.zip
[SPARK-10500][SPARKR] sparkr.zip cannot be created if /R/lib is unwritable
The basic idea is that: The archive of the SparkR package itself, that is sparkr.zip, is created during build process and is contained in the Spark binary distribution. No change to it after the distribution is installed as the directory it resides ($SPARK_HOME/R/lib) may not be writable. When there is R source code contained in jars or Spark packages specified with "--jars" or "--packages" command line option, a temporary directory is created by calling Utils.createTempDir() where the R packages built from the R source code will be installed. The temporary directory is writable, and won't interfere with each other when there are multiple SparkR sessions, and will be deleted when this SparkR session ends. The R binary packages installed in the temporary directory then are packed into an archive named rpkg.zip. sparkr.zip and rpkg.zip are distributed to the cluster in YARN modes. The distribution of rpkg.zip in Standalone modes is not supported in this PR, and will be address in another PR. Various R files are updated to accept multiple lib paths (one is for SparkR package, the other is for other R packages) so that these package can be accessed in R. Author: Sun Rui <rui.sun@intel.com> Closes #9390 from sun-rui/SPARK-10500.
Diffstat (limited to 'R/install-dev.sh')
-rwxr-xr-xR/install-dev.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/R/install-dev.sh b/R/install-dev.sh
index 59d98c9c7a..4972bb9217 100755
--- a/R/install-dev.sh
+++ b/R/install-dev.sh
@@ -42,4 +42,8 @@ Rscript -e ' if("devtools" %in% rownames(installed.packages())) { library(devtoo
# Install SparkR to $LIB_DIR
R CMD INSTALL --library=$LIB_DIR $FWDIR/pkg/
+# Zip the SparkR package so that it can be distributed to worker nodes on YARN
+cd $LIB_DIR
+jar cfM "$LIB_DIR/sparkr.zip" SparkR
+
popd > /dev/null