presto安装介绍

来源:互联网 发布:.me是什么域名 编辑:程序博客网 时间:2024/05/16 23:57
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
0 0
原创粉丝点击