|
29 | 29 | #' \code{mirrorUrl} specifies the remote path to a Spark folder. It is followed by a subfolder
|
30 | 30 | #' named after the Spark version (that corresponds to SparkR), and then the tar filename.
|
31 | 31 | #' The filename is composed of four parts, i.e. [Spark version]-bin-[Hadoop version].tgz.
|
32 |
| -#' For example, the full path for a Spark 2.0.0 package for Hadoop 2.7 from |
33 |
| -#' \code{http://apache.osuosl.org} has path: |
34 |
| -#' \code{http://apache.osuosl.org/spark/spark-2.0.0/spark-2.0.0-bin-hadoop2.7.tgz}. |
| 32 | +#' For example, the full path for a Spark 3.3.1 package from |
| 33 | +#' \code{https://archive.apache.org} has path: |
| 34 | +#' \code{http://archive.apache.org/dist/spark/spark-3.3.1/spark-3.3.1-bin-hadoop3.tgz}. |
35 | 35 | #' For \code{hadoopVersion = "without"}, [Hadoop version] in the filename is then
|
36 | 36 | #' \code{without-hadoop}.
|
37 | 37 | #'
|
38 |
| -#' @param hadoopVersion Version of Hadoop to install. Default is \code{"2.7"}. It can take other |
39 |
| -#' version number in the format of "x.y" where x and y are integer. |
| 38 | +#' @param hadoopVersion Version of Hadoop to install. Default is \code{"3"}. |
40 | 39 | #' If \code{hadoopVersion = "without"}, "Hadoop free" build is installed.
|
41 | 40 | #' See
|
42 | 41 | #' \href{https://spark.apache.org/docs/latest/hadoop-provided.html}{
|
43 | 42 | #' "Hadoop Free" Build} for more information.
|
44 |
| -#' Other patched version names can also be used, e.g. \code{"cdh4"} |
| 43 | +#' Other patched version names can also be used. |
45 | 44 | #' @param mirrorUrl base URL of the repositories to use. The directory layout should follow
|
46 | 45 | #' \href{https://www.apache.org/dyn/closer.lua/spark/}{Apache mirrors}.
|
47 | 46 | #' @param localDir a local directory where Spark is installed. The directory contains
|
|
65 | 64 | #' @note install.spark since 2.1.0
|
66 | 65 | #' @seealso See available Hadoop versions:
|
67 | 66 | #' \href{https://spark.apache.org/downloads.html}{Apache Spark}
|
68 |
| -install.spark <- function(hadoopVersion = "2.7", mirrorUrl = NULL, |
| 67 | +install.spark <- function(hadoopVersion = "3", mirrorUrl = NULL, |
69 | 68 | localDir = NULL, overwrite = FALSE) {
|
70 | 69 | sparkHome <- Sys.getenv("SPARK_HOME")
|
71 | 70 | if (isSparkRShell()) {
|
@@ -251,7 +250,7 @@ defaultMirrorUrl <- function() {
|
251 | 250 | hadoopVersionName <- function(hadoopVersion) {
|
252 | 251 | if (hadoopVersion == "without") {
|
253 | 252 | "without-hadoop"
|
254 |
| - } else if (grepl("^[0-9]+\\.[0-9]+$", hadoopVersion, perl = TRUE)) { |
| 253 | + } else if (grepl("^[0-9]+$", hadoopVersion, perl = TRUE)) { |
255 | 254 | paste0("hadoop", hadoopVersion)
|
256 | 255 | } else {
|
257 | 256 | hadoopVersion
|
|
0 commit comments