diff options
author | Felix Cheung <felixcheung_m@hotmail.com> | 2016-07-17 19:02:21 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2016-07-17 19:02:21 -0700 |
commit | d27fe9ba6763aae6a5e48f16d7cbd85658df7cf7 (patch) | |
tree | 26d85a87f9f04f8ccf3ff48c5e612bd0c202d44e /R/pkg/inst/tests/testthat/test_parallelize_collect.R | |
parent | 7b84758034b9bceca1168438ef5d0beefd5b5273 (diff) | |
download | spark-d27fe9ba6763aae6a5e48f16d7cbd85658df7cf7.tar.gz spark-d27fe9ba6763aae6a5e48f16d7cbd85658df7cf7.tar.bz2 spark-d27fe9ba6763aae6a5e48f16d7cbd85658df7cf7.zip |
[SPARK-16027][SPARKR] Fix R tests SparkSession init/stop
## What changes were proposed in this pull request?
Fix R SparkSession init/stop, and warnings of reusing existing Spark Context
## How was this patch tested?
unit tests
shivaram
Author: Felix Cheung <felixcheung_m@hotmail.com>
Closes #14177 from felixcheung/rsessiontest.
Diffstat (limited to 'R/pkg/inst/tests/testthat/test_parallelize_collect.R')
-rw-r--r-- | R/pkg/inst/tests/testthat/test_parallelize_collect.R | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/R/pkg/inst/tests/testthat/test_parallelize_collect.R b/R/pkg/inst/tests/testthat/test_parallelize_collect.R index f79a8a70aa..959d7ab9e6 100644 --- a/R/pkg/inst/tests/testthat/test_parallelize_collect.R +++ b/R/pkg/inst/tests/testthat/test_parallelize_collect.R @@ -33,7 +33,7 @@ numPairs <- list(list(1, 1), list(1, 2), list(2, 2), list(2, 3)) strPairs <- list(list(strList, strList), list(strList, strList)) # JavaSparkContext handle -sparkSession <- sparkR.session() +sparkSession <- sparkR.session(enableHiveSupport = FALSE) jsc <- callJStatic("org.apache.spark.sql.api.r.SQLUtils", "getJavaSparkContext", sparkSession) # Tests @@ -108,3 +108,5 @@ test_that("parallelize() and collect() work for lists of pairs (pairwise data)", expect_equal(collect(strPairsRDDD1), strPairs) expect_equal(collect(strPairsRDDD2), strPairs) }) + +sparkR.session.stop() |