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

029 大数据之即席查询Presto&Kylin

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

029 大数据之即席查询Presto&Kylin

正常解压安装包

[atguigu@hadoop102 software]$ tar -zxvf presto-server-0.196.tar.gz -C /opt/module/
# 创建存储数据文件夹
[atguigu@hadoop102 presto-server-0.196]$ mkdir data
# 编写配置内存管理的文件夹
[atguigu@hadoop102 presto-server-0.196]$ mkdir etc
# 编写配置数据源的配置文件夹
[atguigu@hadoop102 presto-server-0.196]$ mkdir catalog
[atguigu@hadoop102 etc]$ cat jvm.config
-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
[atguigu@hadoop102 catalog]$ cat hive.properties
connector.name=hive-hadoop2
hive.metastore.uri=thrift://hadoop102:9083

分发配置好的解压包

[atguigu@hadoop102 module]$ xsync presto-server-0.196/

配置node属性

[atguigu@hadoop102 etc]$ cat node.properties
node.environment=production
node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
node.data-dir=/opt/module/presto-server-0.196/data
[atguigu@hadoop103 etc]$ cat node.properties
node.environment=production
node.id=ffffffff-ffff-ffff-ffff-fffffffffffe
node.data-dir=/opt/module/presto-server-0.196/data
[atguigu@hadoop104 etc]$ cat node.properties
node.environment=production
node.id=ffffffff-ffff-ffff-ffff-fffffffffffd
node.data-dir=/opt/module/presto-server-0.196/data

hadoop102配置为coordinator,hadoop103、hadoop104配置为worker

[atguigu@hadoop102 etc]$ cat config.properties
coordinator=true
node-scheduler.include-coordinator=false
http-server.http.port=8881
query.max-memory=50GB
discovery-server.enabled=true
discovery.uri=http://hadoop102:8881
[atguigu@hadoop103 etc]$ cat config.properties
coordinator=false
http-server.http.port=8881
query.max-memory=50GB
discovery.uri=http://hadoop102:8881
[atguigu@hadoop104 etc]$ cat config.properties
coordinator=false
http-server.http.port=8881
query.max-memory=50GB
discovery.uri=http://hadoop102:8881

启动Hive Metastore

[atguigu@hadoop102 apache-hive-3.1.2-bin]$ pwd
/opt/module/apache-hive-3.1.2-bin
[atguigu@hadoop102 apache-hive-3.1.2-bin]$ nohup bin/hive --service metastore >/dev/null 2>&1 &
[1] 2309
[atguigu@hadoop102 ~]$ netstat -nltp | grep 9083

启动Presto Server

# 前台启动Presto,控制台显示日志
[atguigu@hadoop102 presto-server-0.196]$ bin/launcher run
[atguigu@hadoop103 presto-server-0.196]$ bin/launcher run
[atguigu@hadoop104 presto-server-0.196]$ bin/launcher run
# 后台启动Presto

Presto命令行Client安装

[atguigu@hadoop102 presto-server-0.196]$ mv presto-cli-0.196-executable.jar prestocli
[atguigu@hadoop102 presto-server-0.196]$ chmod +x prestocli 
# 启动命令行Client
[atguigu@hadoop102 presto-server-0.196]$ ./prestocli --server hadoop102:8881 --catalog hive --schema default
presto:default> 

Presto可视化Client安装

[atguigu@hadoop102 module]$ unzip yanagishima-18.0.zip
[atguigu@hadoop102 conf]$ cat 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=atguigu-presto
auth.your-presto=false
# presto coordinator url
presto.coordinator.server.atguigu-presto=http://hadoop102:8881
# almost same as presto coordinator url. If you use reverse proxy, specify it
presto.redirect.server.your-presto=http://presto.coordinator:8080
# presto catalog name
catalog.atguigu-presto=hive
# presto schema name
schema.atguigu-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
hive.jdbc.url.your-hive=jdbc:hive2://localhost:10000/default;auth=noSasl
hive.jdbc.user.your-hive=yanagishima
hive.jdbc.password.your-hive=yanagishima
hive.query.max-run-time-seconds=3600
hive.query.max-run-time-seconds.your-hive=3600
resource.manager.url.your-hive=http://localhost:8088
sql.query.engines=presto
hive.datasources=your-hive
hive.disallowed.keywords.your-hive=insert,drop
# 1GB. If hive query result file size exceeds this value, yanagishima cancel the query.
hive.max-result-file-byte-size=1073741824
hive.setup.query.path.your-hive=/usr/local/yanagishima/conf/hive_setup_query_your-hive
cors.enabled=false

启动web页面:http://hadoop102:7080

[atguigu@hadoop102 yanagishima-18.0]$ pwd
/opt/module/yanagishima-18.0
[atguigu@hadoop102 yanagishima-18.0]$ nohup bin/yanagishima-start.sh >y.log 2>&1 &
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/914552.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

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

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