天天看點

presto安裝介紹

Presto是一個開源的分布式SQL查詢引擎,适用于互動式分析查詢,資料量支援GB到PB位元組。

中文網位址: http://prestodb-china.com/ 官方位址: https://prestodb.io/

最新下載下傳位址: https://repo1.maven.org/maven2/com/facebook/presto/presto-server/0.139/presto-server-0.139.tar.gz 配置位址: https://prestodb.io/docs/current/installation/deployment.html shell用戶端位址: https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.139/presto-cli-0.139-executable.jar 下載下傳後重命名為presto-cli,并添加執行權限chmod u+x 

./presto --server localhost:8080 --catalog hive --schema default      

presto要求jdk的版本為jdk8 1、解壓後在presto-server中建立配置檔案目錄:mkdir etc 2、增加配置檔案 config.properties:(coordinator節點) coordinator=true node-scheduler.include-coordinator=false http-server.http.port=8080 query.max-memory=500GB query.max-memory-per-node=8GB task.max-worker-threads=40 distributed-joins-enabled=true discovery-server.enabled=true discovery.uri= http://c4node3:8080

config.properties:(worker節點)

coordinator=false http-server.http.port=8080 query.max-memory=500GB query.max-memory-per-node=8GB task.max-worker-threads=40 distributed-joins-enabled=true discovery.uri= http://c4node3:8080

jvm.config: -server -Xmx16G -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+CMSClassUnloadingEnabled -XX:+AggressiveOpts -XX:+HeapDumpOnOutOfMemoryError -XX:OnOutOfMemoryError=kill -9 %p -XX:ReservedCodeCacheSize=150M

node.properties: node.environment=bbd(不能包含特殊字元) node.id=c4node3(每個節點ID不同) node.data-dir=/data1/bbdhadoop/bbdhadoop/presto/data

log.properties: com.facebook.presto=INFO

3、配置連結器 建立連接配接器目錄:mkdir etc/catalog catalog/hive.properties connector.name=hive-cdh5 hive.metastore.uri=thrift://c4namenode2:9083 hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop/conf/hdfs-site.xml

4、啟動 ./presto-server-0.139/bin/launcher stop; 背景運作: ./presto-server-0.139/bin/launcher start; 前台運作:(新添加的配置需要前台啟動檢視是否出錯,有些參數版本不同時是不相容的) ./presto-server-0.139/bin/launcher run