OpenLookeng安装
1、直接通过命令行安装
运行如下命令即可启动安装部署:
wget -O - https://download.openlookeng.io/install.sh|bash
该命令从openLooKeng官网下载安装脚本并启动脚本运行。脚本在运行过程中,会自动从openLooKeng官网下载最新的安装包以及所依赖的组件。在下载完成后,会自动启动部署工作。整个过程不需要用户做额外的操作。
当用户看到如下日志,便可以认为openLooKeng 部署成功了。
来自 <https://openlookeng.io/zh-cn/docs/docs/start.html>
真正执行从官网下载的命令如下
curl -fsSL -o /home/openlkadmin/.openlkadmin/hetu-server-1.3.0.tar.gz.sha256sum https://download.openlookeng.io/1.3.0/hetu-server-1.3.0.tar.gz.sha256sum
2、启动报错
2021-08-03T15:16:58.185+0800ERRORmainio.prestosql.server.PrestoServerUnable to create injector, see the following errors:
1) Error: Invalid configuration property memory.spill-path: may not be null (for class io.prestosql.plugin.memory.MemoryConfig.spillRoot)
1 error
com.google.inject.CreationException: Unable to create injector, see the following errors:
1) Error: Invalid configuration property memory.spill-path: may not be null (for class io.prestosql.plugin.memory.MemoryConfig.spillRoot)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:159)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
at com.google.inject.Guice.createInjector(Guice.java:87)
at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:262)
at io.prestosql.plugin.memory.MemoryConnectorFactory.create(MemoryConnectorFactory.java:80)
at io.prestosql.connector.ConnectorManager.createConnector(ConnectorManager.java:459)
解决办法
https://openlookeng.io/zh-cn/docs/docs/connector/memory.html
cd /opt/openlookeng/hetu-server-1.3.0/etc/catalog/
memory.properties
增加如下内容
connector.name=memory
memory.splits-per-node=10
memory.max-data-per-node=20GB
memory.spill-path=/opt/openlookeng/memory/spill
3、执行多行查询
https://openlookeng.io/zh-cn/docs/docs/start.html
启动命令行
bash /opt/openlookeng/bin/openlk-cli
指定schema与table
use tpcds.sf1;
SELECT
"sr_customer_sk" "ctr_customer_sk"
, "sr_store_sk" "ctr_store_sk"
, "sum"("sr_return_amt") "ctr_total_return"
FROM
store_returns
, date_dim
WHERE ("sr_returned_date_sk" = "d_date_sk")
AND ("d_year" = 2000)
GROUP BY "sr_customer_sk", "sr_store_sk";
来自 <https://openlookeng.io/zh-cn/docs/docs/start.html>
4、日志路径
cd /home/openlkadmin/.openlkadmin
5、 支持WEBUI显示
/opt/openlookeng/hetu-server/etc/config.properties
增加如下配置
hetu.queryeditor-ui.allow-insecure-over-http=true
hetu.queryeditor-ui.allow-insecure-over-http=true