aboutsummaryrefslogtreecommitdiff
path: root/R/install-dev.bat
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.bat
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.bat')
-rw-r--r--R/install-dev.bat6
1 files changed, 6 insertions, 0 deletions
diff --git a/R/install-dev.bat b/R/install-dev.bat
index 008a5c668b..ed1c91ae3a 100644
--- a/R/install-dev.bat
+++ b/R/install-dev.bat
@@ -25,3 +25,9 @@ set SPARK_HOME=%~dp0..
MKDIR %SPARK_HOME%\R\lib
R.exe CMD INSTALL --library="%SPARK_HOME%\R\lib" %SPARK_HOME%\R\pkg\
+
+rem Zip the SparkR package so that it can be distributed to worker nodes on YARN
+pushd %SPARK_HOME%\R\lib
+%JAVA_HOME%\bin\jar.exe cfM "%SPARK_HOME%\R\lib\sparkr.zip" SparkR
+popd
+