presto安装

下载和解压

#下载页面 http://prestodb.github.io/download.html
服务端:
presto-server-0.227.tar
客户端:
presto-cli-0.227-executable

配置文件目录结构及路径

/opt/presto-server-0.266.1/etc/
├── catalog
│   ├── cassandra.properties
│   └── mysql.properties
├── config.properties
├── jvm.config
├── log.properties

即需要在presto-server中先创建/etc,再创建配置文件

配置文件内容

config.properties

该方法为单机部署,分布式部署请参阅文档:https://prestodb.github.io/docs/current/installation/deployment.html

coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8080
query.max-memory=5GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB
discovery-server.enabled=true
discovery.uri=http://192.168.1.90:8080
exchange.http-client.request-timeout=300s

jvm.config

-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
-Djdk.attach.allowAttachSelf=true

log.properties

com.facebook.presto=DEBUG

node.properties

node.data-dir:日志文件地址,需要创建对应目录

node.environment=production
node.id=presto1
node.data-dir=/opt/presto-server-0.266.1/data

catalog 数据库节点配置

全部配置可参考文档:https://prestodb.io/docs/current/connector.html

cassandra.properties

connector.name=cassandra
cassandra.contact-points=192.168.1.1 #cassandra节点
cassandra.client.read-timeout=500s

mysql.properties

connector.name=mysql
connection-url=jdbc:mysql://localhost:3306
connection-user=root
connection-password=123456

启动

前台启动(可以查看输出日志)关窗口就停

./presto-server-0.266.1/bin/launcher run

启动成功,最后一条日志

2021-12-22T16:07:48.921+0800 INFO main com.facebook.presto.server.PrestoServer ======== SERVER STARTED ========

后台启动

./presto-server-0.266.1/bin/launcher start

关机

launcher stop

客户端连接

客户端:
presto-cli-0.227-executable
重命名为presto
执行命令:./presto

监控页面

http://localhost:8080/ui/#

参考文档

https://blog.csdn.net/weixin_41008393/article/details/90269228
https://prestodb.io/docs/current/connector.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值