当前位置:网站首页>cdh6.x 集成spark-sql
cdh6.x 集成spark-sql
2022-08-04 01:49:00 【涤生大数据】
写在前面
CDH系列默认阉割掉了Spark的spark-sql工具,但是很多公司还是有这个使用的需要,因为线上就有这块的需求,所以结合cdh6.x版本,做了具体的对spark-sql工具支持的集成。
版本说明
组件名称 | 组件版本 |
CDH | CDH 6.2.1 |
spark | spark-2.4.8 |
第一步:下载原生apache spark
# cd /opt/cloudera/parcels/CDH/lib
# wget http://archive.apache.org/dist/spark/spark-2.4.8/spark-2.4.8-bin-hadoop2.7.tgz
# tar zxvf spark-2.4.8-bin-hadoop2.7.tgz
# ln -s spark2 spark-2.4.8-bin-hadoop2.7
第二步:修改spark配置文件
2.1 配置spark-env.sh
|
2.2 配置spark-defaults.conf
小提示:建议直接cp 现有spark的配置文件,在此基础上修改。
|
Vim /opt/cloudera/parcels/CDH/lib/spark2/conf/spark-defaults.conf
小提示:修改配置文件时,只需要修改文件中标红部分即可,其他可以保持默认。
|
2.3 配置日志级别
# vim /opt/cloudera/parcels/CDH/lib/spark2/conf/log4j.properties
在配置文件中追加以下配置项,其他保持默认
|
第三步:配置依赖包
3.1 上传spark 依赖jar包
|
3.2 配置lzo jar包
|
第四步:配置spark-sql 的全局变量
vim /etc/profile.d/spark.sh
|
#生效
|
第五步:测试使用
全局的任意位置执行 spark-sql指令(注意:执行的linux用户需要有提交任务到yarn的权限)
如果都没有问题,执行show databases ;会看到集群中的所有库。
补充说明:其他客户端如果需要此环境,将上述配置全部scp过去即可。
边栏推荐
- Kubernetes:(十一)KubeSphere的介绍和安装(华丽的篇章)
- Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment
- Apache DolphinScheduler新一代分布式工作流任务调度平台实战-中
- Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment
- 工程制图名词解释-重点知识
- What is SVN (Subversion)?
- 敏捷交付的工程效能治理
- DDTL:远距离的域迁移学习
- 【store商城项目01】环境准备以及测试
- initramfs详解----添加硬盘驱动并访问磁盘
猜你喜欢
Priority_queue element as a pointer, the overloaded operators
Engineering drawing review questions (with answers)
The idea of the diagram
工程制图复习题(带答案)
实例037:排序
nodejs+npm的安装与配置
Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment
What is SVN (Subversion)?
ASP.NET 获取数据库的数据并写入到excel表格中
2022年上半年各大厂Android面试题整理及答案解析(持续更新中......)
随机推荐
priority_queue元素为指针时,重载运算符失效
简单排序(暑假每日一题 14)
持续投入商品研发,叮咚买菜赢在了供应链投入上
Promise 解决阻塞式同步,将异步变为同步
Android interview questions and answer analysis of major factories in the first half of 2022 (continuously updated...)
Small Turtle Compilation Notes
Multithreading JUC Learning Chapter 1 Steps to Create Multithreading
GNSS文章汇总
阿里云技术专家邓青琳:云上跨可用区容灾和异地多活最佳实践
nodejs+npm的安装与配置
可变字符串
Slipper - virtual point, shortest path
Analysis of usage scenarios of mutex, read-write lock, spin lock, and atomic operation instructions xaddl and cmpxchg
【无标题】
MongoDB数据接入实践
Hey, I had another fight with HR in the small group!
安全至上:落地DevSecOps最佳实践你不得不知道的工具
Promise solves blocking synchronization and turns asynchronous into synchronous
Use nodejs switch version (no need to uninstall and reinstall)
Flask Framework Beginner-05-Command Management Manager and Database Use