install-2
一、 jdk替换
1、presto有jdk版本要求,将原来JAVA_HOME下的包进行备份,
将jdk-8u201-linux-x64.tar进行解压,直接替换原来的内容即可,路径不用修改,还用原来的path
二、presto部署
1.本次部署presto部署5个点,分别传到5台机器上2.1——————————————coordinator节点配置-----------------------------------------------------------------修改config.propertiescoordinator=true #是coordinator节点node-scheduler.include-coordinator=true #是coordinator节点,同时是woker节点http-server.http.port=9002 # HTTP端口query.max-memory=6GBquery.max-memory-per-node=2GBquery.max-total-memory-per-node=4GBdiscovery-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.propertiescoordinator=false #是coordinator节点node-scheduler.include-coordinator=false #是woker节点http-server.http.port=9002 # HTTP端口query.max-memory=6GBquery.max-memory-per-node=2GBquery.max-total-memory-per-node=4GB#discovery-server.enabled=true #注释掉discovery.uri=http://cdh1:9002 #coordinator节点地址2.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=false2.3 node.properties 配置node.environment=dev #集群名称 (统一值)node.id=presto-node2 #本节点名称(唯一值)node.data-dir=/data1/presto/data #自定义数据路径3.1 catalog/kudu.propertiescat kudu.propertiesconnector.name=kudukudu.client.master-addresses=192.168.135.42:7051,192.168.135.43:7051,192.168.135.44:7051
4 运行 bin 下面
./launcher start #启动服务,日志在自定义数据路径下
5 登录
./presto —server 10.30.50.87:9001 —catalog hive —schema default
./presto —server 10.60.249.56:9001 —catalog kudu —schema default
presto:default> show schemas; #查询数据库
Schema
dataplatform_hongyan
default
information_schema
(3 rows)
Query 20201022_024751_00010_st4m9, FINISHED, 2 nodes
Splits: 36 total, 36 done (100.00%)
0:00 [3 rows, 60B] [10 rows/s, 201B/s]
api 查看状态
节点个数
curl http://127.0.0.1:9002/v1/cluster
