Skip to content
Closed
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion R/pkg/R/client.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ determineSparkSubmitBin <- function() {
sparkSubmitBinName
}

# R supports both file separator in the file path (Unix : / and Windows: \) irrespective
# of the operating system. So, this should be manaully changed.
determinefileSeperator <- function() {
if (.Platform$OS.type == "windows") {
fileSeperator <- "\\"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: separator not seperator

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much.

} else {
fileSeperator <- .Platform$file.sep
}
fileSeperator
}

generateSparkSubmitArgs <- function(args, sparkHome, jars, sparkSubmitOpts, packages) {
jars <- paste0(jars, collapse = ",")
if (jars != "") {
Expand All @@ -63,7 +74,8 @@ generateSparkSubmitArgs <- function(args, sparkHome, jars, sparkSubmitOpts, pack
launchBackend <- function(args, sparkHome, jars, sparkSubmitOpts, packages) {
sparkSubmitBinName <- determineSparkSubmitBin()
if (sparkHome != "") {
sparkSubmitBin <- file.path(sparkHome, "bin", sparkSubmitBinName)
fileSeperator <- determinefileSeperator()
sparkSubmitBin <- file.path(sparkHome, "bin", sparkSubmitBinName, fsep = fileSeperator)
} else {
sparkSubmitBin <- sparkSubmitBinName
}
Expand Down