presto for hadoop
2021-10-19Presto是Facebook开发的数据查询引擎,可对250PB以上的数据进行快速地交互式分析。
1、Centos 8.X 系统,JDK采用的Oracle的1.8.X的版本。presto的版本是采用最新版0.263,Python为版本Python 2.7
2、下载:
https://repo1.maven.org/maven2/com/facebook/presto/presto-server/0.263.1/presto-server-0.263.1.tar.gz
https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.263.1/presto-cli-0.263.1.jar
3、tar zxf presto-server-0.263.1.tar.gz -C /opt/presto
mv presto-cli-0.263.1.jar /opt/presto/client
3、主要配置文件
./etc/config.properties
./etc/log.properties
./etc/node.properties
./etc/catalog/hive.properties
./etc/catalog/jmx.properties
find . -type f -name '*es'|xargs cat
main-class=com.facebook.presto.server.PrestoServer
process-name=presto-server
coordinator=true
node-scheduler.include-coordinator=true #worker else false
http-server.http.port=18088
discovery-server.enabled=true
discovery.uri=http://172.16.201.169:18088
com.facebook.presto=INFO
node.environment=production
node.id=hadoop-pub-node003
node.data-dir=/opt/presto/data
connector.name=hive-hadoop2
hive.metastore.uri=thrift://hadoop-pub-node006:9083
hive.config.resources=/etc/hive/conf/core-site.xml,/etc/hive/conf/hdfs-site.xml
connector.name=jmx
4、至少需要启动一个worker
node-scheduler.include-coordinator=true #单机版的此处为true
5、stop & start
./presto-server-0.263.1/bin/launcher start
./presto-server-0.263.1/bin/launcher stop
./presto-server-0.263.1/bin/launcher status
tail -f data/var/log/server.log
6、client连接
rlwrap ./presto --server 172.16.201.170:18088 --catalog hive