Learn R Programming

analysisPipelines (version 1.0.2)

sparkRSessionCreateIfNotPresent: Connect to a Spark session

Description

Connect to a Spark session

Usage

sparkRSessionCreateIfNotPresent(...)

Arguments

...

Arguments to sparkR.session

Details

Loads the SparkR package and intializes a Spark session from R

See Also

Other Spark utilities: castKafkaStreamAsString, convertKafkaValueFromJson

Examples

Run this code
# NOT RUN {
sparkHome <- "/Users/naren/softwares/spark-2.3.1-bin-hadoop2.7/"
sparkMaster <- "local[1]"
sparkPackages <- c("org.apache.spark:spark-sql-kafka-0-10_2.11:2.3.1")
sparkRSessionCreateIfNotPresent(master = sparkMaster,
 sparkPackages = sparkPackages)
# }

Run the code above in your browser using DataLab