presto+yanagishima环境安装

1,017 阅读2分钟

「这是我参与11月更文挑战的第5天,活动详情查看:2021最后一次更文挑战

大家好,我是怀瑾握瑜,一只大数据萌新,家有两只吞金兽,嘉与嘉,上能code下能teach的全能奶爸

如果您喜欢我的文章,可以[关注⭐]+[点赞👍]+[评论📃],您的三连是我前进的动力,期待与您共同成长~


1. Presto官网教程

prestodb.io/docs/curren…

2. 下载地址

下载安装包:prestodb.io/download.ht…

或使用压缩好的zip包presto-server-0.256.zip

3. 上传升级包

上传到/app中,解压缩

# tar -xvf presto-server-0.256.zip

4. 配置Presto

在安装目录下创建一个etc目录。在etc目录下配置以下信息:

节点属性(Node Properties):每个节点的环境配置信息

JVM配置(JVM Config):JVM的命令行选项

注意:hive3.1,因为权限问题,在该配置中需要增加hadoop用户

-DHADOOP_USER_NAME=hdfs

配置属性(Config Properties):PrestoServer的配置信息

日志级别(Log Properties):日志级别配置信息

Catalog属性(Catalog Properties):连接器配置信息(数据源)

work节点使用config.properties.work配置文件

node.properties,work节点需要更改id

Catalog中连接属性需要根据环境进行配置

4.1. 本次部署presto部署5个点,分别传到5台机器上

4.1.2 修改配置

——————————————coordinator节点配置-----------------------------------------------------------------

修改config.properties

coordinator=true                                           #是coordinator节点
node-scheduler.include-coordinator=true                    #是coordinator节点,同时是woker节点
http-server.http.port=9002                                 # HTTP端口
query.max-memory=6GB
query.max-memory-per-node=2GB
query.max-total-memory-per-node=4GB
discovery-server.enabled=true                              #Presto使用Discovery服务查找群集中的所有节点
discovery.uri=http://cdh1:9002                             #http地址

http-server.http.port: Specifies the port for the HTTP server. Presto uses HTTP for all communication, internal and external.
discovery.uri: The URI to the Discovery server. 
Because we have enabled the embedded version of Discovery in the Presto coordinator, 
this should be the URI of the Presto coordinator.
Replace example.net:8080 to match the host and port of the Presto coordinator. 
This URI must not end in a slash.

——————————————woker节点配置-----------------------------------------------------------------

修改config.properties

coordinator=false                                                        #是coordinator节点
node-scheduler.include-coordinator=false                   #是woker节点
http-server.http.port=9002                                          # HTTP端口
query.max-memory=6GB
query.max-memory-per-node=2GB
query.max-total-memory-per-node=4GB
#discovery-server.enabled=true                             #注释掉
discovery.uri=http://cdh1:9002                             #coordinator节点地址

4.1.2 catalog/hive.properties 修改hive 的连接

connector.name=hive-hadoop2                                  #写死格式
hive.metastore.uri=thrift://cdh1:9083                        #hive.metastore.uri与端口
hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop/conf/hdfs-site.xml       #core-site.xml与hdfs-site.xml 位置
在hive的catalog配置文件中,加入如下配置 hive.parquet.fail-on-corrupted-statistics=false

4.1.3 node.properties 配置

node.environment=dev                                    #集群名称 (统一值)
node.id=presto-node2                                    #本节点名称(唯一值)
node.data-dir=/data1/presto/data                        #自定义数据路径 

4.1.4 catalog/kudu.properties

cat kudu.properties
connector.name=kudu
kudu.client.master-addresses=192.168.135.42:7051,192.168.135.43:7051,192.168.135.44:7051

5. 启动Presto

相应的权限如果没有,进行赋值

# bin/launcher start

查看页面

http://172.29.30.63:9001/ui/

6. yanagishima安装

拷贝yanagishima-20.0.zip到/app中,解压缩

修改/conf/yanagishima.properties,针对连接进行修改

启动

# ./start.sh

7.环境特殊处理

hive 3.1.0版本,需要修改配置

hive.metastore.client.capability.check = false
hive.strict.managed.tables=false 
hive.create.as.insert.only=false 
metastore.create.as.acid=false

访问外部表需要修改权限


结束语

如果您喜欢我的文章,可以[关注⭐]+[点赞👍]+[评论📃],您的三连是我前进的动力,期待与您共同成长~

可关注企鹅号【怀瑾握瑜的嘉与嘉】,获取资源下载方式