赞
踩
安装包:
cd /opt/datasophon/DDP/packages
tar zxvf spark-3.4.1.tar.gz -C /opt/datasophon/DDP/packages
tar zxvf spark-3.1.3.tar.gz -C /opt/datasophon/DDP/packages
cd /opt/datasophon/DDP/packages
chown -R root:root spark-3.4.1
cd /opt/datasophon/DDP/packages/spark-3.4.1
mkdir logs pid work
scp -r /opt/datasophon/DDP/packages/spark-3.1.3/jmx /opt/datasophon/DDP/packages/spark-3.4.1
scp -r /opt/datasophon/DDP/packages/spark-3.1.3/carbonlib /opt/datasophon/DDP/packages/spark-3.4.1
mv /opt/datasophon/DDP/packages/spark-3.4.1/sbin/spark-daemon.sh /opt/datasophon/DDP/packages/spark-3.4.1/sbin/spark-daemon.sh.bak
scp /opt/datasophon/DDP/packages/spark-3.1.3/conf/ranger-spark-security.xml /opt/datasophon/DDP/packages/spark-3.4.1/conf
scp /opt/datasophon/DDP/packages/spark-3.1.3/conf/spark-defaults.conf /opt/datasophon/DDP/packages/spark-3.4.1/conf
scp /opt/datasophon/DDP/packages/spark-3.1.3/conf/carbon.properties /opt/datasophon/DDP/packages/spark-3.4.1/conf
scp /opt/datasophon/DDP/packages/spark-3.1.3/conf/spark-env.sh /opt/datasophon/DDP/packages/spark-3.4.1/conf
scp /opt/datasophon/DDP/packages/spark-3.1.3/conf/ranger-spark-audit.xml /opt/datasophon/DDP/packages/spark-3.4.1/conf
scp /opt/datasophon/DDP/packages/spark-3.1.3/jars/submarine-spark-security-0.6.0.jar /opt/datasophon/DDP/packages/spark-3.4.1/jars
cd /opt/datasophon/DDP/packages/spark-3.4.1/conf/
ln -s /opt/datasophon/hadoop-3.3.6/etc/hadoop/core-site.xml /opt/datasophon/DDP/packages/spark-3.4.1/conf/core-site.xml
ln -s /opt/datasophon/hadoop-3.3.6/etc/hadoop/hdfs-site.xml /opt/datasophon/DDP/packages/spark-3.4.1/conf/hdfs-site.xml
ln -s /opt/datasophon/hive-3.1.3/conf/hive-site.xml /opt/datasophon/DDP/packages/spark-3.4.1/conf/hive-site.xml
ln -s /opt/datasophon/hadoop-3.3.6/etc/hadoop/yarn-site.xml /opt/datasophon/DDP/packages/spark-3.4.1/conf/yarn-site.xml
vi /opt/datasophon/DDP/packages/spark-3.4.1/conf/spark-env.sh
cd /opt/datasophon/DDP/packages
mv spark-3.4.1.tar.gz spark-3.4.1.tar.gz.bak -- 备份
tar czf spark-3.4.1.tar.gz spark-3.4.1 -- 重新打包
3.2生成加密码
md5sum spark-3.4.1.tar.gz
echo '8d9ee35827dd3fbb758bf592c27bdbd4' > spark-3.4.1.tar.gz.md5
rm -rf /opt/datasophon/spark*
cd /opt/datasophon/DDP/packages/datasophon-manager-1.1.3/conf/meta/DDP-1.1.3/
vi /opt/datasophon/DDP/packages/datasophon-manager-1.1.3/conf/meta/DDP-1.1.3/SPARK3/service_ddl.json
*datasophon-manager-1.1.3 为当前的datasohon安装版本,可能多处地方需要修改
vi /etc/profile.d/datasophon-env.sh
grep -r "spark-3.1.3" /opt/datasophon/DDP/packages/
grep -r "spark-3.1.3" /etc/profile.d/
echo ${SPARK_HOME}
source /etc/profile
echo ${SPARK_HOME}
6.3重启服务器
reboot
echo ${SPARK_HOME}
*不重启SPARK_HOME的环境变量安装时还是不生效
rm -rf /opt/datasophon/DDP/packages/datasophon-manager-1.1.3/logs/*
/opt/datasophon/DDP/packages/datasophon-manager-1.1.3/bin/datasophon-api.sh restart api
cd /opt/datasophon/DDP/packages/datasophon-manager-1.1.3/logs
查看相应的表配置数据
select * from t_ddh_frame_service;
select * from t_ddh_frame_service_role;
spark-submit --master yarn --deploy-mode client --queue default --num-executors 2 --driver-memory 1g --class org.apache.spark.examples.SparkPi /opt/datasophon/spark-3.4.1/examples/jars/spark-examples_2.13-3.4.1.jar 1
spark-submit --master yarn --deploy-mode cluster --queue default --num-executors 2 --driver-memory 1g --class org.apache.spark.examples.SparkPi /opt/datasophon/spark-3.4.1/examples/jars/spark-examples_2.13-3.4.1.jar 1
集群提交,日志需要在yarn上查看
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。