Presto 安装

Presto 安装与部署

配置 Presto

  • 切换到 catalog 配置目录

    1. cd /usr/local/presto-server/etc/catalog
  • 配置 Iceberg 的连接器 ```bash vim iceberg-hive.properties

connector.name=iceberg hive.metastore.uri=thrift://172.31.1.32:9083 iceberg.catalog.type=hive

  1. ```bash
  2. vim iceberg-hadoop.properties
  3. connector.name=iceberg
  4. iceberg.catalog.type=hadoop
  5. hive.metastore.uri=thrift://localhost:9083
  6. iceberg.catalog.warehouse=hdfs:///warehouse/hadoop
  7. iceberg.hadoop.config.resources=/opt/hadoop/etc/hadoop/core-site.xml,/opt/hadoop/etc/hadoop/hdfs-site.xml

注意⚠️: 必须配置 hive.metastore.uri,设置的 uri 可以不存在,否则报错

Invalid configuration property hive.metastore.uri: may not be null (for class com.facebook.presto.hive.metastore.thrift.StaticMetastoreConfig.metastoreUris)

使用 Presto 查询 Iceberg

  • 进入 Presto 客户端
    1. ./presto-cli --server node04:10008 --catalog iceberg --schema default

配置说明:

  • catalog 指定连接器
  • schema 指定数据库