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

openLooKeng安装部署说明

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

openLooKeng安装部署说明

参考官网说明:https://openlookeng.io/zh-cn/docs/docs/installation/deployment-auto.html

一、环境准备

  • 操作系统选择 Linux
  • 内存大于4G
  • 机器能够连接互联网
  • 端口号8090 未被占用

    二、离线安装部署

    1. 下载并解压安装包

            下载 https://download.openlookeng.io/auto-install/openlookeng.tar.gz 并将其内容解压到 /opt 目录。

     

    1. 下载并保存执行文件

    创建目录 /opt/openlookeng/resource 并保存 openLooKeng 执行文件 https://download.openlookeng.io//hetu-server-.tar.gz 和 https://download.openlookeng.io//hetu-cli--executable.jar,其中对应于正在安装的版本,例如1.5.0。

     

    1. 下载并保存第三方依赖

    将第三方依赖保存在 /opt/openlookeng/resource 目录下。根据本机的架构,下载 https://download.openlookeng.io/auto-install/third-resource/x86/ 或 https://download.openlookeng.io/auto-install/third-resource/aarch64/ 下面的全部文件。这应该包括一个 OpenJDK 文件和两个 sshpass 文件。

     

     

    如需要部署多节点,而且有些节点的架构与本机不同,还需要下载对应架构的OpenJDK文件并保存在 /opt/openlookeng/resource/ 目录下,其中  是 x86 或者 aarch64,对应于另一架构。

    注意:检查依赖包expect和sshpass是否安装。如果没有,这些依赖项将自动安装。另外,jdk版本要求大于1.8.0_151。如果未安装,则集群中会安装jdk1.8.0_201。建议在安装openLooKeng服务之前手动安装这些依赖。

    1. 执行离线安装命令

    执行以下命令部署单节点集群:

    bash /opt/openlookeng/bin/install_offline.sh

    执行以下命令,按照提示分别输入coordinator、worker节点IP,部署多节点集群

    bash /opt/openlookeng/bin/install_offline.sh -m

    或:

    bash /opt/openlookeng/bin/install_offline.sh --multi-node

     

    1. 启动关闭服务

    执行以下命令启动openLooKeng服务:

    /opt/openlookeng/bin/start.sh

    执行以下命令停止openLooKeng服务:

    /opt/openlookeng/bin/stop.sh

    执行以下命令启动openLooKeng命令行客户端。

    /opt/openlookeng/bin/openlk-cli

    1. 卸载openLooKeng服务

    卸载openLooKeng Service非常简单直接,只需运行以下命令:

    bash /opt/openlookeng/bin/uninstall.sh

    这将通过移除删除目录/opt/openlookeng和其中所有文件来卸载openLooKeng服务。但不会删除openlkadmin用户及/home/openlkadmin/下的所有配置文件。如果要删除用户和配置文件,使用以下命令:

    bash /opt/openlookeng/bin/uninstall.sh --all

    三、客户端连接测试

    用户可以用命令行工具(cli)连接openLooKeng服务进行数据检索和分析。 通过如下指令启动cli:

    bash /opt/openlookeng/bin/openlk-cli

     在cli 中用户可以输入标准SQL 与openLooKeng 服务器端进行交互。

    例如,用户查看当前系统有已经配置的catalog:

    show catalogs;

    查看有tpcds 有包含哪些schema:

    show schemas from tpcds;

    这里,tpcds 根据数据大小划分了不同的schema,sf后跟的数值越大数据量就越大。每个schema都包含相同的表。

    查看sf1中所包含的数据表:

    show tables from tpcds.sf1;

    用户可以选择表进行数据检索:

    select c_customer_id, c_first_name, c_last_name from tpcds.sf1.customer limit 10;

    四、常见问题

    1、查看详细日志

    在安装、启动或使用openlookeng过程中,有时需要查看详细日志信息,可通过如下方式进行查看,方便对问题予以分析。

    1. 调整日志级别

    打开配置文件/opt/openlookeng/hetu-server/etc/log.properties,修改openlookeng与presto的日志级别为debug。

    io.hetu.core=DEBUG

    io.prestosql=DEBUG

    1. 查看日志内容

    在/home/openlkadmin/.openlkadmin/logs/目录下,可看到server.log日志和launcher.log日志。使用tail -f命令即可查看详细日志。

    2、内存资源不足

    当服务器内存资源不足时,在安装过程中会出现如下报错:

    [ERROR] There is not enough memory for openLooKeng to install. OpenLooKeng requires more than 4GB JVM memory.

    [ERROR] OpenLooKeng installation failed.

    解决办法:

    ①服务器内存扩容,物理内存务必4G以上;

    ②调整安装程序中的内存计算公式如下:

    vi /opt/openlookeng/bin/install_offline.sh

    3、应用无法启动

    当安装或执行启动命令start.sh时,一直处于等待状态,openlookeng无法启动,命令行并未报错,一直停在如下状态:

    [INFO] Installed openLooKeng cluster success.

    [INFO] Starting openLooKeng service now...

    [INFO] start openLooKeng service on localhost...

    waiting cluster to start...................................

    使用命令:tail -f /home/openlkadmin/.openlkadmin/logs/server.log,查看详细的报错日志,从中分析判断具体的出错原因。

    当openlookeng服务未配置memory.spill-path属性,导致presto连接源端失败,运行报错信息如下:

    2022-03-14T17:27:24.908+0800 ERROR main io.prestosql.server.PrestoServer 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

    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 io.prestosql.connector.ConnectorManager.createConnection(ConnectorManager.java:268)

    at io.prestosql.metadata.StaticCatalogStore.loadCatalogs(StaticCatalogStore.java:73)

    at io.prestosql.server.PrestoServer.run(PrestoServer.java:161)

    at io.prestosql.server.PrestoServer.main(PrestoServer.java:87)

    解决方法参考https://openlookeng.io/zh-cn/docs/docs/connector/memory.html

    编辑/opt/openlookeng/hetu-server-1.5.0/etc/catalog/memory.properties,配置如下内容:

    connector.name=memory

    memory.max-data-per-node=4GB   #根据内存大小进下设置,超上限执行报错

    memory.spill-path=/opt/openlookeng/memory/spill

    当配置的memory.max-data-per-node参数取值过大时,会报如下错误:

    Caused by: java.lang.IllegalArgumentException: Invalid config for max data per node. Can not exceed heap headroom: 4294967296

    at io.prestosql.plugin.memory.MemoryConfig.setMaxDataPerNode(MemoryConfig.java:90)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    。。。。。。

    解决办法是将参数值调小,可参照Can not exceed heap headroom: 4294967296进行设置。

  • 转载请注明:文章转载自 www.mshxw.com
    本文地址:https://www.mshxw.com/it/763202.html
    我们一直用心在做
    关于我们 文章归档 网站地图 联系我们

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

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