二十一:CDH5.14离线安装Apache Spark 2

一:当有需要CDH安装Apache Spark 2时:

老规矩,从官网开始:
https://www.cloudera.com/documentation.html
https://www.cloudera.com/documentation/spark2/latest/topics/spark2_installing.html

注意几个重要的提示:
在这里插入图片描述
在这里插入图片描述

二:按步骤进行安装:

2.1:查看自己需要安装的版本:

a:To download the CDS Powered by Apache Spark service descriptor, in the Version Information table in CDS Versions Available for Download, click the service descriptor link for the version you want to install.
https://www.cloudera.com/documentation/spark2/latest/topics/spark2_packaging.html#versions
在这里插入图片描述
[root@hadoop001 spark_parcels]# ll
total 176488
-rw-r–r-- 1 root root 5201 Feb 5 2018 manifest.json
-rw-r–r-- 1 root root 180709419 Feb 5 2018 SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354-el7.parcel
-rw-r–r-- 1 root root 41 Feb 5 2018 SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354-el7.parcel.sha
[root@hadoop001 spark_parcels]# sha1sum SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354-el7.parcel
96d4bb1be9032a1219e5a2c4bc5c9bec8a55c43e SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354-el7.parcel
[root@hadoop001 spark_parcels]# cat SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354-el7.parcel.sha
96d4bb1be9032a1219e5a2c4bc5c9bec8a55c43e
[root@hadoop001 spark_parcels]# pwd
/var/www/html/spark_parcels
[root@hadoop001 spark_parcels]#

2.2:找到文件位置并下载相应的CDS文件在里面:

b:Log on to the Cloudera Manager Server host, and copy the CDS Powered by Apache Spark service descriptor in the location configured for service descriptor files
c: Set the file ownership of the service descriptor to cloudera-scm:cloudera-scm with permission 644
d:Restart the Cloudera Manager Server with the following command

http://archive.cloudera.com/spark2/csd/
在这里插入图片描述
在这里插入图片描述
[root@hadoop001 csd]# ll
total 20
-rw-r–r-- 1 cloudera-scm cloudera-scm 17473 Feb 5 2018 SPARK2_ON_YARN-2.2.0.cloudera2.jar
[root@hadoop001 csd]# pwd
/opt/cloudera/csd
[root@hadoop001 csd]#

三:下载分配激活如下:

3.In the Cloudera Manager Admin Console, add the CDS Powered by Apache Spark parcel repository to the Remote Parcel Repository URLs in Parcel Settings as described in Parcel Configuration Settings.

4.Download the CDS Powered by Apache Spark parcel, distribute the parcel to the hosts in your cluster, and activate the parcel. See Managing Parcels.
在这里插入图片描述

四:增加SPARK2服务:

五:错误及其他

安装中如果报错如下是因为版本没选择正确,需按看相应“manifest.json” 支持CDH版本不
“depends”: “CDH (>= 5.8), CDH (<< 5.14)”,
在这里插入图片描述
需要下载如下版本:“depends”: “CDH (>= 5.7), CDH (<< 6)”,
Index of /spark2/parcels/2.1.0.cloudera2
SPARK2_ON_YARN-2.2.0.cloudera2.jar

如果重启怎么都看不见spark2,需要检查CDS目录和文件归属权限:
-rw-r–r-- 1 cloudera-scm cloudera-scm 17473 Feb 5 2018 SPARK2_ON_YARN-2.2.0.cloudera2.jar
[root@hadoop001 csd]# pwd
/opt/cloudera/csd
[root@hadoop001 csd]#

检查后:
1.去激活spark2
2.停止集群和CM服务
3.systemctl restart cloudera-scm-server
4.启用集群和CM服务
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weizhonggui/article/details/87897918