当前位置:网站首页>【presto 】presto 新版本升级详情
【presto 】presto 新版本升级详情
2022-07-28 16:24:00 【kiraraLou】
一、前言
升级版本:
旧版本:0.220 → 新版本: 0.269
升级目的:
- 新版本对于老版本做了很多优化,提高服务稳定性。
- 新版本需要兼容老版本的功能,并且对业务方是透明的。
- 引入更为严格的内存判断策略。
新版本提升:
- 增加了很多函数
- query.initial-hash-partitions 由默认的8 改为 100
- 对于hive的orc格式数据有更好的支持
- hive可以根据文件大小进行称重拆分的支持,从而在文件较小时允许更深的工作人员拆分队列
- 修复了底层数据格式为parquet查询结果不一致问题
- 修复了大量bug
- 更多有关升级内容详情见:https://prestodb.io/docs/current/release/release-0.269.html
老版本二次开发详情如下:
- presto 支持递归查询 hive视图 (presto默认是不支持hive视图功能的)
- presto password 认证插件 (自开发插件,用于python 代码客户端的身份认证,只做认证,不涉及到权限)
为了兼容老版本,以及提高稳定性 新版本改动如下:
| 功能 | 目的 | |
|---|---|---|
| 1 | 支持递归查询hive视图功能 | 兼容老版本 |
| 2 | 原生的password 认证插件 | 替代自开发插件 |
| 3 | 支持老版本 password 认证插件 | 兼容老版本 |
| 4 | 修改 general memory pool的内存不足判断策略 | 提高稳定性 |
| 5 | 修改log4j的版本,防止jni注入 | 安全性 |
| 6 | 使用jdk11 | 提高稳定性 |
升级方案:
此次升级无法采用滚动升级(新老服务不兼容),搭建一套新版本服务,将 presto 软连接挂到新版本上,然后停掉老版本集群,新版本集群沿用旧集群的配置。
升级时间:
由于无法采用滚动升级,所以升级时间选择在业务低峰期进行
升级步骤:
- 批量拷贝 presto 安装包到 /usr/local 目录下 => /usr/local/presto-server-0.269
- 批量拷贝 jdk11 安装包到 /home/rong 目录下 => /home/rong/jdk-11.0.14
- 添加软连接 ln -s /home/rong/jdk-11.0.14 jdk11
- 更新下发 worker 节点的config.properties 配置文件
- 更新下发 condition 节点config.properties 配置文件
- 初始化节点配置信息脚本,目的是更新 worker 节点的node.properties 配置文件中的host信息
- 停止旧集群服务
- 修改软连接到新版本服务
- 启动&验证新版本服务
升级影响:
redash 理论无影响
tableau 理论无影响
python 客户端代码 理论无影响
回退方案:
将软连接重新挂回旧版本,重新启动旧集群。
二、支持HIVE视图
参考以下文章,并结合新版本进行移植适配 (done)
- https://github.com/prestodb/presto/pull/9031
- https://blog.csdn.net/hjw199089/article/details/81415444
三、内存不足判断策略
1什么时候集群内存不足?

备注: 由于 RESERVED_POOL 配置文件中没有开启,所以判断条件就只剩 GENERAL_POOL 是否出现阻塞节点
2 什么条件判断节点是否阻塞(内存不足)?

if (poolInfo.getFreeBytes() + poolInfo.getReservedRevocableBytes() <= 0) {
blockedNodes++;
}
目的:为了更快的触发内存保护策略。

修改:
原来是 poolInfo.getFreeBytes <= 0, 改为小于pool MaxByte的80%,提前触发内存保护策略
此功能是针对与 GENERAL_POOL的改动,并不能完全解决 OOM的问题,因为还有一部分内存是Presto 无法监控到的,所以节点还是有OOM的风险。
参考:
http://armsword.com/2020/02/18/presto-memory-kill-policy/
http://armsword.com/2018/05/22/the-memory-management-and-tuning-experience-of-presto/
http://armsword.com/2019/11/13/the-configuration-settings-of-presto-memory-management/
四、password-file-authenticators 插件
此插件为自定义插件,目的是用来进行身份认证。并不做权限管理。
此插件功能与password-authenticators 官方插件功能基本一致。
区别:
password-file-authenticators 插件的用户名密码为明文

password-authenticators 插件的密码为密文

自定义开发的插件也已经在新版移植适配过了,目前两种插件都可以使用。功能是一样的。
边栏推荐
- The actual combat of the beego framework of goweb development: Section III program execution process analysis
- Verilog 每日一题(VL14 自动贩售机1--FSM常见题型)
- Codeforces round 770 (Div. 2) F. Fibonacci additions (construction + difference)
- Proof of the third scene (f) in 22 years
- 【atlas】atlas 编译报错整理(全)
- 配置V530交换机步骤
- Ugui learning notes (II) Scrollview related
- 如何在构建阶段保护镜像安全
- Create a custom paging control
- 我为什么选择使用Go语言?
猜你喜欢

【impala】【报错解决】 Impala cannot read or execute the parent directory of dfs.domain.socket.path的解决方法

高速电路中电感的选型和应用

Fine-grained Fact Verification with Kernel GA Network

带参数的微信小程序二维码生成

连接设计与测试平台——SystemVerilog 接口知识点总结

Goweb开发之Beego框架实战:第二节 项目初始化配置

Reasoning Over Semantic-Level Graph for Fact Checking

Unity shader uses rendered texture to achieve glass effect

Unity shader cartoon style rendering

Verilog 每日一题(VL26 简易秒表)
随机推荐
Using MVC in the UI of unity
零基础利用Unity3D开发AR应用并远程下载3D模型
Valarray Library Learning
微服务架构-服务注册中心和服务网关(6.8) (转载)
侦察机与预警机的区别
【atlas】atlas 编译报错整理(全)
Soft exam review summary
Verilog daily question (vl29 single port RAM)
Atcoder regular contest 133 d.range XOR (digital dp+ classification discussion)
wpf命令按钮透明样式
Visual Studio 2015 团队开发之Azure DevOps篇
火了 2 年的服务网格究竟给微服务带来了什么?(转载)
Educational codeforces round 126 (rated for Div. 2) f.teleporters (two sets and two points)
Games101-assignment05 ray tracing - rays intersect triangles
Read excel xlsx format file in unity
The actual combat of the beego framework of goweb development: Section III program execution process analysis
mysql 最大建议行数2000w,靠谱吗?
Codeforces round 770 (Div. 2) e. fair share
Unity shader procedural texture
Use of influxdb2