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

自定义开发的插件也已经在新版移植适配过了,目前两种插件都可以使用。功能是一样的。
边栏推荐
- 2021年4月份自考
- 零基础利用Unity3D开发AR应用并远程下载3D模型
- Verilog 每日一题(VL29 单端口RAM)
- Goweb开发之Beego框架实战:第三节 程序执行流程分析
- Codeworks round 801 (Div. 2) and epic Institute of technology round D. tree queries (tree DP)
- Read excel xlsx format file in unity
- Verilog daily question (vl8 uses generate... For statement to simplify code)
- kubernetes service 原理解析
- C# 导入Excel文件数据的几种方法
- Facet experience -- the development side of dragon game client
猜你喜欢

Unity shader realizes water wave effect with noise texture

Microservice Architecture - service registry and service gateway (6.8) (Reprint)

火了 2 年的服务网格究竟给微服务带来了什么?(转载)

Unity shader procedural texture

Use of influxdb2

The maximum recommended number of rows for MySQL is 2000W. Is it reliable?

Introduction to vscade interface

The practice of beego framework developed by goweb: Section 4 database configuration and connection

Vscode界面介绍

利用SQL Server代理作业对数据库进行定时还原
随机推荐
UNIQUE VISION Programming Contest 2022(AtCoder Beginner Contest 248)G. GCD cost on the tree
Goweb开发之Iris框架实战:项目总结与回顾
部分情况下Error:(xx, xx) Failed to resolve: xxxxxx解决。
异步FIFO基本原理(基于Verilog的简单实现)
《Kubernetes》你需要掌握的 Service 和 Ingress
Verilog daily question (vl8 uses generate... For statement to simplify code)
Function接口之andThen
Round 1C 2022 - Code jam 2022 b.square (Mathematics, thinking)
一文了解 Kubernetes 中的服务发现
Atcoder regular contest 133 d.range XOR (digital dp+ classification discussion)
Codeforces Round #750 (Div. 2) F.Korney Korneevich and XOR (easy&&hard version)(dp)
高速电路中电阻的选择
The 16th program design competition of Dalian University of Technology (Problem Solver)
The practice of beego framework developed by goweb: Section 4 database configuration and connection
数据库故障容错之系统时钟故障
2022 Niuke multi school second CDE
Goweb开发之Beego框架实战:第三节 程序执行流程分析
Difference between reconnaissance aircraft and early warning aircraft
Verilog 每日一题 (VL28 加减计数器)
Ugui learning notes (IV) ugui event system overview and Usage Summary