-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[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
Conversation
Also disable the hsperfdata for the JVM for CRAN checks
|
cc @felixcheung -- It'll be great if you could independently test this as well ! |
|
Test build #83132 has finished for PR 19589 at commit
|
|
it looked like maybe appveyor is running too long and timed out? |
felixcheung
left a comment
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.
thanks, I will test this
| test_that("create DataFrame from list or data.frame", { | ||
| sparkR.session(master = sparkRTestMaster, enableHiveSupport = FALSE) | ||
| r_tmp_dir <- tempdir() | ||
| tmp_arg <- paste("-Djava.io.tmpdir=", r_tmp_dir, sep = "") |
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
R/pkg/tests/run-all.R
Outdated
| } else { | ||
| # Disable hsperfdata on CRAN | ||
| old_java_opt <- Sys.getenv("_JAVA_OPTIONS") | ||
| Sys.setenv("_JAVA_OPTIONS"=paste("-XX:-UsePerfData", old_java_opt, sep=" ")) |
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.
I think perhaps it'd better to set spark.driver.extraJavaOptions and spark.executor.extraJavaOptions (use a variable to store its value, as in sparkRTestMaster, or like in vignettes, sparkSessionConfig)
btw, I think the convention is camelCase variables :)
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.
also sep=" " is the default
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.
space between variable/value
"_JAVA_OPTIONS" = paste("-XX:-UsePerfData", old_java_opt, sep = " "
we should have a lintr rule that detects this at one point..
| ```{r, include=FALSE} | ||
| install.spark() | ||
| sparkR.session(master = "local[1]") | ||
| sparkR.session(master = "local[1]", sparkConfig = sparkSessionConfig, enableHiveSupport = FALSE) |
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.
hmm, good catch on enableHiveSupport I think this should be fine
R/pkg/vignettes/sparkr-vignettes.Rmd
Outdated
| 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 = " ")) |
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.
don't need new_java_opt?
|
Test build #83177 has finished for PR 19589 at commit
|
|
Merging to master, branch-2.2 and branch-2.1 |
This PR sets the java.io.tmpdir for CRAN checks and also disables the hsperfdata for the JVM when running CRAN checks. Together this prevents files from being left behind in `/tmp` ## How was this patch tested? Tested manually on a clean EC2 machine Author: Shivaram Venkataraman <[email protected]> Closes #19589 from shivaram/sparkr-tmpdir-clean. (cherry picked from commit 1fe2761) Signed-off-by: Shivaram Venkataraman <[email protected]>
This PR sets the java.io.tmpdir for CRAN checks and also disables the hsperfdata for the JVM when running CRAN checks. Together this prevents files from being left behind in `/tmp` Tested manually on a clean EC2 machine Author: Shivaram Venkataraman <[email protected]> Closes #19589 from shivaram/sparkr-tmpdir-clean. (cherry picked from commit 1fe2761) Signed-off-by: Shivaram Venkataraman <[email protected]>
This PR sets the java.io.tmpdir for CRAN checks and also disables the hsperfdata for the JVM when running CRAN checks. Together this prevents files from being left behind in `/tmp` ## How was this patch tested? Tested manually on a clean EC2 machine Author: Shivaram Venkataraman <[email protected]> Closes apache#19589 from shivaram/sparkr-tmpdir-clean. (cherry picked from commit 1fe2761) Signed-off-by: Shivaram Venkataraman <[email protected]>
This PR sets the java.io.tmpdir for CRAN checks and also disables the hsperfdata for the JVM when running CRAN checks. Together this prevents files from being left behind in
/tmpHow was this patch tested?
Tested manually on a clean EC2 machine