Presto简介
Presto是一个由Facebook开源的分布式SQL查询引擎,适用于交互式分析查询,数据量支持GB到PB字节。
Presto是一个运行在多台服务器上的分布式系统。 完整安装包括一个coordinator和多个worker。 由客户端提交查询,从Presto命令行CLI提交到coordinator。 coordinator进行解析,分析并执行查询计划,然后分发处理队列到worker。
Presto安装环境
presto-server-0.184
hadoop-2.6.0-cdh5.8.3
apache-hive-2.3.0-bin
Java8 8u92+
Python 2.4+
CentOS 64位
datadev1(coordinator)、datadev2(worker)、datadev3(worker)
配置和启动Hive Remote Service
<property>
<name>hive.metastore.local</name>
<value>false</value>
</property>
<property>
<name>hive.metastore.uris</name>
<value>thrift://172.16.213.16:9083</value>
</property>
cd $HIVE_HOME/bin
hive –service metastore &
Presto配置
下载presto-server-0.184.tar.gz并解压至/opt/presto
创建配置文件目录etc
cd /opt/presto/presto-server-0.184 && mkdir etc
cd etc
coordinator配置文件
vi config.properties
coordinator=true
node-scheduler.include-coordinator=true ##是否允许该节点既是coordinator又是worker
http-server.http.port=9000
query.max-memory=3GB
query.max-memory-per-node=512MB
discovery-server.enabled=true
discovery.uri=http://172.16.213.16:9000
worker配置文件
vi config.properties
coordinator=false
http-server.http.port=9000
query.max-memory=512MB
discovery.uri=http://172.16.213.16:9000
node.properties
node.environment=lxw_presto_cluster
node.id=presto_datadev1
node.data-dir=/home/hadoop/presto/data
jvm.config
-server
-Xmx2G
-XX:+UseConcMarkSweepGC
-XX:+ExplicitGCInvokesConcurrent
-XX:+CMSClassUnloadingEnabled
-XX:+AggressiveOpts
-XX:+HeapDumpOnOutOfMemoryError
-XX:OnOutOfMemoryError=kill -9 %p
-XX:ReservedCodeCacheSize=150M
log.properties
com.facebook.presto=DEBUG
配置catalog
cd $PRESTO_HOME/etc
mkdir catalog
cd catalog
vi jmx.properties
connector.name=jmx
vi hive.properties
connector.name=hive-hadoop2
hive.metastore.uri=thrift://172.16.213.16:9083
hive.config.resources=/etc/hadoop/conf/core-site.xml, /etc/hadoop/conf/hdfs-site.xml
hive.allow-drop-table=true
Presto启动
export JAVA_HOME=/home/hadoop/jdk1.8.0_144/
export PATH=$JAVA_HOME/bin:$PATH
bin/launcher run
Presto Cli
下载presto-cli-0.184-executable.jar到$PRESTO_HOME/bin
mv presto-cli-0.184-executable.jar presto
chmod a+x presto
./presto –server localhost:9099 –catalog hive –schema default
进入Presto命令行。
Presto WEB Interface
http://172.16.213.16:9099/
标签:presto,简介,Presto,hive,server,coordinator,XX From: https://www.cnblogs.com/yaoyangding/p/17131886.html