当前位置: 首页 > news >正文

Presto 文档和笔记

1. Presto

Presto 官网
Presto 文档

2. 配置

3.1 node 配置

cat etc/node.properties 
# Generated by Apache Ambari. Fri Feb 10 14:52:10 2023node.data-dir=/mnt/bmr/presto/data
node.environment=production
node.id=bmr-master-4b7cbaa

3.2 jvm 配置

cat etc/jvm.config 
-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError

3.3 config 配置

3.3.1 master 端配置

[root@bmr-master-4b7cbaa presto]# cat etc/config.properties 
# Generated by Apache Ambari. Fri Feb 10 14:52:10 2023coordinator=true
discovery-server.enabled=true
discovery.uri=http://bmr-master-4b7cbaa:8089
http-server.http.port=8089
node-scheduler.include-coordinator=false
query.max-memory=50GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB

3.3.2 worker 端配置

[root@bmr-core-16157a3-1 ~]# cat /opt/bmr/presto/etc/config.properties 
# Generated by Apache Ambari. Fri Feb 10 14:49:23 2023coordinator=false
discovery.uri=http://bmr-master-4b7cbaa:8089
http-server.http.port=8089
node-scheduler.include-coordinator=false
query.max-memory=50GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB

3.4 hive catalog 配置

[root@bmr-master-4b7cbaa presto]# cat etc/catalog/hive.properties 
# Generated by Apache Ambari. Fri Feb 10 14:52:10 2023connector.name=hive-hadoop2
hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop/conf/hdfs-site.xml
hive.metastore.uri=thrift://bmr-master-4b7cbaa:9083
hive.non-managed-table-creates-enabled=true
hive.non-managed-table-writes-enabled=true

3 运行 Presto 命令

[root@bmr-master-4b7cbaa presto]# bin/presto-cli-0.219-executable.jar --server localhost:8089 --catalog hive --schema default
presto:default> show tables;Table   
----------filter   t1       v_filter 
(3 rows)Query 20230214_005709_00002_6tcin, FINISHED, 4 nodes
Splits: 53 total, 53 done (100.00%)
0:00 [3 rows, 67B] [6 rows/s, 146B/s]

4. Presto 访问其他集群的方案

4.1 同步 /etc/hosts

把要访问集群的服务器配置放到 Presto 集群所有服务器的 /etc/hosts

4.2 修改 hive.properties

使用 ambari 把 Presto 的 hive.properties 的 hive.metastore.uri 参数的值为其他集群。

4.3 重启 Presto

使用 ambari 重启 Presto。可以访问其他集群的 HDFS 上的数据。但是不能访问 bos 的数据,因为 Presto 没有 bos 相关的 jar。

http://www.lryc.cn/news/6909.html

相关文章:

  • 大尺度衰落与小尺度衰落
  • 完美解决:重新安装VMware Tools灰色。以及共享文件夹的创建(centos8)
  • 达梦数据库作业管理
  • 数据结构-考研难点代码突破(C++实现树型查找-二叉搜索树(二叉排序树))
  • emqx异常处理
  • Web前端:开始学习ReactJS需要知道什么?
  • 卡诺图化简
  • 带你了解软件测试是做什么的
  • 企业电子招投标采购系统源码之功能模块功能描述
  • 职场中的高手,是如何高质量解决问题?
  • 报表生成工具Stimulsoft中的电子签名和 PDF 数字签名
  • 【Hello Linux】Linux环境下写的第一个程序 -- 进度条
  • 【基础】性能测试,从0到实战(手把手教,非常实用)
  • 07-Java异常分类以及处理机制
  • 用到的C++的相关知识-----未完待续
  • JavaScript刷LeetCode拿offer-贪心算法
  • selenium
  • SpringMVC的视图
  • idea使用本地代码远程调试线上运行代码---windows环境
  • 简单记录简单记录
  • 源码系列 之 ThreadLocal
  • C语言入门(1)——特点及关键字
  • react中useEffect和useLayoutEffect的区别
  • NoSQL(非关系型数据库)与SQL(关系型数据库)的差别
  • new bing的申请与使用教程
  • yaml配置文件
  • 284. 顶端迭代器
  • 自学前端最容易犯的10个的错误,入门学前端快来看看
  • 【ADRC控制】使用自抗扰控制器调节起动机入口压力值
  • 剑指 Offer Day2——链表(简单)