Rstudio & SparkR

# Set this to where Spark is installed
Sys.setenv(SPARK_HOME="/Users/shivaram/spark")
# This line loads SparkR from the installed directory
.libPaths(c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"), .libPaths()))
library(SparkR)
sc <- sparkR.init(master="local") or sc <- sparkR.init(master="spark://Master.Hadoop:7077")

你可能感兴趣的:(Rstudio & SparkR)