install-2

一、 jdk替换
1、presto有jdk版本要求,将原来JAVA_HOME下的包进行备份,
将jdk-8u201-linux-x64.tar进行解压,直接替换原来的内容即可,路径不用修改,还用原来的path
二、presto部署

  1. 1.本次部署presto部署5个点,分别传到5台机器上
  2. 2.1
  3. ——————————————coordinator节点配置-----------------------------------------------------------------
  4. 修改config.properties
  5. coordinator=true #是coordinator节点
  6. node-scheduler.include-coordinator=true #是coordinator节点,同时是woker节点
  7. http-server.http.port=9002 # HTTP端口
  8. query.max-memory=6GB
  9. query.max-memory-per-node=2GB
  10. query.max-total-memory-per-node=4GB
  11. discovery-server.enabled=true #Presto使用Discovery服务查找群集中的所有节点
  12. discovery.uri=http://cdh1:9002 #http地址
  13. http-server.http.port: Specifies the port for the HTTP server. Presto uses HTTP for all communication, internal and external.
  14. discovery.uri: The URI to the Discovery server.
  15. Because we have enabled the embedded version of Discovery in the Presto coordinator,
  16. this should be the URI of the Presto coordinator.
  17. Replace example.net:8080 to match the host and port of the Presto coordinator.
  18. This URI must not end in a slash.
  19. ——————————————woker节点配置-----------------------------------------------------------------
  20. 修改config.properties
  21. coordinator=false #是coordinator节点
  22. node-scheduler.include-coordinator=false #是woker节点
  23. http-server.http.port=9002 # HTTP端口
  24. query.max-memory=6GB
  25. query.max-memory-per-node=2GB
  26. query.max-total-memory-per-node=4GB
  27. #discovery-server.enabled=true #注释掉
  28. discovery.uri=http://cdh1:9002 #coordinator节点地址
  29. 2.2 catalog/hive.properties 修改hive 的连接
  30. connector.name=hive-hadoop2 #写死格式
  31. hive.metastore.uri=thrift://cdh1:9083 #hive.metastore.uri与端口
  32. hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop/conf/hdfs-site.xml #core-site.xml与hdfs-site.xml 位置
  33. hivecatalog配置文件中,加入如下配置 hive.parquet.fail-on-corrupted-statistics=false
  34. 2.3 node.properties 配置
  35. node.environment=dev #集群名称 (统一值)
  36. node.id=presto-node2 #本节点名称(唯一值)
  37. node.data-dir=/data1/presto/data #自定义数据路径
  38. 3.1 catalog/kudu.properties
  39. cat kudu.properties
  40. connector.name=kudu
  41. kudu.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