# 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")
时间: 2024-10-11 13:43:04