yanagishima 20.0 是最后一个支持JDk 8的版本
1. 修改bulid.gradle
下载源码 GitHub yanagishima/yanagishima 20.0,用IDEA打开会自动下载Gradle。
原来的仓库慢,添加阿里云镜像。但是有的包可能阿里云仓库没有,就再用原来的仓库下。
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
}
再修改 buildWeb
task buildWeb(type:Exec) {
workingDir './web'
// commandLine './deploy.sh'
commandLine 'cmd', '/c','deploy.bat'
standardOutput = new ByteArrayOutputStream()
ext.output = {
return standardOutput.toString()
}
}
2. 创建批处理文件deploy.bat
打开目录web,创建批处理文件deploy.bat
npm install && ^
npm run build && ^
mkdir dist\share && ^
mkdir dist\error && ^
mkdir dist\diff && ^
copy dist\index.html dist\share && ^
copy dist\index.html dist\error && ^
copy dist\index.html dist\diff
3. 编译
在cmd中执行
gradlew distZip
编译好的压缩包在 build/distributions
下。
4. 运行
解压后,修改conf/yanagishima.properties
这里只配置Presto。yanagishima也支持Hive,这里未配置。
# yanagishima web port
jetty.port=8400
# 自定义指定presto数据源名称
# 以下属性名需要相同 presto.coordinator.server.XXX and presto.redirect.server.XXX and catalog.XXX and schema.XXX
presto.datasources=presto-server-1
auth.presto-server-1=false
# presto coordinator url
presto.coordinator.server.presto-server-1=http://192.168.4.23:18080
# 未指定代理,和presto coordinator url一致
presto.redirect.server.presto-server-1=http://192.168.4.23:18080
# presto catalog name,可不修改,页面可切换catalog
catalog.presto-server-1=mysql4_23
# presto schema name,可不修改
schema.presto-server-1=test
将上传到Linux,添加执行权限chmod -R u+x bin/*
。
运行
nohup bin/yanagishima-start.sh >y.log 2>&1 &
停止
./bin/yanagishima-shutdown.sh
参考: