栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Presto+yanagishima部署

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Presto+yanagishima部署

1 部署Presto 1.1 下载Presto

Presto下载页面
https://prestodb.io/docs/current/installation/deployment.html

下载 presto-server-0.273.3.tar.gz后上传到服务器并解压

tar -zxvf presto-server-0.273.3.tar.gz -C /opt
mv /opt/presto-server-0.273.3 /opt/presto
1.2 修改配置

创建目录

cd /opt/presto
mkdir  etc/

创建配置文件

vi etc/node.properties
    node.environment=production
    node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
    node.data-dir=/opt/presto/data
vi etc/jvm.config
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
-XX:+CMSClassUnloadingEnabled
-XX:+AggressiveOpts
-XX:OnOutOfMemoryError=kill -9 %p
-XX:ReservedCodeCacheSize=150M
vi etc/config.properties
    coordinator=true
    node-scheduler.include-coordinator=true
    http-server.http.port=8080
    query.max-memory=5GB
    query.max-memory-per-node=1GB
    query.max-total-memory-per-node=2GB
    discovery-server.enabled=true
    discovery.uri=http://10.1.13.193:8080
vi etc/log.properties
    com.facebook.presto=INFO
mkdir etc/catalog
vi etc/catalog/jmx.properties
    connector.name=jmx
1.3 创建不同的数据源
vi mysql.properties
connector.name=mysql
connection-url=jdbc:mysql://10.1.13.199:3306?useSSL=false
connection-user=root
connection-password=paaaswd
vi oracle.properties
connector.name=oracle
connection-url=jdbc:oracle:thin:test1/pass$123@//10.1.13.223:1521/orcl
vi mongodb.properties
connector.name=mongodb
mongodb.seeds=10.1.13.12:27017
mongodb.schema-collection=admin
vi sqlserver.properties
connector.name=sqlserver
connection-url=jdbc:sqlserver://10.1.13.13:1433
connection-user=sa
connection-password=passwd

vi redis.properties

connector.name=redis
redis.table-names=schema1.table1,schema1.table2
redis.nodes=10.1.13.14:6379
1.4 启动Presto
cd /opt/presto/bin
./launcher start
1.5 访问Presto页面

浏览器访问 http://PrestoIP:8080

2 部署yanagishima 2.1 下载解压yanagishima

下载yanagishima20.zip
上传服务器并解压

mkdir /opt/yanagishima
cd /opt/yanagishima
unzip yanagishima-20.zip
2.2 修改配置文件
cd /opt/yanagishima/conf
vi yanagishima.properties
# yanagishima web port.
jetty.port=7080
# 30 minutes. If presto query exceeds this time, yanagishima cancel the query.
presto.query.max-run-time-seconds=1800
# 1GB. If presto query result file size exceeds this value, yanagishima cancel the query.
presto.max-result-file-byte-size=1073741824
# you can specify freely. But you need to specify same name to presto.coordinator.server.[...] and presto.redirect.server.[...] and catalog.[...] and schema.[...]
presto.datasources=your-presto
auth.your-presto=false
# presto coordinator url
presto.coordinator.server.your-presto=http://10.1.13.193:8080
# almost same as presto coordinator url. If you use reverse proxy, specify it
presto.redirect.server.your-presto=http://10.1.13.193:8080
# presto catalog name
catalog.your-presto=hive
# presto schema name
schema.your-presto=default
# if query result exceeds this limit, to show rest of result is skipped
select.limit=500
# http header name for audit log
audit.http.header.name=some.auth.header
use.audit.http.header.name=false
# limit to convert from tsv to values query
to.values.query.limit=500
# authorization feature
check.datasource=false
sql.query.engines=presto
# 1GB. If hive query result file size exceeds this value, yanagishima cancel the query.
hive.setup.query.path.your-hive=/opt/yanagishima/conf/hive_setup_query_your-hive

创建hive_setup_query_your-hive

touch /opt/yanagishima/conf/hive_setup_query_your-hive
2.3 启动yanagishima
cd /opt/yanagishima
nohup ./yanagishima-start.sh >y.log 2>&1 &
2.4 访问yanagishima页面

浏览器访问http://yanagishimaIP:7080
在此界面可以进行多表查询

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/999511.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号