-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARKR][SPARK-22344] Set java.io.tmpdir for SparkR tests #19589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,10 @@ sparkRFilesBefore <- list.files(path = sparkRDir, all.files = TRUE) | |
| sparkRTestMaster <- "local[1]" | ||
| if (identical(Sys.getenv("NOT_CRAN"), "true")) { | ||
| sparkRTestMaster <- "" | ||
| } else { | ||
| # Disable hsperfdata on CRAN | ||
| old_java_opt <- Sys.getenv("_JAVA_OPTIONS") | ||
| Sys.setenv("_JAVA_OPTIONS"=paste("-XX:-UsePerfData", old_java_opt, sep=" ")) | ||
|
||
| } | ||
|
|
||
| test_package("SparkR") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,12 @@ opts_hooks$set(eval = function(options) { | |
| } | ||
| options | ||
| }) | ||
| r_tmp_dir <- tempdir() | ||
| tmp_arg <- paste("-Djava.io.tmpdir=", r_tmp_dir, sep = "") | ||
| sparkSessionConfig <- list(spark.driver.extraJavaOptions = tmp_arg, | ||
| spark.executor.extraJavaOptions = tmp_arg) | ||
| old_java_opt <- Sys.getenv("_JAVA_OPTIONS") | ||
| new_java_opt <- Sys.setenv("_JAVA_OPTIONS"=paste("-XX:-UsePerfData", old_java_opt, sep = " ")) | ||
|
||
| ``` | ||
|
|
||
| ## Overview | ||
|
|
@@ -57,7 +63,7 @@ We use default settings in which it runs in local mode. It auto downloads Spark | |
|
|
||
| ```{r, include=FALSE} | ||
| install.spark() | ||
| sparkR.session(master = "local[1]") | ||
| sparkR.session(master = "local[1]", sparkConfig = sparkSessionConfig, enableHiveSupport = FALSE) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, good catch on |
||
| ``` | ||
| ```{r, eval=FALSE} | ||
| sparkR.session() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: paste0