diff options
author | Hossein <hossein@databricks.com> | 2015-06-19 15:47:22 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2015-06-19 15:51:59 -0700 |
commit | 1fa29c2df2a7846405eed6b409b8deb5329fa7c1 (patch) | |
tree | 260a8c9c048f4004ee1729a3a77e19ed3b2bdf9d /R/pkg/inst/tests | |
parent | 54976e55e36465108b71b40b8a431be9d6d703ce (diff) | |
download | spark-1fa29c2df2a7846405eed6b409b8deb5329fa7c1.tar.gz spark-1fa29c2df2a7846405eed6b409b8deb5329fa7c1.tar.bz2 spark-1fa29c2df2a7846405eed6b409b8deb5329fa7c1.zip |
[SPARK-8452] [SPARKR] expose jobGroup API in SparkR
This pull request adds following methods to SparkR:
```R
setJobGroup()
cancelJobGroup()
clearJobGroup()
```
For each method, the spark context is passed as the first argument. There does not seem to be a good way to test these in R.
cc shivaram and davies
Author: Hossein <hossein@databricks.com>
Closes #6889 from falaki/SPARK-8452 and squashes the following commits:
9ce9f1e [Hossein] Added basic tests to verify methods can be called and won't throw errors
c706af9 [Hossein] Added examples
a2c19af [Hossein] taking spark context as first argument
343ca77 [Hossein] Added setJobGroup, cancelJobGroup and clearJobGroup to SparkR
Diffstat (limited to 'R/pkg/inst/tests')
-rw-r--r-- | R/pkg/inst/tests/test_context.R | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/R/pkg/inst/tests/test_context.R b/R/pkg/inst/tests/test_context.R index e4aab37436..513bbc8e62 100644 --- a/R/pkg/inst/tests/test_context.R +++ b/R/pkg/inst/tests/test_context.R @@ -48,3 +48,10 @@ test_that("rdd GC across sparkR.stop", { count(rdd3) count(rdd4) }) + +test_that("job group functions can be called", { + sc <- sparkR.init() + setJobGroup(sc, "groupId", "job description", TRUE) + cancelJobGroup(sc, "groupId") + clearJobGroup(sc) +}) |