presto安裝介紹

Presto是一個開源的分佈式SQL查詢引擎,適用於交互式分析查詢,數據量支持GB到PB字節。

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

下載後重命名爲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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章