This is an automated email from the ASF dual-hosted git repository.
iwasakims pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/branch-3.4 by this push:
new cf0d6ad92 BIGTOP-4122. Fix test failure of SparkR on openEuler due to
lack of R deployment. (#1277)
cf0d6ad92 is described below
commit cf0d6ad921af2bac5a64354452a9e79c7c7d6b40
Author: Masatake Iwasaki <[email protected]>
AuthorDate: Mon May 19 21:48:31 2025 +0900
BIGTOP-4122. Fix test failure of SparkR on openEuler due to lack of R
deployment. (#1277)
(cherry picked from commit 3437b01b7c864dccde1c34065966b5f3c935c52e)
---
.../puppet/modules/spark/manifests/init.pp | 31 +++++++++-------------
bigtop-packages/src/rpm/spark/SPECS/spark.spec | 5 ++++
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/bigtop-deploy/puppet/modules/spark/manifests/init.pp
b/bigtop-deploy/puppet/modules/spark/manifests/init.pp
index 034dc14b2..c6b052e28 100644
--- a/bigtop-deploy/puppet/modules/spark/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/spark/manifests/init.pp
@@ -162,25 +162,20 @@ class spark {
}
class sparkr {
- # BIGTOP-3579. On these distros, the default version of R is earlier than
3.5.0,
- # which is required to run SparkR. So the newer version of R is installed
here.
- if (($operatingsystem == 'Ubuntu' and
versioncmp($operatingsystemmajrelease, '18.04') <= 0) or
- ($operatingsystem == 'Debian' and
versioncmp($operatingsystemmajrelease, '10') < 0)) {
- $url = "http://cran.r-project.org/src/base/R-3/"
- $rfile = "R-3.6.3.tar.gz"
- $rdir = "R-3.6.3"
+ if ($operatingsystem == 'openEuler') {
+ $rurl = "https://cran.r-project.org/src/base/R-4/"
+ $rfile = "R-4.4.3.tar.gz"
+ $rdir = "R-4.4.3"
$pkgs = [
- "g++",
- "gcc",
- "gfortran",
- "libbz2-dev",
- "libcurl4-gnutls-dev",
- "liblzma-dev",
- "libpcre3-dev",
- "libreadline-dev",
- "libz-dev",
- "make",
+ "bzip2-devel",
+ "gcc-c++",
+ "gcc-gfortran",
+ "libcurl-devel",
+ "perl-Digest-SHA",
+ "pcre-devel",
+ "readline-devel",
+ "xz-devel",
]
package { $pkgs:
ensure => installed,
@@ -189,7 +184,7 @@ class spark {
exec { "download_R":
cwd => "/usr/src",
- command => "/usr/bin/wget $url/$rfile && mkdir -p $rdir && /bin/tar
-xvzf $rfile -C $rdir --strip-components=1 && cd $rdir",
+ command => "/usr/bin/wget $rurl/$rfile && mkdir -p $rdir && /bin/tar
-xvzf $rfile -C $rdir --strip-components=1 && cd $rdir",
creates => "/usr/src/$rdir",
}
exec { "install_R":
diff --git a/bigtop-packages/src/rpm/spark/SPECS/spark.spec
b/bigtop-packages/src/rpm/spark/SPECS/spark.spec
index 6bbf902f0..1b11e2f77 100644
--- a/bigtop-packages/src/rpm/spark/SPECS/spark.spec
+++ b/bigtop-packages/src/rpm/spark/SPECS/spark.spec
@@ -165,7 +165,12 @@ Spark YARN Shuffle Service
%package -n %{spark_pkg_name}-sparkr
Summary: R package for Apache Spark
Group: Development/Libraries
+
+%if 0%{?openEuler}
+Requires: %{spark_pkg_name}-core = %{version}-%{release}
+%else
Requires: %{spark_pkg_name}-core = %{version}-%{release}, R
+%endif
%description -n %{spark_pkg_name}-sparkr
SparkR is an R package that provides a light-weight frontend to use Apache
Spark from R.