• 欢迎关注微信公众号:九万里大数据
  • 请使用Ctrl+D收藏本站到书签栏
  • 手机也可访问本站 jwldata.com

Presto可视化yanagishima编译安装和编译好的包下载地址

大数据技术 九万里大数据 1年前 (2021-07-22) 967次浏览 0个评论 扫描二维码
文章目录[隐藏]

yanagishima编译好的包下载地址

我把编译好的二进制包放到网盘上了,不想自己编译的见文末自取。
放了两个版本的包,一个是原始包,对代码无任何改动。
另一个是修改包,改了引用css和字体为本地,方便内网环境部署(推荐)。

安装JDK11

首先安装JDK11,可以参考安装配置OracleJDK
如果不想显式地在/etc/profile配置JAVA_HOME,不影响系统已配置的JDK8, 可以看下文。

安装nodejs

node.js版本不能太高,要看node-sass的版本,目前是4.11.0,所以node.js用v10,高了编译不过去。

wget https://nodejs.org/dist/v10.9.0/node-v10.9.0-linux-x64.tar.xz
xz -d node-v10.9.0-linux-x64.tar.xz 
tar -xf node-v10.9.0-linux-x64.tar -C /usr/local
sudo chown -R root:root /usr/local/node-v10.9.0-linux-x64
 
创建软链接
sudo ln -s /usr/local/node-v10.9.0-linux-x64/bin/node /usr/bin/node
sudo ln -s /usr/local/node-v10.9.0-linux-x64/bin/npm /usr/bin/npm
 
验证
node -v
npm -v
 
设置为淘宝源
npm config get registry
npm config set registry https://registry.npm.taobao.org

设置权限问题(重要)

npm config set unsafe-perm
npm config -g set unsafe-perm

否则会报node-sass的错误。

> Task :buildWeb
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module '/root/yanagishima-22.0/web/node_modules/node-sass/scripts/install.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.11.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@4.11.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

编译yanagishima

官网地址
https://yanagishima.github.io

当前最新版本为22.0,下载地址
https://github.com/yanagishima/yanagishima/archive/refs/tags/22.0.tar.gz

wget https://github.com/yanagishima/yanagishima/archive/refs/tags/22.0.tar.gz
mv 22.0.tar.gz yanagishima-22.0.tar.gz
tar -zxf yanagishima-22.0.tar.gz
cd yanagishima-22.0
./gradlew distZip
 
编译好的包在build/distributions/yanagishima-22.0.zip

编译结果输出

[root@jwldata02 yanagishima-22.0]# ./gradlew distZip   
 
> Task :buildWeb
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
 
 
> Task :compileJava
/root/yanagishima-22.0/src/main/java/yanagishima/config/YanagishimaConfig.java:219: warning: [MixedMutabilityReturnType] This method returns both mutable and immutable collections or maps from different paths. This may be confusing for users of the method.
        public List<String> getHiveSetupQueryList(String datasource) {
                            ^
    (see https://errorprone.info/bugpattern/MixedMutabilityReturnType)
  Did you mean 'return ImmutableList.of();' or 'ImmutableList.Builder<String> hiveSetupQueryList = ImmutableList.builder();'?
/root/yanagishima-22.0/src/main/java/yanagishima/servlet/HiveServlet.java:93: warning: [StringSplitter] String.split(String) has surprising behavior
......
(此处省略warning输出)
......
 
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
48 warnings
 
BUILD SUCCESSFUL in 10m 29s
11 actionable tasks: 11 executed

如果编译还报错,先删除已下载的依赖包,然后重新编译。

cd /root/yanagishima-22.0/web
rm -rf node_modules

安装yanagishima

cd build/distributions
unzip yanagishima-22.0.zip -d /opt
cd /opt/yanagishima-22.0
vim conf/yanagishima.properties
nohup bin/yanagishima-start.sh >y.log 2>&1 &

yanagishima.properties配置文件内容如下

# Server
jetty.port=9901
sql.query.engines=presto
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=presto_dev
presto.query.max-run-time-seconds=1800
presto.max-result-file-byte-size=1073741824
auth.presto_dev=false
presto.coordinator.server.presto_dev=http://jwldata01:9900
presto.redirect.server.presto_dev=http://jwldata01:9900
catalog.presto_dev=hive
schema.presto_dev=default
# presto user
user.presto_dev=presto
# presto source
source.presto_dev=yanagishima

# Hive
hive.datasources=docker-hive
hive.jdbc.url.docker-hive=jdbc:hive2://localhost:10000/default
hive.jdbc.user.docker-hive=yanagishima
hive.jdbc.password.docker-hive=yanagishima
hive.query.max-run-time-seconds=3600
hive.query.max-run-time-seconds.docker-hive=3600
resource.manager.url.docker-hive=http://localhost:8088
hive.max-result-file-byte-size=1073741824

# Spark
spark.datasources=docker-spark
spark.jdbc.url.docker-spark=jdbc:hive2://localhost:10001
spark.web.url.docker-spark=http://localhost:14040
resource.manager.url.docker-spark=http://localhost:18088

# Elasticsearch
elasticsearch.datasources=docker-elasticsearch
elasticsearch.jdbc.url.docker-elasticsearch=jdbc:es://localhost:9200

(可选)如果不想显式地在/etc/profile配置JAVA_HOME,则可以修改yanagishima-config.sh脚本,加上JAVA_HOME的变量声明。

[root@jwldata02 bin]# cat yanagishima-config.sh 
#!/bin/bash

bin=$(cd "$(dirname $0)"; pwd)
YANAGISHIMA_HOME="${bin}/.."

if [ -z "$YANAGISHIMA_CONF_DIR" ]; then
  YANAGISHIMA_CONF_DIR=$YANAGISHIMA_HOME/conf
fi

for file in "$YANAGISHIMA_HOME"/lib/*.jar;
do
  CLASSPATH=$CLASSPATH:$file
done

if [ -z "$YANAGISHIMA_OPTS" ]; then
  YANAGISHIMA_OPTS=-Xmx3G
fi

export JAVA_HOME=/usr/java/jdk-11.0.10
export PATH=$JAVA_HOME/bin:$PATH

(可选)创建重启脚本

cd /opt/yanagishima-22.0
touch restart.sh
chmod u+x restart.sh

restart.sh内容如下

#!/bin/bash
 
bin/yanagishima-shutdown.sh
nohup bin/yanagishima-start.sh >y.log 2>&1 &
 
echo "starting......"
echo "tail -f yanagishima.log"

yanagishima编译好的包下载地址

Presto可视化yanagishima编译安装和编译好的包下载地址


本站文章,如未注明,均为原创 | 原创文章版权归九万里大数据所有,未经许可不得转载。
本文链接:Presto可视化yanagishima编译安装和编译好的包下载地址
喜欢 (1)

您必须 登录 才能发表评论!