This is an automated email from the ASF dual-hosted git repository.
iwasakims pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/master by this push:
new 9142d97 BIGTOP-3579. Spark smoke test fails on Debian 9 and Ubuntu
18.04. (#808)
9142d97 is described below
commit 9142d97f644013d9f11cf27c1361864b91719216
Author: Kengo Seki <[email protected]>
AuthorDate: Fri Aug 13 17:17:49 2021 +0900
BIGTOP-3579. Spark smoke test fails on Debian 9 and Ubuntu 18.04. (#808)
---
.../puppet/modules/spark/manifests/init.pp | 40 ++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/bigtop-deploy/puppet/modules/spark/manifests/init.pp
b/bigtop-deploy/puppet/modules/spark/manifests/init.pp
index 7de95a1..2d4a3da 100644
--- a/bigtop-deploy/puppet/modules/spark/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/spark/manifests/init.pp
@@ -136,6 +136,46 @@ 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"
+
+ $pkgs = [
+ "g++",
+ "gcc",
+ "gfortran",
+ "libbz2-dev",
+ "libcurl4-gnutls-dev",
+ "liblzma-dev",
+ "libpcre3-dev",
+ "libreadline-dev",
+ "libz-dev",
+ "make",
+ ]
+ package { $pkgs:
+ ensure => installed,
+ before => [Exec["install_R"]],
+ }
+
+ 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",
+ creates => "/usr/src/$rdir",
+ }
+ exec { "install_R":
+ cwd => "/usr/src/$rdir",
+ command => "/usr/src/$rdir/configure --with-recommended-packages=yes
--without-x --with-cairo --with-libpng --with-libtiff --with-jpeglib
--with-tcltk --with-blas --with-lapack --enable-R-shlib --prefix=/usr/local &&
/usr/bin/make && /usr/bin/make install && /sbin/ldconfig",
+ creates => "/usr/local/bin/R",
+ require => [Exec["download_R"]],
+ before => [Package["spark-sparkr"]],
+ timeout => 3000
+ }
+ }
+
package { 'spark-sparkr':
ensure => latest,
}