Skip to content
Snippets Groups Projects
Commit b4baf086 authored by Felix Cheung's avatar Felix Cheung Committed by Shivaram Venkataraman
Browse files

[SPARKR][MINOR] R examples and test updates

## What changes were proposed in this pull request?

Minor example updates

## How was this patch tested?

manual

shivaram

Author: Felix Cheung <felixcheung_m@hotmail.com>

Closes #14171 from felixcheung/rexample.
parent 51a6706b
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# #
library(SparkR) library(SparkR)
sparkSession <- sparkR.session() sparkR.session()
helloTest <- SparkR:::callJStatic("sparkR.test.hello", helloTest <- SparkR:::callJStatic("sparkR.test.hello",
"helloWorld", "helloWorld",
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
library(SparkR) library(SparkR)
library(sparkPackageTest) library(sparkPackageTest)
sparkSession <- sparkR.session() sparkR.session()
run1 <- myfunc(5L) run1 <- myfunc(5L)
......
...@@ -195,3 +195,6 @@ results <- collect(sql("FROM src SELECT key, value")) ...@@ -195,3 +195,6 @@ results <- collect(sql("FROM src SELECT key, value"))
# $example on:jdbc$ # $example on:jdbc$
df <- read.jdbc("jdbc:postgresql:dbserver", "schema.tablename", user = "username", password = "password") df <- read.jdbc("jdbc:postgresql:dbserver", "schema.tablename", user = "username", password = "password")
# $example off:jdbc$ # $example off:jdbc$
# Stop the SparkSession now
sparkR.session.stop()
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
library(SparkR) library(SparkR)
# Initialize SparkSession # Initialize SparkSession
sc <- sparkR.session(appName = "SparkR-DataFrame-example") sparkR.session(appName = "SparkR-DataFrame-example")
# Create a simple local data.frame # Create a simple local data.frame
localDF <- data.frame(name=c("John", "Smith", "Sarah"), age=c(19, 23, 18)) localDF <- data.frame(name=c("John", "Smith", "Sarah"), age=c(19, 23, 18))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment