Github user shivaram commented on a diff in the pull request:
https://github.com/apache/spark/pull/13635#discussion_r67263062
--- Diff: R/pkg/R/sparkR.R ---
@@ -270,27 +291,97 @@ sparkRSQL.init <- function(jsc = NULL) {
#'}
sparkRHive.init <- function(jsc = NULL) {
- if (exists(".sparkRHivesc", envir = .sparkREnv)) {
- return(get(".sparkRHivesc", envir = .sparkREnv))
+ .Deprecated("sparkR.session.getOrCreate")
+
+ if (exists(".sparkRsession", envir = .sparkREnv)) {
+ return(get(".sparkRsession", envir = .sparkREnv))
}
- # If jsc is NULL, create a Spark Context
- sc <- if (is.null(jsc)) {
- sparkR.init()
- } else {
- jsc
+ # Default to without Hive support for backward compatibility.
+ sparkR.session.getOrCreate(enableHiveSupport = TRUE)
+}
+
+#' Get the existing SparkSession or initialize a new SparkSession.
+#'
+#' Additional Spark properties can be set (...), and these named
parameters take priority over
+#' over values in master, appName, named lists of sparkConfig.
+#'
+#' @param master The Spark master URL
+#' @param appName Application name to register with cluster manager
+#' @param sparkHome Spark Home directory
+#' @param sparkConfig Named list of Spark configuration to set on worker
nodes
+#' @param sparkExecutorConfig Named list of Spark configuration to be used
when launching executors
--- End diff --
I think these are environment variables rather than Spark config entries ?
(At least thats what it looks like based on the example below). Would be good
to clarify the difference between this and `sparkConfig`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]