1.介绍
yanagishima
是 presto 的一个客户端 web 工具。
在 PrestoSQL 集群的 manager.presto 节点进行编译,编译环境:jdk11。
2.安装 Gradle
# 注意:该步骤可以跳过,因为在编译yanagishima的过程中,会下载 gradle。
cd /opt
# 如果下载失败,请使用迅雷进行下载,然后上传到服务器节点
wget http://services.gradle.org/distributions/gradle-5.6.2-bin.zip
# 解压
unzip gradle-5.6.2-bin.zip
# 配置环境变量
export GRADLE_HOME="/opt/gradle-5.6.2"
export PATH=$PATH:$GRADLE_HOME/bin
source /etc/profile
# 查看是否生效
gradle -v
3.安装 Node.js
cd /opt
# 下载
wget https://nodejs.org/dist/v10.16.3/node-v10.16.3-linux-x64.tar.xz
# 解压
tar -xf node-v10.16.3-linux-x64.tar.xz
mv node-v10.16.3-linux-x64 nodejs
chown -R root:root nodejs
[root@manager opt]# nodejs/bin/node -v
v10.16.3
ln -s /opt/nodejs/bin/node /usr/local/bin
ln -s /opt/nodejs/bin/npm /usr/local/bin
[root@manager opt]# ll /usr/local/bin/
total 0
lrwxrwxrwx. 1 root root 20 Nov 19 14:48 node -> /opt/nodejs/bin/node
lrwxrwxrwx. 1 root root 19 Nov 19 14:49 npm -> /opt/nodejs/bin/npm
# 设置权限问题
npm config set unsafe-perm
npm config -g set unsafe-perm
# 安装node-sass
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
npm install node-sass
4.下载源码编译
cd /opt
# clone,也可以选择 https://github.com/yanagishima/yanagishima/tags 进行下载
git clone https://github.com/yanagishima/yanagishima.git
cd yanagishima
# 查询当前可供选择的tag
git tag
# 切换对应的分支,选择 22.0 版本,安装jdk11版本,必须使用20.0之后的分支
git checkout -b 22.0 refs/tags/22.0
# 查看当前所在分支
git branch
# 编译打包,编译过程较慢
./gradlew distZip
# 将编译好的包,发送到 /opt 目录
cp build/distributions/yanagishima-22.0.zip /opt/
# 解压
cd /opt
unzip yanagishima-22.0.zip

5.修改配置文件
cd /opt/yanagishima-22.0
vim conf/yanagishima.properties
# 使用该配置文件
# Server
jetty.port=8081
sql.query.engines=presto,hive,spark,elasticsearch
check.datasource=false
select.limit=500
audit.http.header.name=some.auth.header
use.audit.http.header.name=false
to.values.query.limit=500
cors.enabled=true
# Presto
presto.datasources=my-presto
presto.query.max-run-time-seconds=1800
presto.max-result-file-byte-size=1073741824
auth.my-presto=false
presto.coordinator.server.my-presto=http://manager.presto:8080
presto.redirect.server.my-presto=http://manager.presto:8080
catalog.my-presto=hive
schema.my-presto=hivetest
# 其余没变
6.启动
cd /opt/yanagishima-22.0
nohup bin/yanagishima-start.sh >y.log 2>&1 &
7.访问
- http://manager.presto:8081/
- kafka组件与Hive组件的跨数据源Join操作

关注 易学在线 公众号
每日更新大量优质技术文档
第一时间获知最新上架课程
与众多大数据猿分享与交流
DOIT.EDU 资料来自网络收集整理,如有侵权请告知