当前位置:网站首页>【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 插件的密码为密文

自定义开发的插件也已经在新版移植适配过了,目前两种插件都可以使用。功能是一样的。
边栏推荐
- 部分情况下Error:(xx, xx) Failed to resolve: xxxxxx解决。
- Unity shader realizes mirror effect with rendered texture
- mysql 最大建议行数2000w,靠谱吗?
- Realization of reflection and refraction effect in unity shader cube texture
- The 2021 ICPC ASIA Taipei Regional programming contest L. leadfoot (combinatorics /2-adic assignment function +kummer theorem)
- Facet experience -- the development side of dragon game client
- Goweb开发之Beego框架实战:第三节 程序执行流程分析
- 侦察机与预警机的区别
- Valarray Library Learning
- Learn about service discovery in kubernetes
猜你喜欢

wpf命令按钮透明样式

Source code of voice live broadcast app

异步FIFO基本原理(基于Verilog的简单实现)

Fine-grained Fact Verification with Kernel GA Network

线性代数及矩阵论(九)

Verilog 每日一题 (VL5 信号发生器)

Basic principle of asynchronous FIFO (simple implementation based on Verilog)

Net framework

Proof of the third scene (f) in 22 years

配置V530交换机步骤
随机推荐
Classroom attendance system based on QT design (using RDS for MySQL cloud database)
Use Alibaba cloud's free SSL certificate
Difference between reconnaissance aircraft and early warning aircraft
【CDH】通过 ClouderaManager 配置CDH组件用 prometheus 监控采集JMX信息
The maximum recommended number of rows for MySQL is 2000W. Is it reliable?
高速电路中电感的选型和应用
C # traversal set
Verilog daily question (vl8 uses generate... For statement to simplify code)
Unity shader procedural texture
我为什么选择使用Go语言?
堡垒机的作用
Mysql database addition, deletion, modification and query (detailed explanation of basic operation commands)
Atcoder regular contest 133 d.range XOR (digital dp+ classification discussion)
Ugui learning notes (III) summary of the use of each control
批量下载文件
Ugui learning notes (IV) ugui event system overview and Usage Summary
Codeforces round 768 (Div. 2) e.paint the middle (greedy / interval relationship processing)
Unity shader realizes mirror effect with rendered texture
valarray数值库学习
Azure Devops developed by visual studio 2015 team