diff options
author | Yanbo Liang <ybliang8@gmail.com> | 2016-05-09 09:58:36 -0700 |
---|---|---|
committer | Davies Liu <davies.liu@gmail.com> | 2016-05-09 09:58:36 -0700 |
commit | ee3b1715620d48b8d22d086ddeef49ad7ff249d2 (patch) | |
tree | 00401e430a6d81cd2c82e6b6ba07fbbb0d87019c /R | |
parent | 652bbb1bf62722b08a062c7a2bf72019f85e179e (diff) | |
download | spark-ee3b1715620d48b8d22d086ddeef49ad7ff249d2.tar.gz spark-ee3b1715620d48b8d22d086ddeef49ad7ff249d2.tar.bz2 spark-ee3b1715620d48b8d22d086ddeef49ad7ff249d2.zip |
[MINOR] [SPARKR] Update data-manipulation.R to use native csv reader
## What changes were proposed in this pull request?
* Since Spark has supported native csv reader, it does not necessary to use the third party ```spark-csv``` in ```examples/src/main/r/data-manipulation.R```. Meanwhile, remove all ```spark-csv``` usage in SparkR.
* Running R applications through ```sparkR``` is not supported as of Spark 2.0, so we change to use ```./bin/spark-submit``` to run the example.
## How was this patch tested?
Offline test.
Author: Yanbo Liang <ybliang8@gmail.com>
Closes #13005 from yanboliang/r-df-examples.
Diffstat (limited to 'R')
-rw-r--r-- | R/pkg/R/sparkR.R | 3 | ||||
-rw-r--r-- | R/pkg/inst/tests/testthat/test_client.R | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index c187869fdf..04a8b1e1f3 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -103,8 +103,7 @@ sparkR.stop <- function() { #' list(spark.executor.memory="4g"), #' list(LD_LIBRARY_PATH="/directory of JVM libraries (libjvm.so) on workers/"), #' c("one.jar", "two.jar", "three.jar"), -#' c("com.databricks:spark-avro_2.10:2.0.1", -#' "com.databricks:spark-csv_2.10:1.3.0")) +#' c("com.databricks:spark-avro_2.10:2.0.1")) #'} sparkR.init <- function( diff --git a/R/pkg/inst/tests/testthat/test_client.R b/R/pkg/inst/tests/testthat/test_client.R index 28276a020d..0cf25fe1db 100644 --- a/R/pkg/inst/tests/testthat/test_client.R +++ b/R/pkg/inst/tests/testthat/test_client.R @@ -37,9 +37,7 @@ test_that("multiple packages don't produce a warning", { test_that("sparkJars sparkPackages as character vectors", { args <- generateSparkSubmitArgs("", "", c("one.jar", "two.jar", "three.jar"), "", - c("com.databricks:spark-avro_2.10:2.0.1", - "com.databricks:spark-csv_2.10:1.3.0")) + c("com.databricks:spark-avro_2.10:2.0.1")) expect_match(args, "--jars one.jar,two.jar,three.jar") - expect_match(args, - "--packages com.databricks:spark-avro_2.10:2.0.1,com.databricks:spark-csv_2.10:1.3.0") + expect_match(args, "--packages com.databricks:spark-avro_2.10:2.0.1") }) |